twa_graph: fix purge_unreachable_states on alternating automata
The algorithm had two problems: it was removing only useless destination from universal destination (instead of removing the entire edge), and it was not properly iterating over the entire reachable automaton. * spot/twa/twagraph.cc: Fix it. * spot/twa/twagraph.hh: Adjust documentation. * tests/core/alternating.test: Add more tests. * tests/python/twagraph.py: Adjust. * NEWS: Mention the bug.
This commit is contained in:
parent
5f564c2b45
commit
f6a238efd5
5 changed files with 251 additions and 44 deletions
|
|
@ -87,4 +87,5 @@ assert aut.edge_data(1).cond == bddtrue
|
|||
aut.release_iter(it)
|
||||
|
||||
aut.purge_dead_states()
|
||||
i = aut.get_init_state()
|
||||
assert aut.state_is_accepting(i) == False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue