Skip to content
GitLab
Menu
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
99d28c3c
Commit
99d28c3c
authored
Aug 20, 2014
by
Alexandre Duret-Lutz
Browse files
* src/tgbaalgos/complete.cc: Introduce a sink state only if needed.
parent
d28e7f9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tgbaalgos/complete.cc
View file @
99d28c3c
...
...
@@ -61,12 +61,6 @@ namespace spot
}
}
}
// If we haven't found any sink, simply add one.
if
(
sink
==
-
1U
)
{
sink
=
aut
->
new_state
();
++
n
;
}
// Now complete all states (including the sink).
for
(
unsigned
i
=
0
;
i
<
n
;
++
i
)
...
...
@@ -91,10 +85,20 @@ namespace spot
// state.
acc
=
t
.
acc
;
}
// I
n case the automaton use state-based acceptance, propagate
// t
he acceptance of the first transition to the one we add
.
// I
f the state has incomplete successors, we need to add a
// t
ransition to some sink state
.
if
(
missingcond
!=
bddfalse
)
aut
->
new_transition
(
i
,
sink
,
missingcond
,
acc
);
{
// If we haven't found any sink, simply add one.
if
(
sink
==
-
1U
)
{
sink
=
aut
->
new_state
();
++
n
;
}
// In case the automaton use state-based acceptance, propagate
// the acceptance of the first transition to the one we add.
aut
->
new_transition
(
i
,
sink
,
missingcond
,
acc
);
}
}
return
sink
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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