Commit 9a4da5ff authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/tgbaalgos/ltl2tgba.cc (ltl_trad_visitor::visit(multop)):

Forward root_ to children of And.
(ltl_trad_visitor::recurse): Take a root argument.
parent b963af66
2003-07-10 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/tgbaalgos/ltl2tgba.cc (ltl_trad_visitor::visit(multop)):
Forward root_ to children of And.
(ltl_trad_visitor::recurse): Take a root argument.
* src/tgba/tgbabddconcretefactory.hh
(tgba_bdd_concrete_factory::add_relation): Rename as ...
(tgba_bdd_concrete_factory::constrain_relation): ... this.
......
......@@ -191,11 +191,17 @@ namespace spot
visit(const multop* node)
{
int op = -1;
bool root = false;
switch (node->op())
{
case multop::And:
op = bddop_and;
res_ = bddtrue;
// When the root formula is a conjunction it's ok to
// consider all children as root formulae. This allows the
// root-G trick to save many more variable. (See the
// translation of G.)
root = root_;
break;
case multop::Or:
op = bddop_or;
......@@ -206,14 +212,14 @@ namespace spot
unsigned s = node->size();
for (unsigned n = 0; n < s; ++n)
{
res_ = bdd_apply(res_, recurse(node->nth(n)), op);
res_ = bdd_apply(res_, recurse(node->nth(n), root), op);
}
}
bdd
recurse(const formula* f)
recurse(const formula* f, bool root = false)
{
ltl_trad_visitor v(fact_);
ltl_trad_visitor v(fact_, root);
f->accept(v);
return v.result();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment