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

@ -37,12 +37,18 @@ F [2:4] a | b
F [4:2]a | F[2:2]b
F[]a|G[]b|X[]c
{a ##0 b ##1 c ##2 d}|->e
{a* ##0 b* ##1 c* ##2 d*}|->e
{(##2 a)[*] ##1 b}|->e
{a ##[0:3] b}|->e
{a* ##[0:3] b}|->e
{a ##[0:3] b*}|->e
{a* ##[0:3] b*}|->e
{a ##[1..] b}|->e
{a ##[:] b}|->e
{a ##[:1] b}|->e
{##[..3] b}|->e
{##[0..2] b*}|->e
{##[1..2] b*}|->e
{a ##[+] b}|->e
{##[*] b}|->e
EOF
@ -62,12 +68,18 @@ b | XX(a | X(a | Xa))
XX(a | X(a | Xa)) | XXb
FGa | Gb | XGc
{{a && b};c;1;d}[]-> e
{{a[*]:b[*]};c[*];1;d[*]}[]-> e
{{[*2];a}[*];b}[]-> e
{a:{[*0..3];b}}[]-> e
{{a[*];[*0..3]}:b}[]-> e
{a:{[*0..3];b[*]}}[]-> e
{{a[*]:b[*]} | {a[*];[*0..2];b[*]}}[]-> e
{a;[*];b}[]-> e
{a:{[*];b}}[]-> e
{a:{[*0..1];b}}[]-> e
{[*0..3];b}[]-> e
{[*0..2];b[*]}[]-> e
{[*1..2];b[*]}[]-> e
{a;[*];b}[]-> e
{[*];b}[]-> e
EOF