#!/bin/sh # -*- coding: utf-8 -*- # Copyright (C) 2015-2018, 2020 Laboratoire de Recherche et # Développement de l'Epita (LRDE). # # 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 3 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 this program. If not, see . . ./defs set -e cat >test1 < (p1))))))' | ltl2dstar -H - - | fmt This Rabin automaton was incorrectly reduced at some point. */ HOA: v1 States: 4 properties: implicit-labels trans-labels no-univ-branch deterministic complete stutter-insensitive comment: "Safra[NBA=3]" acc-name: Rabin 2 Acceptance: 4 (Fin(0)&Inf(1))|(Fin(2)&Inf(3)) Start: 1 AP: 2 "p0" "p1" --BODY-- State: 0 {2} 2 0 2 3 State: 1 {0 2} 2 1 2 2 State: 2 {1 2} 2 0 2 2 State: 3 {3} 2 0 2 3 --END-- /* This is the square of smaller.hoa from issue #188. */ HOA: v1 States: 37 Start: 0 AP: 2 "a" "b" Acceptance: 24 (Inf(11) | Fin(5)) & (Inf(10) | Fin(4)) & (Inf(9) | Fin(3)) & (Inf(8) | Fin(2)) & (Inf(7) | Fin(1)) & (Inf(6) | Fin(0)) & (Inf(23) | Fin(17)) & (Inf(22) | Fin(16)) & (Inf(21) | Fin(15)) & (Inf(20) | Fin(14)) & (Inf(19) | Fin(13)) & (Inf(18) | Fin(12)) properties: trans-labels explicit-labels trans-acc complete --BODY-- State: 0 [!0] 0 {0 12} [0] 1 [0&1] 2 [0&1] 3 [0&1] 4 State: 1 [t] 1 {1 13} [1] 2 {1} [1] 3 {13} [1] 4 State: 2 [t] 2 {1 14} [!1] 5 {1} [1] 4 {14} State: 3 [t] 3 {2 13} [1] 4 {2} [!1] 6 {13} State: 4 [t] 4 {2 14} [!1] 7 {2} [!1] 8 {14} [!1] 9 State: 5 [t] 5 {1 15} [1] 10 {1} [1] 7 {15} [1] 11 State: 6 [t] 6 {3 13} [1] 8 {3} [1] 12 {13} [1] 13 State: 7 [t] 7 {2 15} [1] 11 {2} [!1] 9 {15} State: 8 [t] 8 {3 14} [!1] 9 {3} [1] 13 {14} State: 9 [t] 9 {3 15} [1] 14 {3} [1] 15 {15} [1] 16 State: 10 [t] 10 {1 16} [!1] 17 {1} [1] 11 {16} State: 11 [t] 11 {2 16} [!1] 18 {2} [!1] 14 {16} [!1] 19 State: 12 [t] 12 {4 13} [1] 13 {4} [!1] 20 {13} State: 13 [t] 13 {4 14} [!1] 15 {4} [!1] 21 {14} [!1] 22 State: 14 [t] 14 {3 16} [!1] 19 {3} [1] 16 {16} State: 15 [t] 15 {4 15} [1] 16 {4} [!1] 22 {15} State: 16 [t] 16 {4 16} [!1] 23 {4} [!1] 24 {16} [!1] 25 State: 17 [1] 26 {1 23} [!1] 17 {1 17} [1] 27 {23} State: 18 [1] 27 {2 23} [!1] 18 {2 17} [!1] 19 {17} State: 19 [1] 28 {3 23} [!1] 19 {3 17} [1] 29 {23} State: 20 [1] 30 {11 13} [1] 31 {11} [!1] 20 {5 13} State: 21 [1] 31 {11 14} [!1] 21 {5 14} [!1] 22 {5} State: 22 [1] 32 {11 15} [1] 33 {11} [!1] 22 {5 15} State: 23 [1] 29 {4 23} [!1] 23 {4 17} [!1] 25 {17} State: 24 [1] 33 {11 16} [!1] 24 {5 16} [!1] 25 {5} State: 25 [1] 34 {11 23} [!1] 25 {5 17} State: 26 [t] 26 {1} [1] 27 State: 27 [t] 27 {2} [!1] 28 State: 28 [t] 28 {3} [1] 29 State: 29 [t] 29 {4} [!1] 35 State: 30 [t] 30 {13} [1] 31 State: 31 [t] 31 {14} [!1] 32 State: 32 [t] 32 {15} [1] 33 State: 33 [t] 33 {16} [!1] 36 State: 34 [t] 34 State: 35 [1] 34 {11} [!1] 35 {5} State: 36 [1] 34 {23} [!1] 36 {17} --END-- HOA: v1 States: 2 Acceptance: 3 Fin(0) | (Fin(1)&Inf(2)) Start: 0 AP: 1 "a" --BODY-- State: 0 {0} [0] 1 [!0] 0 State: 1 {2} [0] 1 [!0] 0 --END-- /* ** This random automaton caused remove_fin() to output ** an automaton with transition-based acceptance incorrectly marked as ** state-based. */ HOA: v1 States: 10 Start: 0 AP: 2 "p0" "p1" Acceptance: 4 Fin(1) | (Fin(2) & Fin(3) & Fin(0)) properties: trans-labels explicit-labels trans-acc --BODY-- State: 0 [!0&1] 5 [!0&1] 7 State: 1 [0&!1] 2 {2} [0&1] 9 {1} [!0&1] 1 [0&!1] 6 {1 3} State: 2 [!0&1] 8 {0 1} [!0&!1] 1 {1} State: 3 [!0&1] 5 {1} [0&1] 2 State: 4 [0&!1] 4 {1} [0&1] 6 {0} [0&1] 5 {1} State: 5 [0&1] 9 {1} State: 6 [0&1] 5 {2 3} [!0&1] 9 {2} [!0&1] 4 State: 7 [0&!1] 8 {3} [!0&!1] 7 {2} [0&!1] 3 {2} [!0&1] 5 {1} State: 8 [!0&1] 8 {2} [!0&!1] 3 {1} [!0&1] 4 State: 9 [0&!1] 6 {0 3} [!0&1] 2 --END-- /* Exposed the bug from issue #279 */ HOA: v1 States: 3 Start: 0 AP: 2 "b" "c" Acceptance: 3 Fin(0) & (Inf(1)&Inf(2)) properties: trans-labels explicit-labels trans-acc complete --BODY-- State: 0 [!0] 0 {1 2} [0] 0 {0 1 2} [0&!1] 1 [0&1] 2 State: 1 [!0 | !1] 1 {1 2} [0&1] 2 {1} State: 2 [!1] 1 {1 2} [1] 2 {1} --END-- /* ** Issue #313. The TGBA conversion of this automaton was wrong. */ HOA: v1 States: 2 Start: 0 AP: 3 "a" "b" "c" Acceptance: 4 (Fin(1)|Fin(2)) & Fin(0) & Inf(3) properties: trans-labels explicit-labels trans-acc complete --BODY-- State: 0 [t] 0 {0 3} [1 | 2] 0 {1 3} [0] 0 {2 3} [!1&!2] 1 {1} State: 1 [2] 0 {0 3} [2] 0 {1 3} [0&2] 0 {2 3} [!2] 1 {0} [!2] 1 {1} [0&!2] 1 {2} --END-- EOF cat >expected <expected-tgba < output cat output diff -u output expected run 0 autfilt -H --tgba test1 > output cat output diff -u output expected-tgba # Issue #324. cat > 324 < out test 2 = `autfilt -c --reject-word='a;cycle{!a&!b}' 324 out` # Add 10 small random automata for the next case randaut -A'random 6' -Q10 -n10 3 -Hl >> test1 # make sure the above expected automata are correct autcross --verbose --language-preserved -Ftest1 \ 'autfilt --remove-fin' 'autfilt --tgba' # do it again, but make sure autfilt uses streett_to_generalized_buchi # whenever buchi, and that autcross does not. This helps findings bug # in streett_to_generalized_buchi(). SPOT_STREETT_CONV_MIN=0 \ autcross --language-preserved -Ftest1 \ 'SPOT_STREETT_CONV_MIN=1 autfilt --remove-fin %H>%O' \ 'SPOT_STREETT_CONV_MIN=1 autfilt --tgba %H>%O' ltl2tgba true > h1 autfilt -F h1 --acceptance-is=Fin-less autfilt --complement -F h1 > h2 autfilt -F h2 --acceptance-is=f autfilt -F h2 --acceptance-is=Fin-less && exit 1 autfilt --remove-fin -F h2 | autfilt --acceptance-is=Fin-less