Simplify {b && {r1:...:rn}} as {b && r1 && ... && rn}.

* src/ltlvisit/simplify.cc (simplify_visitor): Do it.
* src/ltltest/reduccmp.test: Add a test.
* doc/tl/tl.tex: Document it.
* src/ltlast/multop.cc: Fix the computation of is.accepting_eword
for Fusion.  The Fusion operator never accepts [*0].
This commit is contained in:
Alexandre Duret-Lutz 2011-12-01 17:48:15 +01:00
parent 77084747b9
commit d0cfd44ba6
4 changed files with 28 additions and 2 deletions

View file

@ -1944,7 +1944,28 @@ namespace spot
*i = 0;
break;
}
case formula::MultOp:
{
multop* r = down_cast<multop*>(*i);
switch (r->op())
{
case multop::Fusion:
{
//b && {r1:..:rn} = b && r1 && .. && rn
unsigned rs = r->size();
for (unsigned j = 0; j < rs; ++j)
ares->push_back(r->nth(j)->clone());
r->destroy();
*i = 0;
break;
}
default:
goto common;
}
break;
}
default:
common:
ares->push_back(*i);
*i = 0;
break;