Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
b4103ebe
Commit
b4103ebe
authored
Nov 23, 2016
by
Etienne Renault
Browse files
reachability: improve support for callbacks
* spot/mc/reachability.hh: here.
parent
3f2c08bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
spot/mc/reachability.hh
View file @
b4103ebe
...
...
@@ -41,10 +41,10 @@ namespace spot
}
~
seq_reach_kripke
()
{
// States will be destroyed by the system, so just clear map
visited
.
clear
();
}
{
// States will be destroyed by the system, so just clear map
visited
.
clear
();
}
Visitor
&
self
()
{
...
...
@@ -55,15 +55,20 @@ namespace spot
{
self
().
setup
();
State
initial
=
sys_
.
initial
(
tid_
);
todo
.
push_back
({
initial
,
sys_
.
succ
(
initial
,
tid_
)});
visited
[
initial
]
=
++
dfs_number
;
self
().
push
(
initial
,
dfs_number
);
if
(
SPOT_LIKELY
(
self
().
push
(
initial
,
dfs_number
)))
{
todo
.
push_back
({
initial
,
sys_
.
succ
(
initial
,
tid_
)});
visited
[
initial
]
=
++
dfs_number
;
}
while
(
!
todo
.
empty
())
{
if
(
todo
.
back
().
it
->
done
())
{
sys_
.
recycle
(
todo
.
back
().
it
,
tid_
);
todo
.
pop_back
();
if
(
SPOT_LIKELY
(
self
().
pop
(
todo
.
back
().
s
)))
{
sys_
.
recycle
(
todo
.
back
().
it
,
tid_
);
todo
.
pop_back
();
}
}
else
{
...
...
@@ -73,10 +78,11 @@ namespace spot
if
(
it
.
second
)
{
++
dfs_number
;
self
().
push
(
dst
,
dfs_number
);
self
().
edge
(
visited
[
todo
.
back
().
s
],
dfs_number
);
todo
.
back
().
it
->
next
();
todo
.
push_back
({
dst
,
sys_
.
succ
(
dst
,
tid_
)});
if
(
SPOT_LIKELY
(
self
().
push
(
dst
,
dfs_number
)))
{
todo
.
back
().
it
->
next
();
todo
.
push_back
({
dst
,
sys_
.
succ
(
dst
,
tid_
)});
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment