remove_fin: remove useless states

* src/tgba/tgbagraph.cc (purge_dead_states): Using a DFS to compute a
topological order, allowing to remove useless using a second
pass (instead of iterating the passes until there is nothing to remove).
* src/tgbaalgos/remfin.cc: Call purge_dead_states().
* src/tgbatest/remfin.test, src/tgbatest/det.test: Adjust expected
output.
* doc/org/autfilt.org: Update example.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-24 12:04:30 +01:00
parent b4e22a3c7e
commit 020bbd4473
5 changed files with 82 additions and 93 deletions

View file

@ -335,11 +335,11 @@ $txt
#+RESULTS:
[[file:autfilt-ex1.png]]
Using =--sba= will "push" the acceptance membership of the transitions to the states:
Using =--sbacc= will "push" the acceptance membership of the transitions to the states:
#+NAME: autfilt-ex2
#+BEGIN_SRC sh :results verbatim :export code
autfilt --sba aut-ex1.hoa --dot=.a
autfilt --sbacc aut-ex1.hoa --dot=.a
#+END_SRC
#+RESULTS: autfilt-ex2
@ -430,15 +430,9 @@ digraph G {
2 -> 0 [label=<!b>]
2 -> 1 [label=<a &amp; !b<br/><font color="#5DA5DA">⓿</font>>]
2 -> 2 [label=<!a &amp; !b<br/><font color="#5DA5DA">⓿</font>>]
2 -> 3 [label=<!b>]
2 -> 4 [label=<a &amp; !b<br/><font color="#5DA5DA">⓿</font>>]
2 -> 5 [label=<!a &amp; !b<br/><font color="#5DA5DA">⓿</font>>]
2 -> 3 [label=<!a &amp; !b<br/><font color="#5DA5DA">⓿</font>>]
3 [label="3"]
4 [label="4"]
5 [label="5"]
5 -> 3 [label=<!b<br/><font color="#F17CB0">❶</font><font color="#60BD68">❹</font>>]
5 -> 4 [label=<a &amp; !b<br/><font color="#5DA5DA">⓿</font><font color="#F17CB0">❶</font><font color="#60BD68">❹</font>>]
5 -> 5 [label=<!a &amp; !b<br/><font color="#5DA5DA">⓿</font><font color="#F17CB0">❶</font><font color="#60BD68">❹</font>>]
3 -> 3 [label=<!a &amp; !b<br/><font color="#5DA5DA">⓿</font><font color="#F17CB0">❶</font><font color="#60BD68">❹</font>>]
}
#+end_example