Add a class to represent Transition-based Alternating Automata (TAA).
* misc/Makefile.am, misc/bbop.cc, misc/bddop.hh: Factorize some code on BDDs to compute all_acceptance_conditions from neg_acceptance_condition. * src/tgba/Makefile.am, src/tgbatest/Makefile.am: Adjust. * src/tgba/taa.cc, src/tgba/taa.hh: The TAA class. * src/tgba/tgbaexplicit.hh: Use the factorized code in bddop.hh. * src/tgbatest/taa.cc, src/tgbatest/taa.test: Some test cases.
This commit is contained in:
parent
98215ed9a4
commit
20c1f01e48
11 changed files with 780 additions and 19 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "ltlvisit/destroy.hh"
|
||||
#include "tgbaexplicit.hh"
|
||||
#include "tgba/formula2bdd.hh"
|
||||
#include "misc/bddop.hh"
|
||||
#include <cassert>
|
||||
|
||||
namespace spot
|
||||
|
|
@ -383,25 +384,8 @@ namespace spot
|
|||
{
|
||||
if (!all_acceptance_conditions_computed_)
|
||||
{
|
||||
bdd all = bddfalse;
|
||||
|
||||
// Build all_acceptance_conditions_ from neg_acceptance_conditions_
|
||||
// I.e., transform !A & !B & !C into
|
||||
// A & !B & !C
|
||||
// + !A & B & !C
|
||||
// + !A & !B & C
|
||||
bdd cur = neg_acceptance_conditions_;
|
||||
while (cur != bddtrue)
|
||||
{
|
||||
assert(cur != bddfalse);
|
||||
|
||||
bdd v = bdd_ithvar(bdd_var(cur));
|
||||
all |= v & bdd_exist(neg_acceptance_conditions_, v);
|
||||
|
||||
assert(bdd_high(cur) != bddtrue);
|
||||
cur = bdd_low(cur);
|
||||
}
|
||||
all_acceptance_conditions_ = all;
|
||||
all_acceptance_conditions_ =
|
||||
compute_all_acceptance_conditions(neg_acceptance_conditions_);
|
||||
all_acceptance_conditions_computed_ = true;
|
||||
}
|
||||
return all_acceptance_conditions_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue