Add two event_univ rewriting rules.

* src/ltlvisit/simplify.cc: Here.
* doc/tl/tl.tex: Document them.
* src/ltltest/reduccmp.test: Test them.
This commit is contained in:
Alexandre Duret-Lutz 2012-09-24 10:42:20 +02:00
parent 45ba8c3ef6
commit 45e3f7fc2a
3 changed files with 34 additions and 8 deletions

View file

@ -1752,18 +1752,41 @@ namespace spot
If a is a pure universality formula a W b = a|b. */
if (a->is_eventual() && (op == binop::M))
{
const formula* tmp = multop::instance(multop::And, a, b);
result_ = recurse(tmp);
tmp->destroy();
result_ =
recurse_destroy(multop::instance(multop::And, a, b));
return;
}
if (a->is_universal() && (op == binop::W))
{
const formula* tmp = multop::instance(multop::Or, a, b);
result_ = recurse(tmp);
tmp->destroy();
result_ =
recurse_destroy(multop::instance(multop::Or, a, b));
return;
}
// e₁ W e₂ = Ge₁ | e₂
// u₁ M u₂ = Fu₁ & u₂
if (!opt_.reduce_size_strictly)
{
if (op == binop::W && a->is_eventual() && b->is_eventual())
{
result_ =
recurse_destroy(multop::instance
(multop::Or,
unop::instance(unop::G, a), b));
return;
}
if (op == binop::M && a->is_universal() && b->is_universal())
{
result_ =
recurse_destroy(multop::instance
(multop::And,
unop::instance(unop::F, a), b));
return;
}
}
trace << "bo: no eventuniv rule matched" << std::endl;
}