* src/ltlvisit/tostring.cc (to_spin_string_visitor,

to_string_visitor): Do not parenthesize the top-level formula.
* tgbatest/explicit.test, tgbatest/explpro2.test,
tgbatest/explpro3.test, tgbatest/explprod.test,
tgbatest/readsave.test, tgbatest/tgbaread.test,
tgbatest/tripprod.test: Adjust expected output.
* sanity/style.test: Fix regexes to catch an error seen in
tostring.cc.
This commit is contained in:
Alexandre Duret-Lutz 2004-05-14 11:01:14 +00:00
parent 6f4ab3af6c
commit 35ef738ff9
10 changed files with 72 additions and 43 deletions

View file

@ -38,7 +38,7 @@ digraph G {
2 [label="state 1"]
2 -> 3 [label="a\n{Acc[r]}"]
3 [label="state 2"]
3 -> 1 [label="(b & c)\n"]
3 -> 1 [label="b & c\n"]
}
EOF

View file

@ -39,8 +39,8 @@ EOF
cat >expected <<EOF
acc = "p1" "p2" "p3";
"s1 * s1", "s2 * s2", "(!a & b)", "p1" "p2";
"s1 * s1", "s3 * s3", "(a & !b)", "p2" "p3";
"s1 * s1", "s2 * s2", "!a & b", "p1" "p2";
"s1 * s1", "s3 * s3", "a & !b", "p2" "p3";
EOF
run 0 ./explprod input1 input2 > stdout
@ -48,7 +48,7 @@ run 0 ./explprod input1 input2 > stdout
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
perl -pe 's/("\w+") ("\w+")(?: ("\w+"))?/@{[sort $1, $2, $3]}/g;
s/\(!b & a\)/(a & !b)/g;s/\(b & !a\)/(!a & b)/g' \
s/!b & a/a & !b/g;s/b & !a/!a & b/g' \
stdout > tmp_ && mv tmp_ stdout
cat stdout

View file

@ -39,16 +39,16 @@ EOF
cat >expected <<EOF
acc = "p2" "p3";
"s1 * s1", "s2 * s2", "(!a & b)", "p2";
"s1 * s1", "s3 * s3", "(a & !b)", "p3";
"s1 * s1", "s2 * s2", "!a & b", "p2";
"s1 * s1", "s3 * s3", "a & !b", "p3";
EOF
run 0 ./explprod input1 input2 > stdout
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
sed 's/"p3" "p2"/"p2" "p3"/g;s/(!b & a)/(a \& !b)/g;
s/(b & !a)/(!a \& b)/g' stdout > tmp_ && mv tmp_ stdout
sed 's/"p3" "p2"/"p2" "p3"/g;s/!b & a/a \& !b/g;
s/b & !a/!a \& b/g' stdout > tmp_ && mv tmp_ stdout
cat stdout
diff stdout expected

View file

@ -41,16 +41,16 @@ EOF
cat >expected <<EOF
acc = "p1" "p2" "p3";
"s1 * s1", "s3 * s2", "(a & b)", "p1" "p2";
"s1 * s1", "s3 * s2", "a & b", "p1" "p2";
"s1 * s1", "s2 * s2", "b", "p1" "p2";
"s2 * s2", "s3 * s1", "(a & c)", "p1" "p3";
"s2 * s2", "s3 * s1", "a & c", "p1" "p3";
EOF
run 0 ./explprod input1 input2 > stdout
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
perl -pe 's/("\w+") ("\w+")(?: ("\w+"))?/@{[sort $1, $2, $3]}/g;
s/\(c & a\)/(a & c)/g;s/\(b & a\)/(a & b)/g' \
s/c & a/a & c/g;s/b & a/a & b/g' \
stdout > tmp_ && mv tmp_ stdout
cat stdout

View file

@ -36,7 +36,7 @@ EOF
cat >expected <<\EOF
acc = "c" "d";
"s1", "s2", "(a & !b)", "c" "d";
"s1", "s2", "a & !b", "c" "d";
"s2", "state 3", "\"F\\G\"", "c";
"state 3", "s1", "1",;
EOF

View file

@ -39,7 +39,7 @@ digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="s1"]
1 -> 2 [label="(a & !b)\n{Acc[d], Acc[c]}"]
1 -> 2 [label="a & !b\n{Acc[d], Acc[c]}"]
2 [label="s2"]
2 -> 3 [label="a\n{Acc[c]}"]
3 [label="state 3"]

View file

@ -49,12 +49,12 @@ EOF
cat >expected <<EOF
acc = "p1" "p2" "p3" "p4";
"s1 * s1 * s1", "s3 * s2 * s2", "(a & b)", "p1" "p2";
"s1 * s1 * s1", "s2 * s2 * s2", "(a & b)", "p1" "p2";
"s1 * s1 * s1", "s3 * s2 * s3", "(a & b)", "p1" "p2";
"s1 * s1 * s1", "s3 * s2 * s2", "a & b", "p1" "p2";
"s1 * s1 * s1", "s2 * s2 * s2", "a & b", "p1" "p2";
"s1 * s1 * s1", "s3 * s2 * s3", "a & b", "p1" "p2";
"s1 * s1 * s1", "s2 * s2 * s3", "b", "p1" "p2";
"s2 * s2 * s2", "s3 * s1 * s3", "(a & c)", "p3" "p4";
"s2 * s2 * s3", "s3 * s1 * s2", "(a & c)", "p3" "p4";
"s2 * s2 * s2", "s3 * s1 * s3", "a & c", "p3" "p4";
"s2 * s2 * s3", "s3 * s1 * s2", "a & c", "p3" "p4";
EOF
run 0 ./tripprod input1 input2 input3 > stdout
@ -62,7 +62,7 @@ run 0 ./tripprod input1 input2 input3 > stdout
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
perl -pe 's/("\w+") ("\w+")(?: ("\w+"))?(?: ("\w+"))?/@{[sort $1,$2,$3,$4]}/g;
s/\(c & a\)/(a & c)/g;s/\(b & a\)/(a & b)/g' \
s/c & a/a & c/g;s/b & a/a & b/g' \
stdout > tmp_ &&
mv tmp_ stdout