ltlcross: detect remove_fin failures

Fixes #314, reported by František Blahoudek.

* bin/ltlcross.cc: Here.
* tests/core/ltlcross3.test: Add new test case.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2018-01-06 13:51:12 +01:00
parent a924bc561a
commit 020c981188
3 changed files with 132 additions and 51 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
# Copyright (C) 2012-2018 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -314,3 +314,64 @@ run 0 ltlcross --verbose --no-checks -f 'FGa' 'ltl2tgba'
ltlcross --products=0 ltl2tgba -f GFa -f FGa --csv=out.csv
grep product out.csv && exit 1
check_csv out.csv
#
cat >fake <<\EOF
case $1 in
"foo")
cat <<\END
HOA: v1
name: "foo"
States: 1
Start: 0
AP: 5 "p0" "p1" "p2" "p3" "p4"
acc-name: parity min odd 32
Acceptance: 32 Fin(0) & (Inf(1) | (Fin(2) & (Inf(3) | (Fin(4) &
(Inf(5) | (Fin(6) & (Inf(7) | (Fin(8) & (Inf(9) | (Fin(10) & (Inf(11)
| (Fin(12) & (Inf(13) | (Fin(14) & (Inf(15) | (Fin(16) & (Inf(17) |
(Fin(18) & (Inf(19) | (Fin(20) & (Inf(21) | (Fin(22) & (Inf(23) |
(Fin(24) & (Inf(25) | (Fin(26) & (Inf(27) | (Fin(28) & (Inf(29) |
(Fin(30) & Inf(31)))))))))))))))))))))))))))))))
--BODY--
State: 0
0 { 0} 0 { 1} 0 { 2} 0 { 3} 0 { 4} 0 { 5} 0 { 6} 0 { 7} 0 { 8} 0 { 9}
0 {10} 0 {11} 0 {12} 0 {13} 0 {14} 0 {15} 0 {16} 0 {17} 0 {18} 0 {19}
0 {20} 0 {21} 0 {22} 0 {23} 0 {24} 0 {25} 0 {26} 0 {27} 0 {28} 0 {29}
0 {30} 0 {31}
--END--
END
;;
"!(foo)")
cat <<\END
HOA: v1
name: "foo"
States: 1
Start: 0
AP: 5 "p0" "p1" "p2" "p3" "p4"
acc-name: parity min even 32
Acceptance: 32 Inf(0) | (Fin(1) & (Inf(2) | (Fin(3) & (Inf(4) |
(Fin(5) & (Inf(6) | (Fin(7) & (Inf(8) | (Fin(9) & (Inf(10) | (Fin(11)
& (Inf(12) | (Fin(13) & (Inf(14) | (Fin(15) & (Inf(16) | (Fin(17) &
(Inf(18) | (Fin(19) & (Inf(20) | (Fin(21) & (Inf(22) | (Fin(23) &
(Inf(24) | (Fin(25) & (Inf(26) | (Fin(27) & (Inf(28) | (Fin(29) &
(Inf(30) | Fin(31)))))))))))))))))))))))))))))))
--BODY--
State: 0
0 { 0} 0 { 1} 0 { 2} 0 { 3} 0 { 4} 0 { 5} 0 { 6} 0 { 7} 0 { 8} 0 { 9}
0 {10} 0 {11} 0 {12} 0 {13} 0 {14} 0 {15} 0 {16} 0 {17} 0 {18} 0 {19}
0 {20} 0 {21} 0 {22} 0 {23} 0 {24} 0 {25} 0 {26} 0 {27} 0 {28} 0 {29}
0 {30} 0 {31}
--END--
END
;;
esac
EOF
chmod +x fake
ltlcross './fake %f >%O' -f foo --verbose --csv=out.csv 2>stderr
cat stderr
test 2 = `grep -c 'info:.*-> failed (Too many .* used.)' stderr`
check_csv out.csv
ltlcross './fake %f >%O' -f foo --csv=out.csv 2>stderr
cat stderr
test 2 = `grep -c 'info: preproc.* failed (Too many .* used.)' stderr`