Arrange multops so that Boolean arguments come first.

This helps recursive implication checks.  Also order
atomic propositions with strverscmp().

* src/ltlast/formula.hh (formula_ptr_less_than_multop,
is_literal, atomic_prop_cmp): New.
* src/ltlast/formula.cc (is_literal, atomic_prop_cmp): Implement them.
* src/ltlast/multop.cc: Use formula_ptr_less_than_multop.
* src/ltltest/isop.test, src/ltltest/ltlfilt.test,
src/tgbatest/det.test, src/tgbatest/dstar.test,
src/tgbatest/explicit.test, src/tgbatest/explpro2.test,
src/tgbatest/explpro3.test, src/tgbatest/explprod.test,
src/tgbatest/nondet.test, src/tgbatest/tripprod.test: Adjust tests.
* NEWS: Mention the new order.
This commit is contained in:
Alexandre Duret-Lutz 2012-06-20 14:45:25 +02:00
parent 1f384c2c63
commit 536e45b342
14 changed files with 143 additions and 57 deletions

View file

@ -43,13 +43,7 @@ acc = "p2" "p3";
"s1 * s1", "s3 * s3", "a & !b", "p3";
EOF
run 0 ../explprod input1 input2 > stdout
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
sed 's/"p3" "p2"/"p2" "p3"/g;s/!b & a/a \& !b/g;
s/b & !a/!a \& b/g' stdout > tmp_ && mv tmp_ stdout
cat stdout
run 0 ../explprod input1 input2 |
sed 's/"p3" "p2"/"p2" "p3"/g' | tee stdout
diff stdout expected
rm input1 input2 stdout expected