postproc: add a SBAcc option

Producing state-based acceptance is now part of the postprocessing
routines.  That means we can more easily simplify automata with
state-based acceptance (using autfilt -S --small --high, for instance)
and as as side-effect, ltl2tgba can produce GBA.  However the result of
ltl2tgba -S is often larger than that of ltl2tgba -B.

* src/twaalgos/postproc.cc, src/twaalgos/postproc.hh: Implement
the SBAcc option.
* src/bin/common_post.cc, src/bin/common_post.hh: Implement -S.
* src/bin/autfilt.cc, src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc,
src/bin/ltl2tgta.cc, src/bin/ltldo.cc: Adjust.
* src/tests/sim3.test: Augment test case.
* NEWS, doc/org/ltl2tgba.org, doc/org/autfilt.org: Document it -S.
This commit is contained in:
Alexandre Duret-Lutz 2015-05-14 20:04:50 +02:00
parent dd87bdf868
commit 0786e068ae
13 changed files with 181 additions and 42 deletions

View file

@ -24,6 +24,7 @@
spot::postprocessor::output_type type = spot::postprocessor::TGBA;
spot::postprocessor::output_pref pref = spot::postprocessor::Small;
spot::postprocessor::output_pref comp = spot::postprocessor::Any;
spot::postprocessor::output_pref sbacc = spot::postprocessor::Any;
spot::postprocessor::optimization_level level = spot::postprocessor::High;
enum {
@ -43,6 +44,9 @@ static const argp_option options[] =
"or deterministic", 0 },
{ "complete", 'C', 0, 0, "output a complete automaton (combine "
"with other intents)", 0 },
{ "state-based-acceptance", 'S', 0, 0,
"define the acceptance using states", 0 },
{ "sbacc", 0, 0, OPTION_ALIAS, 0, 0 },
/**************************************************/
{ 0, 0, 0, 0, "Optimization level:", 21 },
{ "low", OPT_LOW, 0, 0, "minimal optimizations (fast)", 0 },
@ -62,6 +66,9 @@ static const argp_option options_disabled[] =
"or deterministic (default)", 0 },
{ "complete", 'C', 0, 0, "output a complete automaton (combine "
"with other intents)", 0 },
{ "state-based-acceptance", 'S', 0, 0,
"define the acceptance using states", 0 },
{ "sbacc", 0, 0, OPTION_ALIAS, 0, 0 },
/**************************************************/
{ 0, 0, 0, 0, "Optimization level:", 21 },
{ "low", OPT_LOW, 0, 0, "minimal optimizations (fast, default)", 0 },
@ -86,6 +93,9 @@ parse_opt_post(int key, char*, struct argp_state*)
case 'D':
pref = spot::postprocessor::Deterministic;
break;
case 'S':
sbacc = spot::postprocessor::SBAcc;
break;
case OPT_HIGH:
level = spot::postprocessor::High;
simplification_level = 3;