Rationalize options for counter-example output.

* src/tgbatest/ltl2tgba.cc (main): Either replay the accepting
run or print it, but do not do both.
* src/tgbatest/emptchk.test: Adjust. I.e. use -C instead of -CR
when we expect the run to be displayed.
This commit is contained in:
Alexandre Duret-Lutz 2010-11-30 13:40:11 +01:00
parent ae03bc6704
commit 75a24111da
3 changed files with 44 additions and 27 deletions

View file

@ -1,3 +1,12 @@
2010-11-30 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Rationalize options for counter-example output.
* src/tgbatest/ltl2tgba.cc (main): Either replay the accepting
run or print it, but do not do both.
* src/tgbatest/emptchk.test: Adjust. I.e. use -C instead of -CR
when we expect the run to be displayed.
2010-11-30 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2010-11-30 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix a GCC 4.6 warning. Fix a GCC 4.6 warning.

View file

@ -54,9 +54,9 @@ expect_ce()
run 0 ../ltl2tgba -CR -eTau03_opt -f "$1" run 0 ../ltl2tgba -CR -eTau03_opt -f "$1"
run 0 ../ltl2tgba -CR -eGV04 -f "$1" run 0 ../ltl2tgba -CR -eGV04 -f "$1"
# Expect multiple accepting runs # Expect multiple accepting runs
test `../ltl2tgba -CR -e'CVWY90(repeated)' -l "$1" | test `../ltl2tgba -C -e'CVWY90(repeated)' -l "$1" |
grep Prefix: | wc -l` -ge $2 grep Prefix: | wc -l` -ge $2
test `../ltl2tgba -CR -e'SE05(repeated)' -l "$1" | test `../ltl2tgba -C -e'SE05(repeated)' -l "$1" |
grep Prefix: | wc -l` -ge $2 grep Prefix: | wc -l` -ge $2
} }
@ -80,9 +80,9 @@ expect_no()
run 0 ../ltl2tgba -CR -E'SE05(bsh=10M)' -f "$1" run 0 ../ltl2tgba -CR -E'SE05(bsh=10M)' -f "$1"
run 0 ../ltl2tgba -CR -ETau03_opt -f "$1" run 0 ../ltl2tgba -CR -ETau03_opt -f "$1"
run 0 ../ltl2tgba -CR -EGV04 -f "$1" run 0 ../ltl2tgba -CR -EGV04 -f "$1"
test `../ltl2tgba -CR -e'CVWY90(repeated)' -l "!($1)" | test `../ltl2tgba -C -e'CVWY90(repeated)' -l "!($1)" |
grep Prefix: | wc -l` -ge $2 grep Prefix: | wc -l` -ge $2
test `../ltl2tgba -CR -e'SE05(repeated)' -l "!($1)" | test `../ltl2tgba -C -e'SE05(repeated)' -l "!($1)" |
grep Prefix: | wc -l` -ge $2 grep Prefix: | wc -l` -ge $2
} }

View file

@ -1161,6 +1161,16 @@ main(int argc, char** argv)
delete run; delete run;
run = redrun; run = redrun;
} }
if (accepting_run_replay)
{
tm.start("replaying acc. run");
if (!spot::replay_tgba_run(std::cout, a,
run, true))
exit_code = 1;
tm.stop("replaying acc. run");
}
else
{
tm.start("printing accepting run"); tm.start("printing accepting run");
if (graph_run_opt) if (graph_run_opt)
{ {
@ -1169,22 +1179,20 @@ main(int argc, char** argv)
} }
else if (graph_run_tgba_opt) else if (graph_run_tgba_opt)
{ {
spot::tgba* ar = spot::tgba_run_to_tgba(a, run); spot::tgba* ar =
spot::tgba_run_to_tgba(a, run);
spot::dotty_reachable(std::cout, ar); spot::dotty_reachable(std::cout, ar);
delete ar; delete ar;
} }
else else
{ {
spot::print_tgba_run(std::cout, a, run); spot::print_tgba_run(std::cout, a, run);
if (accepting_run_replay
&& !spot::replay_tgba_run(std::cout, a, run,
true))
exit_code = 1;
} }
delete run; delete run;
tm.stop("printing accepting run"); tm.stop("printing accepting run");
} }
} }
}
else else
{ {
std::cout << "an accepting run exists " std::cout << "an accepting run exists "