Use bdd_implies() to speedup various algorithms.

* src/ltlvisit/simplify.cc, src/tgba/tgbaproduct.cc,
src/tgba/tgbatba.cc, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/simulation.cc: Here.
This commit is contained in:
Alexandre Duret-Lutz 2012-06-13 21:16:33 +02:00
parent 821d5e54b7
commit 484ea488c3
5 changed files with 13 additions and 21 deletions

View file

@ -1,5 +1,5 @@
// Copyright (C) 2009, 2011 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie.
@ -319,7 +319,7 @@ namespace spot
{
assert(bdd_high(tmp) == bddfalse);
int var = bdd_var(tmp);
if ((bdd_nithvar(var) & rna) == rna)
if (bdd_implies(rna, bdd_nithvar(var)))
{
int varclone = dict_->register_clone_acc(var, this);
bdd_setpair(right_common_acc_, var, varclone);

View file

@ -241,11 +241,11 @@ namespace spot
--prev;
bdd common = aut->
common_acceptance_conditions_of_original_state(rs);
if ((common & *prev) == *prev)
if (bdd_implies(*prev, common))
{
bdd u = aut->
union_acceptance_conditions_of_original_state(odest);
if ((u & *prev) != *prev)
if (!bdd_implies(*prev, u))
acc -= *prev;
}
}
@ -279,7 +279,7 @@ namespace spot
// acceptance sets common to the outgoing transition of
// the destination state.
acc |= otheracc;
while (next != cycle.end() && (acc & *next) == *next)
while (next != cycle.end() && bdd_implies(*next, acc))
++next;
if (next != cycle.end())
{
@ -291,7 +291,7 @@ namespace spot
accepting = true;
// Skip as much acceptance conditions as we can on our cycle.
next = cycle.begin();
while (next != expected && (acc & *next) == *next)
while (next != expected && bdd_implies(*next, acc))
++next;
next_is_set:
state_tba_proxy* dest =