Revamp the multop interface to allow some basic optimizations like

not constructing a single-child multop.
* src/ltlast/multop.hh (multop::instance(type)): Remove.
(multop::instance(type, formula*, formula*)): Return a formula*.
(multop::instance(type, vec*)): Make it public and return a formula*.
(multop::add_sorted, multop::add):
* src/ltlast/multop.cc (multop::instance(type, vec*)): Rewrite.
(multop::instance(type)): Delete.
(multop::instance(type, formula*, formula*)): Adjust.
(multop::add_sorted, multop::add): Remove.
* src/ltlvisit/clone.cc (clone_visitor::visit(multop*)) Adjust.
* src/ltlvisit/nenoform.cc
(negative_normal_form_visitor::::visit(multop*)) Adjust.
* src/ltltest/equals.test: Make sure `a & a' and `a' are equals.
* wrap/python/tests/ltlsimple.py: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2003-08-10 16:29:49 +00:00
parent 317fed597b
commit de6314ed74
8 changed files with 123 additions and 98 deletions

View file

@ -67,8 +67,9 @@ namespace spot
{
// FIXME: Iterating on the successors this way (calling
// bdd_satone{,set} and NANDing out (-=) the result from a
// set) requires several descent of the BDD. Maybe it would be
// faster to compute all satisfying formula in one operation.
// set) requires several descents of the BDD. Maybe it would
// be faster to compute all satisfying formulae in one
// operation.
succ_set_left_ -= current_;
if (succ_set_left_ == bddfalse) // No more successors?