Compare Boolean LTL formulae using BDDs.
* src/ltlvisit/simplify.cc (syntactic_implication): Here.
This commit is contained in:
parent
fea49630f6
commit
c9a659c8d4
1 changed files with 17 additions and 8 deletions
|
|
@ -2754,18 +2754,27 @@ namespace spot
|
|||
|
||||
bool result = false;
|
||||
|
||||
inf_left_recurse_visitor v1(f2, this);
|
||||
const_cast<formula*>(f1)->accept(v1);
|
||||
if (v1.result())
|
||||
if (f1->is_boolean() && f2->is_boolean())
|
||||
{
|
||||
result = true;
|
||||
bdd l = as_bdd(f1);
|
||||
bdd r = as_bdd(f2);
|
||||
result = ((l & r) == l);
|
||||
}
|
||||
else
|
||||
{
|
||||
inf_right_recurse_visitor v2(f1, this);
|
||||
const_cast<formula*>(f2)->accept(v2);
|
||||
if (v2.result())
|
||||
result = true;
|
||||
inf_left_recurse_visitor v1(f2, this);
|
||||
const_cast<formula*>(f1)->accept(v1);
|
||||
if (v1.result())
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
inf_right_recurse_visitor v2(f1, this);
|
||||
const_cast<formula*>(f2)->accept(v2);
|
||||
if (v2.result())
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Cache result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue