More LTL reductions for W and M.
* src/ltlvisit/basicreduce.cc: Perform the following reductions: (a R b) | Gb = a R b (a M b) | Gb = a R b (a U b) & Fb = a U b (a W b) & Fb = a U b * src/ltltest/reduccmp.test: Test them.
This commit is contained in:
parent
aa5426b2fb
commit
28094c87da
3 changed files with 52 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
||||||
|
2010-04-14 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
|
More LTL reductions for W and M.
|
||||||
|
|
||||||
|
* src/ltlvisit/basicreduce.cc: Perform the following reductions:
|
||||||
|
(a R b) | Gb = a R b
|
||||||
|
(a M b) | Gb = a R b
|
||||||
|
(a U b) & Fb = a U b
|
||||||
|
(a W b) & Fb = a U b
|
||||||
|
* src/ltltest/reduccmp.test: Test them.
|
||||||
|
|
||||||
2010-04-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
2010-04-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
* wrap/python/cgi-bin/ltl2tgba.in: Document W and M operators.
|
* wrap/python/cgi-bin/ltl2tgba.in: Document W and M operators.
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,12 @@ for x in ../reduccmp ../reductaustr; do
|
||||||
run 0 $x '(a W b) & (c W b)' '(a & c) W b'
|
run 0 $x '(a W b) & (c W b)' '(a & c) W b'
|
||||||
run 0 $x '(a R b) | (c M b)' '(a | c) R b'
|
run 0 $x '(a R b) | (c M b)' '(a | c) R b'
|
||||||
run 0 $x '(a M b) | (c M b)' '(a | c) M b'
|
run 0 $x '(a M b) | (c M b)' '(a | c) M b'
|
||||||
|
|
||||||
|
run 0 $x '(a R b) | Gb' 'a R b'
|
||||||
|
run 0 $x '(a M b) | Gb' 'a R b'
|
||||||
|
run 0 $x '(a U b) & Fb' 'a U b'
|
||||||
|
run 0 $x '(a W b) & Fb' 'a U b'
|
||||||
|
run 0 $x '(a M b) | Gb | (c M b)' '(a | c) R b'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,8 @@ namespace spot
|
||||||
{
|
{
|
||||||
// F(a) & (a R b) = a M b
|
// F(a) & (a R b) = a M b
|
||||||
// F(a) & (a M b) = a M b
|
// F(a) & (a M b) = a M b
|
||||||
|
// F(a) & (b W a) = b U a
|
||||||
|
// F(a) & (b U a) = b U a
|
||||||
formula* a = uo->child();
|
formula* a = uo->child();
|
||||||
bool rewritten = false;
|
bool rewritten = false;
|
||||||
for (multop::vec::iterator j = i;
|
for (multop::vec::iterator j = i;
|
||||||
|
|
@ -484,6 +486,19 @@ namespace spot
|
||||||
*j = 0;
|
*j = 0;
|
||||||
rewritten = true;
|
rewritten = true;
|
||||||
}
|
}
|
||||||
|
else if (b && (b->op() == binop::W
|
||||||
|
|| b->op() == binop::U)
|
||||||
|
&& b->second() == a)
|
||||||
|
{
|
||||||
|
binop* r =
|
||||||
|
binop::instance(binop::U,
|
||||||
|
b->first()->clone(),
|
||||||
|
a->clone());
|
||||||
|
tmpOther->push_back(r);
|
||||||
|
(*j)->destroy();
|
||||||
|
*j = 0;
|
||||||
|
rewritten = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!rewritten)
|
if (!rewritten)
|
||||||
tmpOther->push_back(uo->clone());
|
tmpOther->push_back(uo->clone());
|
||||||
|
|
@ -508,6 +523,16 @@ namespace spot
|
||||||
{
|
{
|
||||||
if (!*j)
|
if (!*j)
|
||||||
continue;
|
continue;
|
||||||
|
// (a U b) & Fb = a U b.
|
||||||
|
// (a W b) & Fb = a U b.
|
||||||
|
unop* uo2 = dynamic_cast<unop*>(*j);
|
||||||
|
if (uo2 && uo2->op() == unop::F
|
||||||
|
&& uo2->child() == ftmp)
|
||||||
|
{
|
||||||
|
(*j)->destroy();
|
||||||
|
*j = 0;
|
||||||
|
weak = false;
|
||||||
|
}
|
||||||
binop* bo2 = dynamic_cast<binop*>(*j);
|
binop* bo2 = dynamic_cast<binop*>(*j);
|
||||||
if (bo2 && (bo2->op() == binop::U
|
if (bo2 && (bo2->op() == binop::U
|
||||||
|| bo2->op() == binop::W)
|
|| bo2->op() == binop::W)
|
||||||
|
|
@ -708,6 +733,16 @@ namespace spot
|
||||||
{
|
{
|
||||||
if (!*j)
|
if (!*j)
|
||||||
continue;
|
continue;
|
||||||
|
// (a R b) | Gb = a R b.
|
||||||
|
// (a M b) | Gb = a R b.
|
||||||
|
unop* uo2 = dynamic_cast<unop*>(*j);
|
||||||
|
if (uo2 && uo2->op() == unop::G
|
||||||
|
&& uo2->child() == ftmp)
|
||||||
|
{
|
||||||
|
(*j)->destroy();
|
||||||
|
*j = 0;
|
||||||
|
weak = true;
|
||||||
|
}
|
||||||
binop* bo2 = dynamic_cast<binop*>(*j);
|
binop* bo2 = dynamic_cast<binop*>(*j);
|
||||||
if (bo2 && (bo2->op() == binop::R
|
if (bo2 && (bo2->op() == binop::R
|
||||||
|| bo2->op() == binop::M)
|
|| bo2->op() == binop::M)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue