formula: add a missing trivial rewriting in SERE

We should have [*0]|f ≡ f when f is a SERE that already accept the
empty word.  Fixes issue #454.

* spot/tl/formula.cc: Implement the rewriting.
* tests/core/reduccmp.test: Add a test case.
* doc/tl/tl.tex, NEWS: Document it.
This commit is contained in:
Alexandre Duret-Lutz 2024-07-25 17:56:04 +02:00
parent bcdfe44c44
commit 44efc96595
4 changed files with 31 additions and 17 deletions

View file

@ -487,7 +487,8 @@ GF(a && GF(b) && c), G(F(a & c) & Fb)
{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)
# issue 545
{([*0]|a[*]|b);c}<>->d, {(a[*]|b);c}<>->d
# issue 558 (was a false alarm, but still good to test)
{(!b)[*3];b}!, !b & X(!b & X(!b & Xb))
{(!b)[+];b}!, !b & XFb