speed up equivalence check for LTL formulas
With this patch reduc.test goes from 4:57 down to 4:06 on my laptop. * spot/tl/contain.cc (equal): Use are_isomorphic() before testing for containment. * spot/twaalgos/are_isomorphic.hh, spot/twaalgos/are_isomorphic.cc: (are_isomorphic): New static method.
This commit is contained in:
parent
2e15ed959d
commit
679be1d727
3 changed files with 39 additions and 14 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include <spot/tl/simplify.hh>
|
||||
#include <spot/tl/formula.hh>
|
||||
#include <spot/twaalgos/product.hh>
|
||||
#include <spot/twaalgos/are_isomorphic.hh>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -104,6 +105,12 @@ namespace spot
|
|||
bool
|
||||
language_containment_checker::equal(formula l, formula g)
|
||||
{
|
||||
if (l == g)
|
||||
return true;
|
||||
record_* rl = register_formula_(l);
|
||||
record_* rg = register_formula_(g);
|
||||
if (isomorphism_checker::are_isomorphic(rl->translation, rg->translation))
|
||||
return true;
|
||||
return contained(l, g) && contained(g, l);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue