Implements is_streett_like() and streett_like_pairs(), is_rabin_like...

Adds the method spot::acc_cond::is_streett_like() that behaves like
spot::acc_cond::is_streett() except that it works on a wider range
of acceptance conditions, called Streett-like. Also adds
spot::acc_cond::streett_like_pairs() that returns a boolean assessing
whether the acceptance condition is Streett-like and also returns all
the Streett_like pairs.
Defines the new struct type spot::acc_cond::rs_pair.
Similarily, Adds the methods spot::acc_cond::is_rabin_like() and
spot::acc_cond::rabin_like_pairs().

* NEWS: Mention this modification
* python/spot/impl.i: Declares the new struct to SWIG, and defines
the streett_like_pairs() vector as an output parameter, which makes
the python code return a tuple (boolean, vector) rather than a
pass-by-reference vector.
* spot/twa/acc.cc, spot/twa/acc.hh: Declares an implements the new
methods and the new nested struct.
* tests/Makefile.am: Add new tests to the suite
* tests/python/rs_like.py: Tests the new methods and
the SWIG bindings.
This commit is contained in:
Thomas Medioni 2017-04-06 13:01:52 +02:00
parent 07c2dd3b64
commit b428ed31ec
6 changed files with 307 additions and 1 deletions

15
NEWS
View file

@ -37,6 +37,21 @@ New in spot 2.3.3.dev (not yet released)
the second command outputs an automaton with states that show
references to the first one.
- spot::acc_cond::is_streett_like() returns whether an acceptance
condition is Streett-like, meaning it is a conjunction of
disjunctive clauses containing at most one Inf and at most one Fin.
It is more permissive than spot::acc_cond::is_streett(),
as the only requirement is that all the marks are present in the
acceptance condition.
In addition, the spot::acc_cond::streett_like_pairs() returns a
boolean that indicates if the acceptance condition is Streett-like
and takes a vector of the new struct spot::acc_cond::streett_pair,
which has members fin and inf, as an output parameter which
contains after the call to the function all the Streett-like pairs.
Likewise, spot::acc_cond::is_rabin_like() and
spot::acc_cond::rabin_like_pairs() are implemented for Rabin-like
pairs.
Bugs fixed:
- the transformation to state-based acceptance (spot::sbacc()) was