decompose: merge decompose_strength() and decompose_scc()

These two functions were doing almost identical work, the only
difference was the way to select the SCC to keep.  Now we have a more
uniform way to do that.  Closes #172.

* bin/autfilt.cc: Offer a unique --decompose-scc option, but keep
--decompose-strength as an alias for backward compatibility.
* spot/twaalgos/strength.cc, spot/twaalgos/strength.hh: Rename
decompose_strength as decompose_scc, and handle a way to list
all SCC numers in the string specifier.  This gets rid
of the nearly identical
* tests/core/scc.test, tests/core/strength.test,
tests/python/decompose.ipynb, tests/python/decompose_scc.py: Adjust
test cases.
* NEWS: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2017-06-30 23:05:43 +02:00
parent fba3c78206
commit 09e47d648a
8 changed files with 453 additions and 294 deletions

18
NEWS
View file

@ -21,6 +21,10 @@ New in spot 2.3.5.dev (not yet released)
- autfilt learned --simplify-acceptance to simplify some acceptance
conditions. (See spot::simplify_acceptance() below.)
- autfilt --decompote-strength has been renamed to --decompose-scc
because it can now extract the subautomaton leading to an SCC
specified by number. (The old name is still kept as an alias.)
Library:
- A new library, libspotgen, gathers all functions used to generate
@ -41,6 +45,12 @@ New in spot 2.3.5.dev (not yet released)
- spot::dtwa_complement now simply returns the result of dualize()
- spot::decompose_strength() was extended and renamed to
spot::decompose_scc() as it can now also extract a subautomaton
leading to a particular SCC. A demonstration of this feature via
the Python bindings can be found at
https://spot.lrde.epita.fr/ipynb/decompose.html
- A new named property for automata called "original-states" can be
used to record the origin of a state before transformation. It is
currently defined by the degeneralization algorithms, and by
@ -161,6 +171,9 @@ New in spot 2.3.5.dev (not yet released)
Deprecation notice:
- spot::decompose_strength() is deprecated, it has been renamed
to spot::decompose_scc().
- spot::dtwa_complement() is deprecated. Prefer the more generic
spot::dualize() instead.
@ -330,11 +343,6 @@ New in spot 2.3.1 (2017-02-20)
Kupferman & Rosenberg [MoChArt'10] are recognizable by
deterministic Büchi automata with at least 2^2^n states.
- autfilt has a new transformation: --decompose-scc, which allows
decomposition of automata through their accepting SCCs.
A demonstration of this feature via the Python bindings
can be found at https://spot.lrde.epita.fr/ipynb/decompose.html
Library:
- spot::twa_run::as_twa() has an option to preserve state names.