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

@ -216,7 +216,7 @@ digraph G {
1 [label="1"]
1 -> 2 [label="!a & !b\n"]
1 -> 3 [label="a & !b\n"]
1 -> 4 [label="b & !a\n"]
1 -> 4 [label="!a & b\n"]
1 -> 5 [label="a & b\n"]
2 [label="2"]
2 -> 2 [label="!b\n"]
@ -224,7 +224,7 @@ digraph G {
3 [label="4", peripheries=2]
3 -> 2 [label="!a & !b\n{Acc[1]}"]
3 -> 3 [label="a & !b\n{Acc[1]}"]
3 -> 4 [label="b & !a\n{Acc[1]}"]
3 -> 4 [label="!a & b\n{Acc[1]}"]
3 -> 5 [label="a & b\n{Acc[1]}"]
4 [label="3", peripheries=2]
4 -> 4 [label="1\n{Acc[1]}"]