bin: factor handling of -B/-C/-D/... output options
* src/bin/common_post.cc: Handle the options for BA/TGBA/Monitor as well as Complete/SBAcc here, and in the same group. Rename "Translation intent" and "Optimization level" to "Simplification goal" and "Simplification level" so that it makes sense even in autfilt. * src/bin/autfilt.cc, src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc: Remove common code. * doc/org/autfilt.org, doc/org/dstar2tgba.org, doc/org/ltl2tgba.org: Adjust sed invocations.
This commit is contained in:
parent
dee73ee342
commit
71979840cb
7 changed files with 97 additions and 127 deletions
|
|
@ -193,44 +193,46 @@ This set of options controls the desired type of output automaton:
|
|||
autfilt --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: -B, --ba Büchi Automaton
|
||||
: -B, --ba Büchi Automaton (with state-based acceptance)
|
||||
: -C, --complete output a complete automaton
|
||||
: --generic Any acceptance is allowed (default)
|
||||
: -M, --monitor Monitor (accepts all finite prefixes of the given
|
||||
: property)
|
||||
: --tgba Transition-based Generalized Büchi Automaton
|
||||
: -S, --state-based-acceptance, --sbacc
|
||||
: define the acceptance using states
|
||||
: --tgba Transition-based Generalized Büchi Automaton
|
||||
|
||||
These options specifies desired properties:
|
||||
These options specify any simplification goal:
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
autfilt --help | sed -n '/Translation intent:/,/^$/p' | sed '1d;$d'
|
||||
autfilt --help | sed -n '/Simplification goal:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: -a, --any no preference, do not bother making it small or
|
||||
: deterministic (default)
|
||||
: -C, --complete output a complete automaton (combine with other
|
||||
: intents)
|
||||
: deterministic
|
||||
: -D, --deterministic prefer deterministic automata
|
||||
: --small prefer small automata
|
||||
: -S, --state-based-acceptance, --sbacc
|
||||
: define the acceptance using states
|
||||
|
||||
Finally, the following switches control the amount of effort applied
|
||||
to reach the desired properties:
|
||||
toward the desired goal:
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
autfilt --help | sed -n '/Optimization level:/,/^$/p' | sed '1d;$d'
|
||||
autfilt --help | sed -n '/Simplification level:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: --high all available optimizations (slow)
|
||||
: --low minimal optimizations (fast, default)
|
||||
: --low minimal optimizations (fast)
|
||||
: --medium moderate optimizations
|
||||
|
||||
|
||||
By default, =--any --low= is used, which cause all simplifications to
|
||||
be skipped. If you want to reduce the size of the automaton, try
|
||||
=--small --high= and if you want to try to make it deterministic
|
||||
(their is to guaranty of result, this is only a preference), try
|
||||
=--deterministic --high=.
|
||||
be skipped. However if any goal is given, than the simplification level
|
||||
defaults to =--high= (unless specified otherwise). If a simplification
|
||||
level is given without specifying any goal, then the goal default to =--small=.
|
||||
|
||||
So if you want to reduce the size of the automaton, try =--small= and
|
||||
if you want to try to make (or keep) it deterministic (there is to
|
||||
guaranty of result, this is only a preference) try =--deterministic=.
|
||||
|
||||
* Transformations
|
||||
|
||||
|
|
@ -245,6 +247,8 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
|
|||
--cleanup-acceptance remove unused acceptance sets from the automaton
|
||||
--cnf-acceptance put the acceptance condition in Conjunctive Normal
|
||||
Form
|
||||
--complement complement each automaton (currently support only
|
||||
deterministic automata)
|
||||
--complement-acceptance complement the acceptance condition (without
|
||||
touching the automaton)
|
||||
--destut allow less stuttering
|
||||
|
|
@ -263,7 +267,11 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
|
|||
sets
|
||||
--merge-transitions merge transitions with same destination and
|
||||
acceptance
|
||||
--product=FILENAME build the product with the automaton in FILENAME
|
||||
--product=FILENAME, --product-and=FILENAME
|
||||
build the product with the automaton in FILENAME
|
||||
to intersect languages
|
||||
--product-or=FILENAME build the product with the automaton in FILENAME
|
||||
to sum languages
|
||||
--randomize[=s|t] randomize states and transitions (specify 's' or
|
||||
't' to randomize only states or transitions)
|
||||
--remove-ap=AP[=0|=1][,AP...]
|
||||
|
|
@ -276,6 +284,8 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
|
|||
--remove-unreachable-states
|
||||
remove states that are unreachable from the
|
||||
initial state
|
||||
--sat-minimize[=options] minimize the automaton using a SAT solver
|
||||
(only work for deterministic automata)
|
||||
--separate-sets if both Inf(x) and Fin(x) appear in the acceptance
|
||||
condition, replace Fin(x) by a new Fin(y) and
|
||||
adjust the automaton
|
||||
|
|
|
|||
|
|
@ -324,21 +324,23 @@ dstar2tgba --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d'
|
|||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: -B, --ba Büchi Automaton
|
||||
: -B, --ba Büchi Automaton (implies -S)
|
||||
: -C, --complete output a complete automaton
|
||||
: -M, --monitor Monitor (accepts all finite prefixes of the given
|
||||
: formula)
|
||||
: --tgba Transition-based Generalized Büchi Automaton
|
||||
: property)
|
||||
: -S, --state-based-acceptance, --sbacc
|
||||
: define the acceptance using states
|
||||
: --tgba Transition-based Generalized Büchi Automaton
|
||||
: (default)
|
||||
|
||||
And these may be refined by a translation intent, should the
|
||||
And these may be refined by a simplification goal, should the
|
||||
post-processor routine had a choice to make:
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
dstar2tgba --help | sed -n '/Translation intent:/,/^$/p' | sed '1d;$d'
|
||||
dstar2tgba --help | sed -n '/Simplification goal:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: -a, --any no preference
|
||||
: -C, --complete output a complete automaton (combine with other
|
||||
: intents)
|
||||
: -a, --any no preference, do not bother making it small or
|
||||
: deterministic
|
||||
: -D, --deterministic prefer deterministic automata
|
||||
: --small prefer small automata (default)
|
||||
|
||||
|
|
@ -346,7 +348,7 @@ The effort put into post-processing can be limited with the =--low= or
|
|||
=--medium= options:
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
dstar2tgba --help | sed -n '/Optimization level:/,/^$/p' | sed '1d;$d'
|
||||
dstar2tgba --help | sed -n '/Simplification level:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: --high all available optimizations (slow, default)
|
||||
|
|
|
|||
|
|
@ -405,22 +405,18 @@ ltl2tgba -s --lenient '(a < b) U (process[2]@ok)'
|
|||
* Do you favor deterministic or small automata?
|
||||
|
||||
The translation procedure can be controled by a few switches. A first
|
||||
set of options specifies the intent of the translation: whenever
|
||||
possible, would you prefer a small automaton (=--small=) or a
|
||||
set of options specifies the goal of the simplification routines:
|
||||
whenever possible, would you prefer a small automaton (=--small=) or a
|
||||
deterministic (=--deterministic=) automaton?
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
ltl2tgba --help | sed -n '/Translation intent:/,/^$/p' | sed '1d;$d'
|
||||
ltl2tgba --help | sed -n '/Simplification goal:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: -a, --any no preference, do not bother making it small or
|
||||
: deterministic
|
||||
: -C, --complete output a complete automaton (combine with other
|
||||
: intents)
|
||||
: -D, --deterministic prefer deterministic automata
|
||||
: --small prefer small automata (default)
|
||||
: -U, --unambiguous output unambiguous automata (combine with other
|
||||
: intents)
|
||||
|
||||
The =--any= option tells the translator that it should attempt to
|
||||
reduce or produce a deterministic result result: any automaton
|
||||
|
|
@ -641,7 +637,7 @@ 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:
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
ltl2tgba --help | sed -n '/Optimization level:/,/^$/p' | sed '1d;$d'
|
||||
ltl2tgba --help | sed -n '/Simplification level:/,/^$/p' | sed '1d;$d'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: --high all available optimizations (slow, default)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue