* src/tgba/tgbaexplicit.cc (tgba_explicit::all_accepting_conditions)

Compute all_accepting_conditions_ from neg_accepting_conditions_,
not by browsing the dictionary.  The dictionary also contains
accepting conditions from other automata...  This bug was a
consequence of the change from 2003-07-14.
* src/tgbaalgos/save.cc (save_bfs::start()): Likewise, do not
browse the dictionary to print accepting conditions.  Call
->all_accepting_conditions() instead.
* src/tgba/tgbaproduct.cc (tgba_product::tgba_product): Typo
from 2003-08-22 in the computation of all_accepting_conditions_.
* src/tgbatest/explpro3.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add explpro3.test.
* src/tgbatest/explprod.test, src/tgbatest/explpro2.test,
 src/tgbatest/tripprod.test: Sort the output using Perl.
This commit is contained in:
Alexandre Duret-Lutz 2003-08-29 15:48:23 +00:00
parent 1955150999
commit 6da1f35641
9 changed files with 108 additions and 34 deletions

View file

@ -307,11 +307,22 @@ namespace spot
if (!all_accepting_conditions_computed_)
{
bdd all = bddfalse;
bdd_dict::fv_map::const_iterator i;
for (i = dict_->acc_map.begin(); i != dict_->acc_map.end(); ++i)
// Build all_accepting_conditions_ from neg_accepting_conditions_
// I.e., transform !A & !B & !C into
// A & !B & !C
// + !A & B & !C
// + !A & !B & C
bdd cur = neg_accepting_conditions_;
while (cur != bddtrue)
{
bdd v = bdd_ithvar(i->second);
assert(cur != bddfalse);
bdd v = bdd_ithvar(bdd_var(cur));
all |= v & bdd_exist(neg_accepting_conditions_, v);
assert(bdd_high(cur) != bddtrue);
cur = bdd_low(cur);
}
all_accepting_conditions_ = all;
all_accepting_conditions_computed_ = true;

View file

@ -154,9 +154,9 @@ namespace spot
right_acc_complement_ = bdd_exist(rna, bdd_support(lna));
all_accepting_conditions_ = ((left_->all_accepting_conditions()
& left_acc_complement_)
& right_acc_complement_)
| (right_->all_accepting_conditions()
& right_acc_complement_));
& left_acc_complement_));
neg_accepting_conditions_ = lna & rna;
dict_->register_all_variables_of(&left_, this);