* src/ltlparse/ltlscan.ll: Recognize && and ||.
* src/ltltest/parse.test, src/ltltest/parseerr.test, src/ltltest/equals.test: Use these operators..
This commit is contained in:
parent
83cb6f3a39
commit
d9cd704bcb
5 changed files with 31 additions and 20 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-04-18 Alexandre DURET-LUTZ <aduret@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/ltlparse/ltlscan.ll: Recognize && and ||.
|
||||||
|
* src/ltltest/parse.test, src/ltltest/parseerr.test,
|
||||||
|
src/ltltest/equals.test: Use these operators..
|
||||||
|
|
||||||
2003-04-17 Alexandre DURET-LUTZ <aduret@src.lip6.fr>
|
2003-04-17 Alexandre DURET-LUTZ <aduret@src.lip6.fr>
|
||||||
|
|
||||||
* src/ltltest/readltl.cc, src/ltltest/equals.cc: Cosmetics.
|
* src/ltltest/readltl.cc, src/ltltest/equals.cc: Cosmetics.
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,9 @@ flex_set_buffer(const char *buf)
|
||||||
")" return PAR_CLOSE;
|
")" return PAR_CLOSE;
|
||||||
|
|
||||||
"!" return OP_NOT;
|
"!" return OP_NOT;
|
||||||
"|"|"+" return OP_OR;
|
/* & and | come from Spin. && and || from LTL2BA. */
|
||||||
"&"|"."|"*" return OP_AND;
|
"||"|"|"|"+" return OP_OR;
|
||||||
|
"&&"|"&"|"."|"*" return OP_AND;
|
||||||
"^" return OP_XOR;
|
"^" return OP_XOR;
|
||||||
"=>"|"->" return OP_IMPLIES;
|
"=>"|"->" return OP_IMPLIES;
|
||||||
"<=>"|"<->" return OP_EQUIV;
|
"<=>"|"<->" return OP_EQUIV;
|
||||||
|
|
@ -54,9 +55,9 @@ flex_set_buffer(const char *buf)
|
||||||
"1"|"true" return CONST_TRUE;
|
"1"|"true" return CONST_TRUE;
|
||||||
"0"|"false" return CONST_FALSE;
|
"0"|"false" return CONST_FALSE;
|
||||||
|
|
||||||
[ \t\n]+ yylloc->step (); /* discard whitespace */
|
[ \t\n]+ /* discard whitespace */ yylloc->step ();
|
||||||
|
|
||||||
/* An Atomic propisition cannot start with the letter
|
/* An Atomic proposition cannot start with the letter
|
||||||
used by a unary operator (F,G,X), unless this
|
used by a unary operator (F,G,X), unless this
|
||||||
letter is followed by a digit in which case we assume
|
letter is followed by a digit in which case we assume
|
||||||
it's an ATOMIC_PROP (even though F0 could be seen as Ffalse). */
|
it's an ATOMIC_PROP (even though F0 could be seen as Ffalse). */
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,12 @@ check 0 'G a ' ' G a'
|
||||||
check 0 'a U b' 'a U b'
|
check 0 'a U b' 'a U b'
|
||||||
check 0 'a & b' 'a & b'
|
check 0 'a & b' 'a & b'
|
||||||
check 0 'a & b' 'b & a'
|
check 0 'a & b' 'b & a'
|
||||||
check 0 'a & b & c' 'c & a & b'
|
check 0 'a & b & c' 'c & a && b'
|
||||||
check 0 'a & b & c' 'b & c & a'
|
check 0 'a & b & c' 'b & c & a'
|
||||||
check 0 'a & b & a' 'b & a & b'
|
check 0 'a && b & a' 'b & a & b'
|
||||||
check 0 'a & b' 'b & a & b'
|
check 0 'a & b' 'b & a & b'
|
||||||
check 0 'a & b' 'b & a & a'
|
check 0 'a & b' 'b & a & a'
|
||||||
check 0 'a & b & (c |(f U g)| e)' 'b & a & a & (c | e |(f U g)| e | c) & b'
|
check 0 'a & b & (c |(f U g)|| e)' 'b & a & a & (c | e |(f U g)| e | c) & b'
|
||||||
|
|
||||||
# other formulae which are not
|
# other formulae which are not
|
||||||
check 1 'a' 'b'
|
check 1 'a' 'b'
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ for f in \
|
||||||
'a + b' \
|
'a + b' \
|
||||||
'a3214 | b' \
|
'a3214 | b' \
|
||||||
'a & b' \
|
'a & b' \
|
||||||
|
'a && b' \
|
||||||
|
'a || b' \
|
||||||
|
'a | b' \
|
||||||
'_a_ U b' \
|
'_a_ U b' \
|
||||||
'a R b' \
|
'a R b' \
|
||||||
'a <=> b' \
|
'a <=> b' \
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ check 'a U b V c R' ''
|
||||||
# leading and trailing garbage are skipped
|
# leading and trailing garbage are skipped
|
||||||
check '/2/3/4/5 a + b /6/7/8/' 'multop(Or, AP(a), AP(b))'
|
check '/2/3/4/5 a + b /6/7/8/' 'multop(Or, AP(a), AP(b))'
|
||||||
check 'a U b c' 'binop(U, AP(a), AP(b))'
|
check 'a U b c' 'binop(U, AP(a), AP(b))'
|
||||||
|
check 'a &&& b' 'AP(b)'
|
||||||
# (check multop merging while we are at it)
|
# (check multop merging while we are at it)
|
||||||
check 'a & b & c & d e' 'multop(And, AP(a), AP(b), AP(c), AP(d))'
|
check 'a & b & c & d e' 'multop(And, AP(a), AP(b), AP(c), AP(d))'
|
||||||
check 'a & (b | c) & d should work' 'multop(And, AP(a), multop(Or, AP(b), AP(c)), AP(d))'
|
check 'a & (b | c) & d should work' 'multop(And, AP(a), multop(Or, AP(b), AP(c)), AP(d))'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue