Extend the ELTL parser to support basic aliases of automaton

operators such as F=U(true,$0) or R=!U(!$0,!$1), and infix
notation for binary automaton operators.

* README: Document the ELTL directories.
* src/eltlparse/eltlparse.yy, src/eltlparse/eltlscan.ll: Add
support for aliases and infix notation.
* src/eltlparse/public.hh, src/ltlast/nfa.cc, src/ltlast/nfa.hh:
Clean them.
* src/eltltest/acc.test, src/tgbatest/eltl2tgba.test: Add tests
for the ELTL parser's extensions.
* src/tgbatest/eltl2tgba.cc: Adjust.
This commit is contained in:
Damien Lefortier 2009-04-04 21:54:01 +02:00
parent 2fbcd7e52f
commit 355461ae99
10 changed files with 370 additions and 115 deletions

View file

@ -51,7 +51,9 @@ X=(0 1 true \
U=(0 0 $0 \
0 1 $1 \
accept 1) \
G=(0 0 $0)";
G=(0 0 $0) \
F=U(true, $0) \
R=!U(!$0, !$1)";
return s;
}

View file

@ -36,6 +36,8 @@ U=(
G=(
0 0 \$0
)
F=U(true, \$0)
R=!U(!\$0, !\$1)
EOF
cat >input <<EOF
@ -51,7 +53,7 @@ check_true 'Ga'
cat >input <<EOF
include input1
%
U(a,b)
a U b
EOF
check_construct input
@ -62,7 +64,7 @@ check_false 'G(a&!b)'
cat >input <<EOF
include input1
%
!U(a,b)
!(a U b)
EOF
check_construct input
@ -102,6 +104,26 @@ check_construct input
check_true 'Ga'
check_false '!Ga'
cat >input <<EOF
include input1
%
F(a)
EOF
check_construct input
check_true 'Fa'
check_false '!Fa'
cat >input <<EOF
include input1
%
a R b
EOF
check_construct input
check_true 'a R b'
check_false '!(a R b)'
cat >input <<EOF
T=(
0 1 true