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

5
NEWS
View file

@ -158,6 +158,11 @@ New in spot 1.1.4a (not relased)
Small or Deterministic. These can now be combined with Complete
as Any|Complete, Small|Complete, or Deterministic|Complete.
- operands of n-ary operators (like & and |) are now ordered so
that Boolean terms come first. This speeds up syntactic
implication checks slightly. Also, literals are now sorted
using strverscmp(), so that p5 comes before p12.
- All the parsers implemented in Spot now use the same type to
store locations.