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
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -23,6 +23,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::optimization_level level = spot::postprocessor::High;
|
||||
|
||||
#define OPT_SMALL 1
|
||||
|
|
@ -37,6 +38,8 @@ static const argp_option options[] =
|
|||
{ "small", OPT_SMALL, 0, 0, "prefer small automata (default)", 0 },
|
||||
{ "deterministic", 'D', 0, 0, "prefer deterministic automata", 0 },
|
||||
{ "any", 'a', 0, 0, "no preference", 0 },
|
||||
{ "complete", 'C', 0, 0, "output a complete automaton (combine "
|
||||
"with other intents)", 0 },
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Optimization level:", 21 },
|
||||
{ "low", OPT_LOW, 0, 0, "minimal optimizations (fast)", 0 },
|
||||
|
|
@ -55,6 +58,9 @@ parse_opt_post(int key, char*, struct argp_state*)
|
|||
case 'a':
|
||||
pref = spot::postprocessor::Any;
|
||||
break;
|
||||
case 'C':
|
||||
comp = spot::postprocessor::Complete;
|
||||
break;
|
||||
case 'D':
|
||||
pref = spot::postprocessor::Deterministic;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
|
||||
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -28,6 +28,7 @@ extern const struct argp post_argp;
|
|||
|
||||
extern spot::postprocessor::output_type type;
|
||||
extern spot::postprocessor::output_pref pref;
|
||||
extern spot::postprocessor::output_pref comp;
|
||||
extern spot::postprocessor::optimization_level level;
|
||||
|
||||
#endif // SPOT_BIN_COMMON_FINPUT_HH
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ main(int argc, char** argv)
|
|||
jobs.push_back(job("-", true));
|
||||
|
||||
spot::postprocessor post(&extra_options);
|
||||
post.set_pref(pref);
|
||||
post.set_pref(pref | comp);
|
||||
post.set_type(type);
|
||||
post.set_level(level);
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ main(int argc, char** argv)
|
|||
program_name);
|
||||
|
||||
spot::translator trans(&extra_options);
|
||||
trans.set_pref(pref);
|
||||
trans.set_pref(pref | comp);
|
||||
trans.set_type(type);
|
||||
trans.set_level(level);
|
||||
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ main(int argc, char** argv)
|
|||
spot::ltl::ltl_simplifier simpl(simplifier_options());
|
||||
|
||||
spot::postprocessor postproc(&extra_options);
|
||||
postproc.set_pref(pref);
|
||||
postproc.set_pref(pref | comp);
|
||||
postproc.set_type(type);
|
||||
postproc.set_level(level);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue