postproc: add the possibility to output a monitor
* src/tgbaalgos/stripacc.cc, src/tgbaalgos/stripacc.hh: New files. * src/tgbaalgos/Makefile.am: Add them. * src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Add a Monitor output option. * src/bin/ltl2tgba.cc: Add a --monitor/-M option. * NEWS: Mention monitors. * src/tgba/tgbaexplicit.hh (is_accepting_state): Fix for the case where the automaton has no acceptance set.
This commit is contained in:
parent
5f6c262ae5
commit
76787b23c0
8 changed files with 169 additions and 15 deletions
|
|
@ -56,10 +56,12 @@ If multiple formulas are supplied, several automata will be output.";
|
|||
static const argp_option options[] =
|
||||
{
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Automaton type:", 2 },
|
||||
{ 0, 0, 0, 0, "Output automaton type:", 2 },
|
||||
{ "tgba", OPT_TGBA, 0, 0,
|
||||
"Transition-based Generalized Büchi Automaton (default)", 0 },
|
||||
{ "ba", 'B', 0, 0, "Büchi Automaton", 0 },
|
||||
{ "monitor", 'M', 0, 0, "Monitor (accepts all finite prefixes "
|
||||
"of the given formula)", 0 },
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Output format:", 3 },
|
||||
{ "dot", OPT_DOT, 0, 0, "GraphViz's format (default)", 0 },
|
||||
|
|
@ -116,9 +118,13 @@ parse_opt(int key, char* arg, struct argp_state*)
|
|||
case 'B':
|
||||
type = spot::postprocessor::BA;
|
||||
break;
|
||||
case 'M':
|
||||
type = spot::postprocessor::Monitor;
|
||||
break;
|
||||
case 's':
|
||||
format = Spin;
|
||||
type = spot::postprocessor::BA;
|
||||
if (type != spot::postprocessor::Monitor)
|
||||
type = spot::postprocessor::BA;
|
||||
break;
|
||||
case OPT_DOT:
|
||||
format = Dot;
|
||||
|
|
@ -209,7 +215,8 @@ namespace
|
|||
{
|
||||
case Dot:
|
||||
spot::dotty_reachable(std::cout, aut,
|
||||
type == spot::postprocessor::BA);
|
||||
(type == spot::postprocessor::BA)
|
||||
|| (type == spot::postprocessor::Monitor));
|
||||
break;
|
||||
case Lbtt:
|
||||
spot::lbtt_reachable(std::cout, aut);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue