From 0e5f2d4819d97bd0c1a03bb4591b42b299b02107 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 9 Oct 2021 20:50:38 +0200 Subject: [PATCH] ltlsynt: --ins is optional but not its argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #481, reported by Michaƫl Cadilhac. * bin/ltlsynt.cc (argp_option): Remove erroneous OPTION_ARG_OPTIONAL. * tests/core/ltlsynt.test: Add test case. --- bin/ltlsynt.cc | 4 ++-- tests/core/ltlsynt.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ltlsynt.cc b/bin/ltlsynt.cc index a1eee92d8..62bbeeb47 100644 --- a/bin/ltlsynt.cc +++ b/bin/ltlsynt.cc @@ -63,9 +63,9 @@ static const argp_option options[] = { "outs", OPT_OUTPUT, "PROPS", 0, "comma-separated list of controllable (a.k.a. output) atomic" " propositions", 0}, - { "ins", OPT_INPUT, "PROPS", OPTION_ARG_OPTIONAL, + { "ins", OPT_INPUT, "PROPS", 0, "comma-separated list of controllable (a.k.a. output) atomic" - " propositions. If unspecified its the complement of \"outs\".", 0}, + " propositions", 0}, /**************************************************/ { nullptr, 0, nullptr, 0, "Fine tuning:", 10 }, { "algo", OPT_ALGO, "sd|ds|ps|lar|lar.old", 0, diff --git a/tests/core/ltlsynt.test b/tests/core/ltlsynt.test index f27b7280c..b7ebf0e7f 100644 --- a/tests/core/ltlsynt.test +++ b/tests/core/ltlsynt.test @@ -406,7 +406,7 @@ ltlsynt --outs=p0 -f '!XXF(p0 & (p0 M Gp0))' > out diff out exp f='Fp0 U XX((p0 & F!p1) | (!p0 & Gp1))' -ltlsynt --verbose --algo=ps --outs=p1 --ins=p0 -f "$f" -x"dpa-simul=1" 2>err +ltlsynt --verbose --algo=ps --outs p1 --ins p0 -f "$f" -x"dpa-simul=1" 2>err grep 'DPA has 13 states' err ltlsynt -x dpa-simul=0 --verbose --algo=ps --outs=p1 --ins=p0 -f "$f" 2>err grep 'DPA has 29 states' err