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
904cfb27
Commit
904cfb27
authored
Dec 22, 2017
by
Alexandre Duret-Lutz
Browse files
scc_info: detect incorrect initial state
* spot/twaalgos/sccinfo.cc: Here. * tests/python/sccinfo.py: Test it.
parent
31ccab02
Changes
2
Hide whitespace changes
Inline
Side-by-side
spot/twaalgos/sccinfo.cc
View file @
904cfb27
...
...
@@ -75,6 +75,11 @@ namespace spot
options_
(
options
)
{
unsigned
n
=
aut
->
num_states
();
if
(
initial_state
!=
-
1U
&&
n
<=
initial_state
)
throw
std
::
runtime_error
(
"scc_info: supplied initial state does not exist"
);
sccof_
.
resize
(
n
,
-
1U
);
if
(
!!
(
options
&
scc_info_options
::
TRACK_STATES_IF_FIN_USED
)
...
...
tests/python/sccinfo.py
View file @
904cfb27
...
...
@@ -22,6 +22,12 @@ import spot
a
=
spot
.
translate
(
'(Ga -> Gb) W c'
)
try
:
si
=
spot
.
scc_info
(
a
,
10
)
exit
(
2
)
except
RuntimeError
as
e
:
assert
"initial state does not exist"
in
str
(
e
)
si
=
spot
.
scc_info
(
a
)
n
=
si
.
scc_count
()
assert
n
==
4
...
...
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