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:
parent
45ba8c3ef6
commit
45e3f7fc2a
3 changed files with 34 additions and 8 deletions
|
|
@ -178,6 +178,9 @@ for x in ../reduccmp ../reductaustr; do
|
|||
run 0 $x 'G(a R b)' 'Gb'
|
||||
run 0 $x 'G(a W b)' 'G(a | b)'
|
||||
|
||||
run 0 $x 'Fa W Fb' 'F(GFa | b)'
|
||||
run 0 $x 'Ga M Gb' 'FGa & Gb'
|
||||
|
||||
run 0 $x 'a & XGa' 'Ga'
|
||||
run 0 $x 'a & XG(a&b)' '(XGb)&(Ga)'
|
||||
run 0 $x 'a & b & XG(a&b)' 'G(a&b)'
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue