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:
Alexandre Duret-Lutz 2017-03-28 23:34:41 +02:00
parent 73bb562bf5
commit 6623af67e6
5 changed files with 250 additions and 44 deletions

View file

@ -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