homogenize dstar_parse() and parse_aut() outputs

* src/dstarparse/dstarparse.yy, src/dstarparse/dstarscan.ll
src/dstarparse/parsedecl.hh, src/dstarparse/public.hh:
Adjust to return the same return types as parse_aut.
* src/dstarparse/fmterror.cc: Delete, we can use
the one of parse_aut.
* src/dstarparse/Makefile.am: Adjust.
* src/tests/ikwiad.cc, src/bin/dstar2tgba.cc,
src/bin/ltldo.cc: Adjust usage.
* src/bin/ltlcross.cc: The the result of dstar_parse() as-is, now that
it is a TωA like those produced by parse_aut().  As a consequence,
get rid of all the code storing statistics about the input
automaton.
* src/tests/ltlcross3.test, src/tests/ltl2dstar.test: Adjust expected
CSV output.
* doc/org/ltlcross.org, src/bin/man/ltlcross.x: Adjust to not
mention that %D performs a tranformation to Büchi.
This commit is contained in:
Alexandre Duret-Lutz 2015-08-20 22:33:25 +02:00
parent 62f5b9769b
commit f831f729e1
14 changed files with 61 additions and 231 deletions

View file

@ -598,7 +598,7 @@ checked_main(int argc, char** argv)
{
tm.start("reading -P's argument");
spot::dstar_parse_error_list pel;
spot::parse_aut_error_list pel;
auto daut = spot::parse_aut(argv[formula_index] + 2, pel,
dict, env, debug_opt);
if (spot::format_parse_aut_errors(std::cerr,
@ -961,11 +961,11 @@ checked_main(int argc, char** argv)
{
case ReadDstar:
{
spot::dstar_parse_error_list pel;
spot::parse_aut_error_list pel;
tm.start("parsing dstar");
auto daut = spot::dstar_parse(input, pel, dict, env, debug_opt);
tm.stop("parsing dstar");
if (spot::format_dstar_parse_errors(std::cerr, input, pel))
if (spot::format_parse_aut_errors(std::cerr, input, pel))
return 2;
tm.start("dstar2tgba");
if (nra2nba)
@ -984,7 +984,7 @@ checked_main(int argc, char** argv)
break;
case ReadHoa:
{
spot::dstar_parse_error_list pel;
spot::parse_aut_error_list pel;
tm.start("parsing hoa");
auto daut = spot::parse_aut(input, pel, dict, env, debug_opt);
tm.stop("parsing hoa");

View file

@ -57,12 +57,6 @@ $ltlcross -F - -f 'GFa & GFb & GFc' -f '(GFa -> GFb) & (GFc -> GFd)' \
"ltl2dstar $STR --ltl2nba=spin:$ltl2tgba@-s %L - | $dstar2tgba --low -s >%N" \
--csv=out.csv
grep '"in_type"' out.csv
grep '"DSA"' out.csv
grep '"DRA"' out.csv
grep ',,,,' out.csv
# A bug in ltlcross <=1.2.5 caused it to not use the complement of the
# negative automaton. So running ltlcross with GFa would check one
# complement (the positive one), but running with FGa would ignore

View file

@ -138,7 +138,7 @@ echo "$first" > bug.txt
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%D' \
-f 'X a' --csv=out.csv --save-bogus='>>bug.txt' 2>stderr
q=`sed 's/[^,]//g;q' out.csv | wc -c`
test $q -eq `expr $p + 5`
test $q -eq `expr $p - 1`
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
test `grep 'error:.*returned exit code 1' stderr | wc -l` -eq 2