Add support for the {SERE}! PSL operator.
* src/ltlparse/ltlscan.ll: Recognize }!. Also remove
five duplicate rules.
* src/ltlparse/ltlparse.yy: Build {r}<>->1 when parsing {r}!.
* src/ltlvisit/tostring.cc: Print {r}! instead of {r}<>->1.
* src/ltltest/tostring.test, src/ltltest/equals.test:
Add more tests.
This commit is contained in:
parent
c48b9bcfb5
commit
fdd73d5123
5 changed files with 27 additions and 7 deletions
|
|
@ -83,6 +83,7 @@ using namespace spot::ltl;
|
|||
%token START_RATEXP "RATEXP start marker"
|
||||
%token PAR_OPEN "opening parenthesis" PAR_CLOSE "closing parenthesis"
|
||||
%token BRACE_OPEN "opening brace" BRACE_CLOSE "closing brace"
|
||||
%token BRACE_BANG_CLOSE "closing brace-bang"
|
||||
%token OP_OR "or operator" OP_XOR "xor operator"
|
||||
%token OP_AND "and operator" OP_SHORT_AND "short and operator"
|
||||
%token OP_IMPLIES "implication operator" OP_EQUIV "equivalent operator"
|
||||
|
|
@ -627,6 +628,10 @@ subformula: booleanatom
|
|||
{ missing_right_binop($$, $1, @2,
|
||||
"existential non-overlapping concat operator");
|
||||
}
|
||||
| BRACE_OPEN rationalexp BRACE_BANG_CLOSE
|
||||
/* {SERE}! = {SERE} <>-> 1 */
|
||||
{ $$ = binop::instance(binop::EConcat, $2,
|
||||
constant::true_instance()); }
|
||||
;
|
||||
|
||||
%%
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ flex_set_buffer(const char* buf, int start_tok)
|
|||
"(" BEGIN(0); return token::PAR_OPEN;
|
||||
")" BEGIN(not_prop); return token::PAR_CLOSE;
|
||||
"{" BEGIN(0); return token::BRACE_OPEN;
|
||||
"}"[ \t\n]*"!" BEGIN(not_prop); return token::BRACE_BANG_CLOSE;
|
||||
"}" BEGIN(not_prop); return token::BRACE_CLOSE;
|
||||
|
||||
/* Must go before the other operators, because the F of FALSE
|
||||
|
|
@ -135,11 +136,6 @@ flex_set_buffer(const char* buf, int start_tok)
|
|||
"^"|"xor" BEGIN(0); return token::OP_XOR;
|
||||
"=>"|"->"|"-->" BEGIN(0); return token::OP_IMPLIES;
|
||||
"<=>"|"<->"|"<-->" BEGIN(0); return token::OP_EQUIV;
|
||||
"*"|"[*]" BEGIN(0); return token::OP_STAR;
|
||||
";" BEGIN(0); return token::OP_CONCAT;
|
||||
":" BEGIN(0); return token::OP_FUSION;
|
||||
"[]->" BEGIN(0); return token::OP_UCONCAT;
|
||||
"<>->" BEGIN(0); return token::OP_ECONCAT;
|
||||
|
||||
/* <>, [], and () are used in Spin. */
|
||||
"F"|"<>" BEGIN(0); return token::OP_F;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue