This somehow revert changes from 2010-01-30 which killed this use of star to make room for the Kleen star. Here we only allow '*' in the temporal formula, so that it can still be the Kleen star in SERE. The motivation for '*' available as And is better compatibility with Wring and VIS. * src/ltlparse/ltlscan.ll: Distinguish * from [*]. * src/ltlparse/ltlparse.yy: Allows * to be used as AND between temporal formulae. * src/ltltest/equals.test, src/ltltest/parse.test: Add a few tests. * doc/tl/tl.tex: Document it.
100 lines
2.4 KiB
Bash
Executable file
100 lines
2.4 KiB
Bash
Executable file
#! /bin/sh
|
|
# Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et Developpement
|
|
# de l'Epita (LRDE).
|
|
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
|
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
|
# et Marie Curie.
|
|
#
|
|
# This file is part of Spot, a model checking library.
|
|
#
|
|
# Spot is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Spot is distributed in the hope that it will be useful, but WITHOUT
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
# License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with Spot; see the file COPYING. If not, write to the Free
|
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
# 02111-1307, USA.
|
|
|
|
|
|
# Check that spot::ltl::parse succeed on valid input, and that
|
|
# dump and dotty will work with the resulting trees. Note that
|
|
# this doesn't check that the tree is correct w.r.t. the formula.
|
|
|
|
. ./defs || exit 1
|
|
|
|
for f in \
|
|
'0' \
|
|
'1' \
|
|
'true' \
|
|
'false' \
|
|
'a' \
|
|
'p11011' \
|
|
'(p11011)' \
|
|
'a & b' \
|
|
'a * _b12' \
|
|
'a && .b.' \
|
|
'a + b' \
|
|
'a3214 | b' \
|
|
'a /\ b' \
|
|
'a || b' \
|
|
'a \/ b' \
|
|
'a | b' \
|
|
'_a_ U b' \
|
|
'a R b' \
|
|
'a <=> b' \
|
|
'a <-> b' \
|
|
'a ^ b' \
|
|
'a xor b' \
|
|
'a => b' \
|
|
'a -> b' \
|
|
'F b' \
|
|
'Gb' \
|
|
'G(b)' \
|
|
'!G(!b)' \
|
|
'!b' \
|
|
'[]b' \
|
|
'<>b' \
|
|
'X b' \
|
|
'()b' \
|
|
'long_atomic_proposition_1 U long_atomic_proposition_2' \
|
|
' ab & ac | ad ^ af' \
|
|
'((b & a) + a) & d' \
|
|
'(ab & ac | ad ) <=> af ' \
|
|
'a U b U c U d U e U f U g U h U i U j U k U l U m' \
|
|
'(ab & !Xad + ad U ab) & FG p12 /\ GF p13' \
|
|
'((([]<>()p12)) )' \
|
|
'a R ome V anille' \
|
|
'p=0Uq=1' \
|
|
'((p=1Rq=1)+p=0)UXq=0' \
|
|
'((p=1Rq=1)*p=0)UXq=0' \
|
|
'(Gq=1*Fp=0)UXq=0' \
|
|
'((p=1Mq=1)Wx+p=0)RXq=0' \
|
|
'((p=1Vq=1)Rx+p=0)WXq=0' \
|
|
'((X(p2=0))U(X(p2=0)))+((Xp1=0)UFALSE)'
|
|
|
|
do
|
|
if ../ltl2text "$f"; then
|
|
:
|
|
else
|
|
echo "ltl2dot failed to parse '$f'"
|
|
exit 1
|
|
fi
|
|
|
|
if test -n "$DOT"; then
|
|
run 0 ../ltl2dot "$f" > parse.dot
|
|
if $DOT -o /dev/null parse.dot; then
|
|
rm -f parse.dot
|
|
else
|
|
rm -f parse.dot
|
|
echo "dot failed to parse ltl2dot output for '$f'"
|
|
exit 1
|
|
fi
|
|
fi
|
|
done
|