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.
This commit is contained in:
Alexandre Duret-Lutz 2011-12-07 17:02:05 +01:00
parent d0a8e6d6f5
commit dd52768932
3 changed files with 12 additions and 10 deletions

View file

@ -10,9 +10,8 @@
\usepackage{url} \usepackage{url}
\usepackage{xspace} \usepackage{xspace}
\usepackage{dsfont} \usepackage{dsfont}
\usepackage{mathabx} \usepackage{mathabx} % vDash
\usepackage{showlabels} \usepackage{showlabels}
\usepackage{chngpage}
\usepackage{tabulary} \usepackage{tabulary}
\usepackage[numbers]{natbib} \usepackage[numbers]{natbib}
\usepackage{rotating} \usepackage{rotating}
@ -646,9 +645,11 @@ denote arbitrary SERE and $b$ denotes a Boolean formula.
\end{tabular} \end{tabular}
\end{center} \end{center}
The character \samp{\$} can also be used as value for $\mvar{j}$ in The character \samp{\$} or the string \samp{inf} can also be used as
the above operators to denote an unbounded range. For instance value for $\mvar{j}$ in the above operators to denote an unbounded
`$a\STAR{i,\texttt{\$}}$' and `$a\STAR{i..}$' represent the same SERE. 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} \subsection{Semantics}

View file

@ -123,9 +123,10 @@ flex_set_buffer(const char* buf, int start_tok)
, is from Perl */ , is from Perl */
<sqbracket>","|".."|":"|"to" return token::OP_SQBKT_SEP; <sqbracket>","|".."|":"|"to" return token::OP_SQBKT_SEP;
/* In SVA you use [=1:$] instead of [=1..]. We will also /* In SVA you use [=1:$] instead of [=1..]. We will also accept
accept [=1..$] and [=1:]. */ [=1..$] and [=1:]. The PSL LRM shows examples like [=1:inf]
<sqbracket>"$" return token::OP_UNBOUNDED; instead, so will accept this too. */
<sqbracket>"$"|"inf" return token::OP_UNBOUNDED;
/* & and | come from Spin. && and || from LTL2BA. /* & and | come from Spin. && and || from LTL2BA.
/\, \/, and xor are from LBTT. /\, \/, and xor are from LBTT.

View file

@ -158,12 +158,12 @@ run 0 ../equals '{a[*][*2..3]}' '{a[*]}'
run 0 ../equals '{a[*..3][*2]}' '{a[*..6]}' run 0 ../equals '{a[*..3][*2]}' '{a[*..6]}'
run 0 ../equals '{a[*..3][*to2]}' '{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[*]}' run 0 ../equals '{a[*..3][*2:]}' '{a[*:inf]}'
run 0 ../equals '{a[*1..]}' '{a[+]}' run 0 ../equals '{a[*1..]}' '{a[+]}'
run 0 ../equals '{a[+][*1..3]}' '{a[+]}' run 0 ../equals '{a[+][*1..3]}' '{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..]}' run 0 ../equals '{[+][*2]}' '{[*2..inf]}'
run 0 ../equals '{0[=2]}' '0' run 0 ../equals '{0[=2]}' '0'
run 0 ../equals '{0[=2..]}' '0' run 0 ../equals '{0[=2..]}' '0'