support for semi-deterministic property
* spot/twa/twa.hh (prop_semi_deterministic): New methods. * spot/parseaut/parseaut.yy, spot/twaalgos/hoa.cc: Add support for the semi-deterministic property. * doc/org/concepts.org, doc/org/hoa.org: Document it. * spot/twaalgos/isdet.cc, spot/twaalgos/isdet.hh (is_semi_deterministic): New function. * bin/autfilt.cc: Add --is-semi-deterministic. * bin/common_aoutput.cc: Add --check=semi-deterministic. * tests/core/semidet.test: New file. * tests/Makefile.am: Add it. * tests/core/parseaut.test, tests/core/readsave.test: Adjust.
This commit is contained in:
parent
db5d9780f1
commit
4b01387817
14 changed files with 265 additions and 50 deletions
|
|
@ -554,7 +554,6 @@ $txt
|
|||
#+RESULTS:
|
||||
[[file:concept-twa1.png]]
|
||||
|
||||
|
||||
* Alternating ω-automata
|
||||
|
||||
Alternating ω-automata are ω-automata in which the destination of an
|
||||
|
|
@ -1055,16 +1054,17 @@ better choices.
|
|||
There are actually several property flags that are stored into each
|
||||
automaton, and that can be queried or set by algorithms:
|
||||
|
||||
| flag name | meaning when =true= |
|
||||
|---------------------+----------------------------------------------------------------------------------------------|
|
||||
| =state_acc= | automaton should be considered has having state-based acceptance |
|
||||
| =inherently_weak= | accepting and rejecting cycles cannot be mixed in the same SCC |
|
||||
| =weak= | transitions of an SCC all belong to the same acceptance sets |
|
||||
| =very-weak= | weak automaton where all SCCs have size 1 |
|
||||
| =terminal= | automaton is weak, accepting SCCs are complete, accepting edges may not go to rejecting SCCs |
|
||||
| =deterministic= | there is at most one run *recognizing* a word, but not necessarily accepting it |
|
||||
| =unambiguous= | there is at most one run *accepting* a word (but it might be recognized several time) |
|
||||
| =stutter_invariant= | the property recognized by the automaton is [[https://www.lrde.epita.fr/~adl/dl/adl/michaud.15.spin.pdf][stutter-invariant]] |
|
||||
| flag name | meaning when =true= |
|
||||
|----------------------+----------------------------------------------------------------------------------------------|
|
||||
| =state_acc= | automaton should be considered has having state-based acceptance |
|
||||
| =inherently_weak= | accepting and rejecting cycles cannot be mixed in the same SCC |
|
||||
| =weak= | transitions of an SCC all belong to the same acceptance sets |
|
||||
| =very-weak= | weak automaton where all SCCs have size 1 |
|
||||
| =terminal= | automaton is weak, accepting SCCs are complete, accepting edges may not go to rejecting SCCs |
|
||||
| =deterministic= | there is at most one run *recognizing* a word, but not necessarily accepting it |
|
||||
| =semi-deterministic= | any nondeterminism occurs before entering an accepting SCC |
|
||||
| =unambiguous= | there is at most one run *accepting* a word (but it might be recognized several time) |
|
||||
| =stutter_invariant= | the property recognized by the automaton is [[https://www.lrde.epita.fr/~adl/dl/adl/michaud.15.spin.pdf][stutter-invariant]] |
|
||||
|
||||
For each flag =flagname=, the =twa= class has a method
|
||||
=prop_flagname()= that returns the value of the flag as an instance of
|
||||
|
|
|
|||
|
|
@ -600,10 +600,11 @@ body of the file, and then return and error if what has been declared
|
|||
does not correspond to the reality.
|
||||
|
||||
Some supported properties (like =weak=, =inherently-weak=,
|
||||
=very-weak=, =terminal=, =unambiguous=, or =stutter-invariant=) are
|
||||
not double-checked, because that would require more operations.
|
||||
Command-line tools that read HOA files all take a =--trust-hoa=no=
|
||||
option to ignore properties that are not double-checked by the parser.
|
||||
=very-weak=, =terminal=, =unambiguous=, =semi-deterministic=, or
|
||||
=stutter-invariant=) are not double-checked, because that would
|
||||
require more operations. Command-line tools that read HOA files all
|
||||
take a =--trust-hoa=no= option to ignore properties that are not
|
||||
double-checked by the parser.
|
||||
|
||||
It should be noted that each property can take three values: true,
|
||||
false, or maybe. So actually two bits are used per property. For
|
||||
|
|
@ -649,26 +650,27 @@ particular:
|
|||
to detect deterministic automata that have been output by algorithms
|
||||
that do not try to output deterministic automata.
|
||||
|
||||
| property | parser | stored | printer | notes |
|
||||
|---------------------+---------+--------+---------------------------------------------------------+------------------------------------------------------------------|
|
||||
| =state-labels= | checked | no | checked if =-Hk= | state labels are converted to transition labels when reading TωA |
|
||||
| =trans-labels= | checked | no | always, unless =-Hi= or =-Hk= | |
|
||||
| =implicit-labels= | checked | no | if =-Hi= | =-Hi= only works for deterministic automata |
|
||||
| =explicit-labels= | checked | no | always, unless =-Hi= | |
|
||||
| =state-acc= | checked | yes | checked, unless =-Ht= or =-Hm= | |
|
||||
| =trans-acc= | checked | no | if not =state-acc= and not =-Hm= | |
|
||||
| =no-univ-branch= | ignored | no | only if =-Hv= | |
|
||||
| =univ-branch= | checked | no | checked | |
|
||||
| =deterministic= | checked | yes | checked | |
|
||||
| =complete= | checked | no | checked | |
|
||||
| =unambiguous= | trusted | yes | as stored if (=-Hv= or not =deterministic=) | can be checked with =--check=unambiguous= |
|
||||
| =stutter-invariant= | trusted | yes | as stored | can be checked with =--check=stuttering= |
|
||||
| =stutter-sensitive= | trusted | yes | as stored (opposite of =stutter-invariant=) | can be checked with =--check=stuttering= |
|
||||
| =terminal= | trusted | yes | as stored | can be checked with =--check=strength= |
|
||||
| =very-weak= | trusted | yes | as stored if (=-Hv= or not =terminal=) | can be checked with =--check=strength= |
|
||||
| =weak= | trusted | yes | as stored if (=-Hv= or not (=terminal= or =very-weak=)) | can be checked with =--check=strength= |
|
||||
| =inherently-weak= | trusted | yes | as stored if (=-Hv= or not =weak=) | can be checked with =--check=strength= |
|
||||
| =colored= | ignored | no | checked | |
|
||||
| property | parser | stored | printer | notes |
|
||||
|----------------------+---------+--------+---------------------------------------------------------+------------------------------------------------------------------|
|
||||
| =state-labels= | checked | no | checked if =-Hk= | state labels are converted to transition labels when reading TωA |
|
||||
| =trans-labels= | checked | no | always, unless =-Hi= or =-Hk= | |
|
||||
| =implicit-labels= | checked | no | if =-Hi= | =-Hi= only works for deterministic automata |
|
||||
| =explicit-labels= | checked | no | always, unless =-Hi= | |
|
||||
| =state-acc= | checked | yes | checked, unless =-Ht= or =-Hm= | |
|
||||
| =trans-acc= | checked | no | if not =state-acc= and not =-Hm= | |
|
||||
| =no-univ-branch= | ignored | no | only if =-Hv= | |
|
||||
| =univ-branch= | checked | no | checked | |
|
||||
| =deterministic= | checked | yes | checked | |
|
||||
| =complete= | checked | no | checked | |
|
||||
| =unambiguous= | trusted | yes | as stored if (=-Hv= or not =deterministic=) | can be checked with =--check=unambiguous= |
|
||||
| =semi-deterministic= | trusted | yes | as stored if (=-Hv= or not =deterministic=) | can be checked with =--check=semi-deterministic= |
|
||||
| =stutter-invariant= | trusted | yes | as stored | can be checked with =--check=stuttering= |
|
||||
| =stutter-sensitive= | trusted | yes | as stored (opposite of =stutter-invariant=) | can be checked with =--check=stuttering= |
|
||||
| =terminal= | trusted | yes | as stored | can be checked with =--check=strength= |
|
||||
| =very-weak= | trusted | yes | as stored if (=-Hv= or not =terminal=) | can be checked with =--check=strength= |
|
||||
| =weak= | trusted | yes | as stored if (=-Hv= or not (=terminal= or =very-weak=)) | can be checked with =--check=strength= |
|
||||
| =inherently-weak= | trusted | yes | as stored if (=-Hv= or not =weak=) | can be checked with =--check=strength= |
|
||||
| =colored= | ignored | no | checked | |
|
||||
|
||||
The above table is for version 1 of the format. When version 1.1 is
|
||||
selected (using =-H1.1=), some negated properties may be output. In
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue