From 276f9108c6c77f355fccfaf778a23c2c768fc6ab Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 23 Mar 2013 17:19:50 +0100 Subject: [PATCH] ltl2tgta: Honor -x as well * src/bin/ltl2tgta.cc: Honor -x. * src/bin/man/ltl2tgta.x, src/bin/man/spot-x.x: Add cross references. --- src/bin/ltl2tgta.cc | 13 ++++++++++++- src/bin/man/ltl2tgta.x | 2 ++ src/bin/man/spot-x.x | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/bin/ltl2tgta.cc b/src/bin/ltl2tgta.cc index 35f4636f0..c7cbf6939 100644 --- a/src/bin/ltl2tgta.cc +++ b/src/bin/ltl2tgta.cc @@ -42,6 +42,7 @@ #include "taalgos/tgba2ta.hh" #include "taalgos/dotty.hh" #include "taalgos/minimize.hh" +#include "misc/optionmap.hh" const char argp_program_doc[] ="\ Translate linear-time formulas (LTL/PSL) into Testing Automata.\n\n\ @@ -78,6 +79,8 @@ static const argp_option options[] = { "utf8", '8', 0, 0, "enable UTF-8 characters in output", 0 }, /**************************************************/ { 0, 0, 0, 0, "Miscellaneous options:", -1 }, + { "extra-options", 'x', "OPTS", 0, + "fine-tuning options (see spot-x (7))", 0 }, { 0, 0, 0, 0, 0, 0 } }; @@ -94,6 +97,7 @@ ta_types ta_type = TGTA; bool utf8 = false; const char* stats = ""; +spot::option_map extra_options; bool opt_with_artificial_initial_state = true; bool opt_single_pass_emptiness_check = false; bool opt_with_artificial_livelock = false; @@ -110,6 +114,13 @@ parse_opt(int key, char* arg, struct argp_state*) case 'B': type = spot::postprocessor::BA; break; + case 'x': + { + const char* opt = extra_options.parse_options(arg); + if (opt) + error(2, 0, "failed to parse --options near '%s'", opt); + } + break; case OPT_TGTA: ta_type = TGTA; type = spot::postprocessor::TGBA; @@ -255,7 +266,7 @@ main(int argc, char** argv) spot::ltl::ltl_simplifier simpl(simplifier_options()); - spot::postprocessor postproc; + spot::postprocessor postproc(&extra_options); postproc.set_pref(pref); postproc.set_type(type); postproc.set_level(level); diff --git a/src/bin/man/ltl2tgta.x b/src/bin/man/ltl2tgta.x index e52ed1aed..05ae45973 100644 --- a/src/bin/man/ltl2tgta.x +++ b/src/bin/man/ltl2tgta.x @@ -2,3 +2,5 @@ ltl2tgta \- translate LTL/PSL formulas into Testing Automata [DESCRIPTION] .\" Add any additional description here +[SEE ALSO] +.BR spot-x (7) diff --git a/src/bin/man/spot-x.x b/src/bin/man/spot-x.x index c892e26d7..e459f2d1b 100644 --- a/src/bin/man/spot-x.x +++ b/src/bin/man/spot-x.x @@ -8,3 +8,4 @@ spot-x \- Common fine-tuning options. .\" Add any additional description here [SEE ALSO] .BR ltl2tgba (1) +.BR ltl2tgta (1)