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,4 +1,4 @@
// Copyright (C) 2009, 2010, 2011 Laboratoire de Recherche et
// Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -142,8 +142,7 @@ namespace spot
// and we want to find that 'a' and 'b' are useless because
// they always occur with 'c'.
// The way we check if 'a' is useless that is to look whether
// USEFUL & (x -> a) == USEFUL for some other acceptance
// condition x.
// USEFUL implies (x -> a) for some other acceptance condition x.
bdd allconds = bdd_support(negall);
bdd allcondscopy = allconds;
bdd useless = bddtrue;
@ -157,7 +156,7 @@ namespace spot
bdd x = bdd_ithvar(bdd_var(others));
if (x != a)
{
if ((useful & (x >> a)) == useful)
if (bdd_implies(useful, x >> a))
{
// a is useless
useful = bdd_exist(useful, a);