postproc: Add option to output Complete automata.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Tweak set_pref() to also accept Any|Complete, Small|Complete, or Deterministic|Complete. * src/bin/common_post.hh, src/bin/common_post.cc: Add option --complete and set comp. * src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc: Pass comp to set_pref(). * src/tgbaalgos/complete.cc: Preserve state-based acceptance. * src/tgbatest/dstar.test, src/tgbatest/ltlcross2.test, src/tgbatest/nondet.test: Augment tests. * doc/org/dstar2tgba.org, doc/org/ltl2tgba.org, NEWS: Document.
This commit is contained in:
parent
b31facffb1
commit
1ab46b0864
14 changed files with 139 additions and 49 deletions
|
|
@ -274,6 +274,8 @@ dstar2tgba --help | sed -n '/Translation intent:/,/^$/p' | sed '1d;$d'
|
|||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: -a, --any no preference
|
||||
: -C, --complete output a complete automaton (combine with other
|
||||
: intents)
|
||||
: -D, --deterministic prefer deterministic automata
|
||||
: --small prefer small automata (default)
|
||||
|
||||
|
|
@ -327,8 +329,8 @@ For instance here is a complex command that will
|
|||
|
||||
The statistics displayed in this case are: =%S=, the number of states
|
||||
of the input (Rabin) automaton, =%s=, the number of states of the
|
||||
output (Büchi) automaton, and =%d=, whether the output automaton is
|
||||
deterministic or not.
|
||||
output (Büchi) automaton, =%d=, whether the output automaton is
|
||||
deterministic, and =%p= whether the automaton is complete.
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
randltl -n -1 --tree-size=10..15 a b c |
|
||||
|
|
@ -338,40 +340,42 @@ while read f; do
|
|||
echo "$f"
|
||||
ltlfilt -l -f "$f" |
|
||||
ltl2dstar --ltl2nba=spin:../../src/bin/ltl2tgba@-sD - - |
|
||||
dstar2tgba -B --stats=' DRA: %Sst.; BA: %sst.; det.? %d'
|
||||
dstar2tgba -B --stats=' DRA: %Sst.; BA: %sst.; det.? %d; complete? %p'
|
||||
done
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
F(a | !b)
|
||||
DRA: 2st.; BA: 2st.; det.? 1
|
||||
DRA: 2st.; BA: 2st.; det.? 1; complete? 1
|
||||
Fa | (Xc U (c & Xc))
|
||||
DRA: 5st.; BA: 5st.; det.? 1
|
||||
DRA: 5st.; BA: 5st.; det.? 1; complete? 1
|
||||
X(((!b & XGc) | (b & XF!c)) U (!a & ((!b & XGc) | (b & XF!c))))
|
||||
DRA: 8st.; BA: 7st.; det.? 1
|
||||
DRA: 8st.; BA: 7st.; det.? 1; complete? 0
|
||||
!b | !a
|
||||
DRA: 3st.; BA: 2st.; det.? 1
|
||||
DRA: 3st.; BA: 2st.; det.? 1; complete? 0
|
||||
F!a
|
||||
DRA: 2st.; BA: 2st.; det.? 1
|
||||
DRA: 2st.; BA: 2st.; det.? 1; complete? 1
|
||||
F(Ga R (b | Ga))
|
||||
DRA: 10st.; BA: 10st.; det.? 0
|
||||
DRA: 10st.; BA: 10st.; det.? 0; complete? 0
|
||||
!c U (!c & !a)
|
||||
DRA: 3st.; BA: 2st.; det.? 1
|
||||
DRA: 3st.; BA: 2st.; det.? 1; complete? 0
|
||||
!c | FGb
|
||||
DRA: 4st.; BA: 5st.; det.? 0
|
||||
DRA: 4st.; BA: 5st.; det.? 0; complete? 0
|
||||
G(c U a)
|
||||
DRA: 4st.; BA: 3st.; det.? 1
|
||||
DRA: 4st.; BA: 3st.; det.? 1; complete? 0
|
||||
c & Gb
|
||||
DRA: 3st.; BA: 2st.; det.? 1
|
||||
DRA: 3st.; BA: 2st.; det.? 1; complete? 0
|
||||
#+end_example
|
||||
|
||||
An important point you should be aware of when comparing these numbers
|
||||
of states is that the deterministic automata produced by =ltl2dstar=
|
||||
are complete, while the automata produced by =dstar2tgba=
|
||||
(deterministic or not) are not complete. This can explain a
|
||||
difference of one state (the "sink" state, which is not output by
|
||||
=dstar2tgba=).
|
||||
(deterministic or not) are not complete by default. This can explain
|
||||
a difference of one state (the so called "sink" state).
|
||||
|
||||
You can instruct =dstar2tgba= to output a complete automaton using the
|
||||
=--complete= option (or =-C= for short).
|
||||
|
||||
** Conversion from Rabin and Streett to TGBA
|
||||
|
||||
|
|
|
|||
|
|
@ -319,6 +319,8 @@ ltl2tgba --help | sed -n '/Translation intent:/,/^$/p' | sed '1d;$d'
|
|||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: -a, --any no preference
|
||||
: -C, --complete output a complete automaton (combine with other
|
||||
: intents)
|
||||
: -D, --deterministic prefer deterministic automata
|
||||
: --small prefer small automata (default)
|
||||
|
||||
|
|
@ -473,6 +475,11 @@ You can augment the number of terms in the disjunction to magnify the
|
|||
difference. For N terms, the =--small= automaton has N+1 states,
|
||||
while the =--deterministic= automaton needs 2^N-1 states.
|
||||
|
||||
Add the =--complete= option if you want to obtain a complete
|
||||
automaton, with a sink state capturing that rejected words that would
|
||||
not otherwise have a run in the output automaton.
|
||||
|
||||
|
||||
A last parameter that can be used to tune the translation is the amount
|
||||
of pre- and post-processing performed. These two steps can be adjusted
|
||||
via a common set of switches:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue