implement maximum cardinality search

* spot/twaalgos/mcs.cc, spot/twaalgos/mcs.hh: New files.
* spot/twaalgos/Makefile.am: Add them.
* python/spot/impl.i: Include mcs.hh.
* bin/autfilt.cc: Add --mcs option.
* NEWS: Mention it.
* doc/spot.bib: Add reference.
* tests/core/mcs.test: New file.
* tests/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2024-09-18 12:04:23 +02:00
parent 77a17881a3
commit 7b0e15a7fb
9 changed files with 501 additions and 5 deletions

9
NEWS
View file

@ -51,6 +51,10 @@ New in spot 2.12.0.dev (not yet released)
- autfilt learned --track-formula=F to label states with formulas
derived from F. (This is more precise on deterministic automata.)
- autfilt learned --mcs[=any|scc] to reorder states according to a
maximum cardinality search. The argument specifies how to break
ties.
- ltlfilt learned --pi1, --sigma1, --delta1, --pi2, --sigma2, and
--delta2 to filter according to classes Π₁,Σ₁,Δ₁,Π₂,Σ₂, and Δ₂.
@ -96,6 +100,11 @@ New in spot 2.12.0.dev (not yet released)
- twa_graph::defrag_states(num) no longer require num[i]≤i; num
can now describe a permutation of the state numbers.
- spot::maximum_cardinality_search() and
spot::maximum_cardinality_search_reorder_here() are new function
to compute (and apply) an ordering of state based on a maximum
cardinality search.
Bug fixes:
- Generating random formulas without any unary opertor would very