tostring: quote U, W, M, R when used as atomic propositions

* src/ltltest/tostring.test, src/ltltest/parse.test: More tests.
* src/ltlvisit/tostring.cc (is_bare_word): Quote U, W, M, R.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2013-01-19 14:15:17 +01:00
parent 5086e24165
commit bf3c3aecde
4 changed files with 29 additions and 10 deletions

View file

@ -1,6 +1,7 @@
#! /bin/sh
# Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et Developpement
# de l'Epita (LRDE).
# -*- coding: utf-8 -*-
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche
# et Développement 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.
@ -61,6 +62,13 @@ for f in \
'<>b' \
'X b' \
'()b' \
'X"X"' \
'X"F"' \
'X"G"' \
'X"U"' \
'X"W"' \
'X"R"' \
'X"M"' \
'long_atomic_proposition_1 U long_atomic_proposition_2' \
' ab & ac | ad ^ af' \
'((b & a) + a) & d' \
@ -81,7 +89,7 @@ do
if ../ltl2text "$f"; then
:
else
echo "ltl2dot failed to parse '$f'"
echo "ltl2text failed to parse '$f'"
exit 1
fi

View file

@ -1,8 +1,9 @@
#! /bin/sh
# Copyright (C) 2009, 2010, 2011 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
# -*- coding: utf-8 -*-
# Copyright (C) 2009, 2010, 2011, 2013 Laboratoire de Recherche et
# Développement 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
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
@ -54,6 +55,10 @@ run 0 ../tostring 'p=0UFXp=1'
run 0 ../tostring 'GF"\GF"'
run 0 ../tostring 'GF"foo bar"'
run 0 ../tostring 'FFG__GFF'
run 0 ../tostring 'X"U"'
run 0 ../tostring 'X"W"'
run 0 ../tostring 'X"M"'
run 0 ../tostring 'X"R"'
run 0 ../tostring '{a;b;{c && d*};**}|=>G{a*:b*}'
run 0 ../tostring 'GF!{{a || c} && b}'