tl: fix handling of f##[0:0]g, and of ##[0:n]g

The first issue was reported by Victor Khomenko.

* spot/tl/formula.cc: Introduce a single-argument
version of sugar_delay().
* spot/parsetl/parsetl.yy: Use it.
* doc/tl/tl.tex, spot/tl/formula.hh: Adjust doc.
* tests/core/ltlfilt.test, tests/core/sugar.test: More tests.
This commit is contained in:
Alexandre Duret-Lutz 2019-05-20 20:59:33 +02:00
parent 66a3b6f7cb
commit 90a88d0b5a
6 changed files with 58 additions and 13 deletions

View file

@ -58,6 +58,7 @@ F(a & !Xa & Xb)
{a*;(!a)*;a[+]}|->b
{a*;(!a)[+];a[+]}|->b
{a*;(!c)[+];a[+]}|->b
{a* ##0 b*}|->c
EOF
checkopt --boolean <<EOF
@ -115,10 +116,11 @@ a & (b | c)
{a[+];{!a}[*];a[*]}[]-> b
{a[*];{!a}[*];a[+]}[]-> b
{a[*];{!a}[+];a[+]}[]-> b
{a[*]:b[*]}[]-> c
EOF
checkopt -c --stutter-invariant <<EOF
15
16
EOF
checkopt --syntactic-stutter-invariant <<EOF
@ -134,6 +136,7 @@ a & (b | c)
{a[*];{!a}[+];a[*]}[]-> b
{a[+];{!a}[*];a[*]}[]-> b
{a[*];{!a}[*];a[+]}[]-> b
{a[*]:b[*]}[]-> c
EOF
checkopt --simplify <<EOF
@ -158,6 +161,7 @@ a R (b W !a)
!a R (a R (b W !a))
!a R (a | X(a R (b W !a)))
!a R (c | X(c R (b W !a)))
(c W !b) W !a
EOF
checkopt --simplify --eventual --unique <<EOF
@ -191,6 +195,7 @@ a & (b | c)
{a[*];{!a}[*];a[+]}[]-> b
{a[*];{!a}[+];a[+]}[]-> b
{a[*];{!c}[+];a[+]}[]-> b
{a[*]:b[*]}[]-> c
EOF
checkopt --obligation <<EOF
@ -210,6 +215,7 @@ a & (b | c)
{a[*];{!a}[*];a[+]}[]-> b
{a[*];{!a}[+];a[+]}[]-> b
{a[*];{!c}[+];a[+]}[]-> b
{a[*]:b[*]}[]-> c
EOF
checkopt --guarantee <<EOF
@ -232,6 +238,7 @@ checkopt -v --ltl <<EOF
{a[*];{!a}[*];a[+]}[]-> b
{a[*];{!a}[+];a[+]}[]-> b
{a[*];{!c}[+];a[+]}[]-> b
{a[*]:b[*]}[]-> c
EOF
checkopt -v --ap=3 <<EOF
@ -275,6 +282,7 @@ a & (b | c)
{a[*];{!a}[*];a[+]}[]-> b
{a[*];{!a}[+];a[+]}[]-> b
{a[*];{!c}[+];a[+]}[]-> b
{a[*]:b[*]}[]-> c
EOF
checkopt -v --stutter-invariant <<EOF