simplify: more rules for first_match

* spot/tl/simplify.cc: Implement the rules.
* tests/core/reduccmp.test: Test them.
* doc/tl/tl.tex: Document them.
This commit is contained in:
Alexandre Duret-Lutz 2019-05-10 22:54:55 +02:00
parent c6605e951d
commit e325289a12
3 changed files with 118 additions and 12 deletions

View file

@ -446,6 +446,18 @@ GF(a && GF(b) && c), G(F(a & c) & Fb)
{first_match(a;c;b[+];(e | [*0]))}, a & X(c & Xb)
{first_match(b[+];(e | [*0]))}, b
{first_match(b[*2..3])}, b & Xb
{first_match(a;b[*2..3];a)}, a & X(b & X(b & X{first_match(b[*0..1];a)}))
{first_match(b:a[*2][+])}, {first_match(b:a[*2])}
{first_match(b[*3]:a[*2][+])}, b & X(b & X{first_match(b:a[*2])})
{first_match((a | (b;b))[*2..3])}, {first_match((a | b[*2])[*2])}
{first_match((a | (b;b))[:*2..3])}, {first_match((a | b[*2])[:*2])}
{first_match(a;(a | (b;b))[*2..3])}, a & X{first_match((a | b[*2])[*2])}
{first_match(a:(a | (b;b))[*2..3])}, {first_match(a:(a | b[*2])[*2])}
{first_match(a;(a | (b;b))[:*2..3])}, a & X{first_match((a | b[*2])[:*2])}
{first_match(a:(a | (b;b))[:*2..3])}, {first_match(a:(a | b[*2])[:*2])}
{first_match(1:e[*0..3])[*]}[]-> c, c W !e
{first_match(first_match(a*;e);b)}[]->a, {first_match(a[*];e)}[]-> X(a | !b)
{first_match(first_match(a*;e):b*)}[]->a, {first_match(a[*];e)}[]-> (a | !b)
EOF
run 0 ../reduccmp nottau.txt