simplifier: new PSL simplifications

{e[*0..j]}<>->f = {e[*1..j]}<>->f
{e[*0..j]}[]->f = {e[*1..j]}[]->f

Fixes #81.

This required a small change to the bounded-star-normal-form to prevent
infinite recursion.

* spot/tl/simplify.cc: Implement these rules.
* doc/tl/tl.tex, NEWS: Document them.
* tests/core/reduccmp.test: Add tests, and adjust others.
* tests/core/unambig.test: Replace formula that used to generated an
ambiguous automaton, but now generates a deterministic one.
This commit is contained in:
Alexandre Duret-Lutz 2016-07-19 16:40:59 +02:00
parent d5b2de7fa8
commit abff7eba8e
5 changed files with 38 additions and 16 deletions

View file

@ -395,12 +395,16 @@ G(GFc|GFd|FGe|FGf), F(GF(c|d)|Ge|Gf)
{(a;c*;d)|(b;c)}, (a & X{c*;d}) | (b & Xc)
!{(a;c*;d)|(b;c)}, (X(!{c*;d}) | !a) & (X!c | !b)
(Xc R b) & (Xc W 0), b & XGc
{{c*|1}[*0..1]}<>-> v, {{c[+]|1}[*0..1]}<>-> v
{{b*;c*}[*3..5]}<>-> v, {{b*;c*}[*0..5]} <>-> v
{{b*&c*}[*3..5]}<>-> v, {{b[+]|c[+]}[*0..5]} <>-> v
{{c*|1}[*0..1]}<>-> v, v | (v M c)
{{b*;c*}[*3..5]}<>-> v, {{b*;c*}[*1..5]} <>-> v
{{b*&c*}[*3..5]}<>-> v, {{b[+]|c[+]}[*1..5]} <>-> v
{((a*;b)+[*0])[*4..6]}!, {((a*;b))[*1..6]}!
# issue 81
{e[*0..5]}<>->f, {e[*1..5]}<>->f
{e[*0..5]}[]->f, {e[*1..5]}[]->f
{(e+[*0])[*0..5]}[]->f, {e[*1..5]}[]->f
# not reduced
{a;(b[*2..4];c*;([*0]+{d;e}))*}!, {a;(b[*2..4];c*;([*0]+{d;e}))*}!
{((a*;b)+[*0])[*4..6]}!, {((a*;b))[*0..6]}!
{c[*];e[*]}[]-> a, {c[*];e[*]}[]-> a
EOF