Commit 28094c87 by Alexandre Duret-Lutz

### 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.```
parent aa5426b2
 2010-04-14 Alexandre Duret-Lutz 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 2010-04-12 Alexandre Duret-Lutz * 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 ... @@ -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 ... @@ -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 ... @@ -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 ... @@ -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(*j); if (uo2 && uo2->op() == unop::F && uo2->child() == ftmp) { (*j)->destroy(); *j = 0; weak = false; } binop* bo2 = dynamic_cast(*j); binop* bo2 = dynamic_cast(*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 ... @@ -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(*j); if (uo2 && uo2->op() == unop::G && uo2->child() == ftmp) { (*j)->destroy(); *j = 0; weak = true; } binop* bo2 = dynamic_cast(*j); binop* bo2 = dynamic_cast(*j); if (bo2 && (bo2->op() == binop::R if (bo2 && (bo2->op() == binop::R || bo2->op() == binop::M) || bo2->op() == binop::M) ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!