Commit dd527689 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Support the PSL syntax [*1:inf], as a synonym for [*1:].

* src/ltlparse/ltlscan.ll: Parse "inf" as OP_UNBOUNDED.
* src/ltltest/equals.test: Add some tests.
* doc/tl/tl.tex: Document it.
parent d0a8e6d6
......@@ -10,9 +10,8 @@
\usepackage{url}
\usepackage{xspace}
\usepackage{dsfont}
\usepackage{mathabx}
\usepackage{mathabx} % vDash
\usepackage{showlabels}
\usepackage{chngpage}
\usepackage{tabulary}
\usepackage[numbers]{natbib}
\usepackage{rotating}
......@@ -646,9 +645,11 @@ denote arbitrary SERE and $b$ denotes a Boolean formula.
\end{tabular}
\end{center}
The character \samp{\$} can also be used as value for $\mvar{j}$ in
the above operators to denote an unbounded range. For instance
`$a\STAR{i,\texttt{\$}}$' and `$a\STAR{i..}$' represent the same SERE.
The character \samp{\$} or the string \samp{inf} can also be used as
value for $\mvar{j}$ in the above operators to denote an unbounded
range.\footnote{SVA uses \samp{\$} while PSL uses \samp{inf}.} For
instance `$a\STAR{i,\texttt{\$}}$', `$a\STAR{i\texttt{:inf}}$' and
`$a\STAR{i..}$' all represent the same SERE.
\subsection{Semantics}
......
......@@ -123,9 +123,10 @@ flex_set_buffer(const char* buf, int start_tok)
, is from Perl */
<sqbracket>","|".."|":"|"to" return token::OP_SQBKT_SEP;
/* In SVA you use [=1:$] instead of [=1..]. We will also
accept [=1..$] and [=1:]. */
<sqbracket>"$" return token::OP_UNBOUNDED;
/* In SVA you use [=1:$] instead of [=1..]. We will also accept
[=1..$] and [=1:]. The PSL LRM shows examples like [=1:inf]
instead, so will accept this too. */
<sqbracket>"$"|"inf" return token::OP_UNBOUNDED;
/* & and | come from Spin. && and || from LTL2BA.
/\, \/, and xor are from LBTT.
......
......@@ -158,12 +158,12 @@ run 0 ../equals '{a[*][*2..3]}' '{a[*]}'
run 0 ../equals '{a[*..3][*2]}' '{a[*..6]}'
run 0 ../equals '{a[*..3][*to2]}' '{a[*:6]}'
run 0 ../equals '{a[*..3][*2..$]}' '{a[*]}'
run 0 ../equals '{a[*..3][*2:]}' '{a[*]}'
run 0 ../equals '{a[*..3][*2:]}' '{a[*:inf]}'
run 0 ../equals '{a[*1..]}' '{a[+]}'
run 0 ../equals '{a[+][*1..3]}' '{a[+]}'
run 0 ../equals '{a[*1..3][+]}' '{a[+]}'
run 0 ../equals '{[*2][+]}' '{[*2][+]}'
run 0 ../equals '{[+][*2]}' '{[*2..]}'
run 0 ../equals '{[+][*2]}' '{[*2..inf]}'
run 0 ../equals '{0[=2]}' '0'
run 0 ../equals '{0[=2..]}' '0'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment