* src/tgba/tgbaproduct.cc: Fix computation of common acceptance

conditions.
This commit is contained in:
Alexandre Duret-Lutz 2006-07-19 16:07:54 +00:00
parent c412cd4cc3
commit 8cbec95253
2 changed files with 23 additions and 7 deletions

View file

@ -1,5 +1,17 @@
2006-07-19 Alexandre Duret-Lutz <adl@src.lip6.fr> 2006-07-19 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgba/tgbaproduct.cc: Fix computation of common acceptance
conditions.
* src/tgba/bdddict.cc, src/tgba/bdddict.cc (register_clone_acc):
New function.
* src/tgba/tgbaproduct.cc, src/tgba/tgbaproduct.hh: Use it to
distinguish acceptance conditions that are identical in both
operands.
* src/tgbatest/explpro4.test: New file.
* src/tgbatest/explpro2.test, src/tgbatest/Makefile.am: Adjust.
* src/tgbaalgos/ltl2tgba_fm.cc (language_containment_checker): Move ... * src/tgbaalgos/ltl2tgba_fm.cc (language_containment_checker): Move ...
* src/ltlvisit/contain.cc, src/ltlvisit/contain.hh * src/ltlvisit/contain.cc, src/ltlvisit/contain.hh
(spot::ltl::language_containment_checker): ... in these new files. (spot::ltl::language_containment_checker): ... in these new files.

View file

@ -182,14 +182,18 @@ namespace spot
bdd rna = right_->neg_acceptance_conditions(); bdd rna = right_->neg_acceptance_conditions();
right_common_acc_ = bdd_newpair(); right_common_acc_ = bdd_newpair();
bdd common = bdd_exist(lna, bdd_exist(lna, rna));
while (common != bddtrue) bdd tmp = lna;
while (tmp != bddtrue)
{ {
assert(bdd_high(common) == bddfalse); assert(bdd_high(tmp) == bddfalse);
int var = bdd_var(common); int var = bdd_var(tmp);
int varclone = dict_->register_clone_acc(var, this); if ((bdd_nithvar(var) & rna) == rna)
bdd_setpair(right_common_acc_, var, varclone); {
common = bdd_low(common); int varclone = dict_->register_clone_acc(var, this);
bdd_setpair(right_common_acc_, var, varclone);
}
tmp = bdd_low(tmp);
} }
bdd lac = left_->all_acceptance_conditions(); bdd lac = left_->all_acceptance_conditions();