* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Add support for a colored option. * bin/common_post.cc, bin/common_post.hh bin/autfilt.cc, bin/ltl2tgba.cc, bin/dstar2tgba.cc: Add support for --colored-parity. * bin/ltldo.cc: Adjust as well for consistency, even if --parity and --colored-parity is not used here. * tests/core/parity2.test: Add tests. * doc/org/autfilt.org, doc/org/ltl2tgba.org: Add examples. * NEWS: Mention --colored-parity.
460 lines
8.2 KiB
Bash
Executable file
460 lines
8.2 KiB
Bash
Executable file
#!/bin/sh
|
|
# -*- coding: utf-8 -*-
|
|
# Copyright (C) 2018 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 <http://www.gnu.org/licenses/>.
|
|
|
|
. ./defs
|
|
set -e
|
|
|
|
rm -rf res res2
|
|
|
|
for x in P 'Pmin odd' 'Pmax even' p 'pmin odd' 'pmax even'; do
|
|
ltl2tgba "-$x" FGa 'GFa & GFb' >>res
|
|
ltl2tgba FGa 'GFa & GFb' | autfilt --name=%M --high "-$x" >>res2
|
|
ltl2tgba -D "-$x" FGa 'GFa & GFb' >>res3
|
|
ltl2tgba FGa 'GFa & GFb' | autfilt -D --name=%M --high "-$x" >>res4
|
|
done
|
|
|
|
cat >expected<<EOF
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: Buchi
|
|
Acceptance: 1 Inf(0)
|
|
properties: trans-labels explicit-labels state-acc stutter-invariant
|
|
properties: inherently-weak
|
|
--BODY--
|
|
State: 0
|
|
[t] 0
|
|
[0] 1
|
|
State: 1 {0}
|
|
[0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Buchi
|
|
Acceptance: 1 Inf(0)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {0}
|
|
[!1] 0
|
|
[!0&1] 1
|
|
State: 1
|
|
[0] 0 {0}
|
|
[!0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: Rabin 1
|
|
Acceptance: 2 Fin(0) & Inf(1)
|
|
properties: trans-labels explicit-labels state-acc stutter-invariant
|
|
properties: inherently-weak
|
|
--BODY--
|
|
State: 0
|
|
[t] 0
|
|
[0] 1
|
|
State: 1 {1}
|
|
[0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Rabin 1
|
|
Acceptance: 2 Fin(0) & Inf(1)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {1}
|
|
[!1] 0
|
|
[!0&1] 1
|
|
State: 1
|
|
[0] 0 {1}
|
|
[!0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: Buchi
|
|
Acceptance: 1 Inf(0)
|
|
properties: trans-labels explicit-labels state-acc stutter-invariant
|
|
properties: inherently-weak
|
|
--BODY--
|
|
State: 0
|
|
[t] 0
|
|
[0] 1
|
|
State: 1 {0}
|
|
[0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Buchi
|
|
Acceptance: 1 Inf(0)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {0}
|
|
[!1] 0
|
|
[!0&1] 1
|
|
State: 1
|
|
[0] 0 {0}
|
|
[!0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: Streett 1
|
|
Acceptance: 2 Fin(0) | Inf(1)
|
|
properties: trans-labels explicit-labels state-acc colored
|
|
properties: stutter-invariant inherently-weak
|
|
--BODY--
|
|
State: 0 {0}
|
|
[t] 0
|
|
[0] 1
|
|
State: 1 {1}
|
|
[0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Streett 1
|
|
Acceptance: 2 Fin(0) | Inf(1)
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {1}
|
|
[!1] 0 {0}
|
|
[!0&1] 1 {0}
|
|
State: 1
|
|
[0] 0 {1}
|
|
[!0] 1 {0}
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: parity min odd 3
|
|
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
|
|
properties: trans-labels explicit-labels state-acc colored
|
|
properties: stutter-invariant inherently-weak
|
|
--BODY--
|
|
State: 0 {2}
|
|
[t] 0
|
|
[0] 1
|
|
State: 1 {1}
|
|
[0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: parity min odd 3
|
|
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {1}
|
|
[!1] 0 {2}
|
|
[!0&1] 1 {2}
|
|
State: 1
|
|
[0] 0 {1}
|
|
[!0] 1 {2}
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: parity max even 3
|
|
Acceptance: 3 Inf(2) | (Fin(1) & Inf(0))
|
|
properties: trans-labels explicit-labels state-acc colored
|
|
properties: stutter-invariant inherently-weak
|
|
--BODY--
|
|
State: 0 {1}
|
|
[t] 0
|
|
[0] 1
|
|
State: 1 {2}
|
|
[0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: parity max even 3
|
|
Acceptance: 3 Inf(2) | (Fin(1) & Inf(0))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {2}
|
|
[!1] 0 {1}
|
|
[!0&1] 1 {1}
|
|
State: 1
|
|
[0] 0 {2}
|
|
[!0] 1 {1}
|
|
--END--
|
|
EOF
|
|
|
|
diff expected res
|
|
diff expected res2
|
|
|
|
cat >expected2<<EOF
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: Rabin 1
|
|
Acceptance: 2 Fin(0) & Inf(1)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[!0] 0
|
|
[0] 1 {1}
|
|
State: 1
|
|
[!0] 0 {0}
|
|
[0] 1 {1}
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Buchi
|
|
Acceptance: 1 Inf(0)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {0}
|
|
[!1] 0
|
|
[!0&1] 1
|
|
State: 1
|
|
[0] 0 {0}
|
|
[!0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: Rabin 1
|
|
Acceptance: 2 Fin(0) & Inf(1)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[!0] 0
|
|
[0] 1 {1}
|
|
State: 1
|
|
[!0] 0 {0}
|
|
[0] 1 {1}
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Rabin 1
|
|
Acceptance: 2 Fin(0) & Inf(1)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {1}
|
|
[!1] 0
|
|
[!0&1] 1
|
|
State: 1
|
|
[0] 0 {1}
|
|
[!0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: parity max even 2
|
|
Acceptance: 2 Fin(1) & Inf(0)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[!0] 0
|
|
[0] 1 {0}
|
|
State: 1
|
|
[!0] 0 {1}
|
|
[0] 1 {0}
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Buchi
|
|
Acceptance: 1 Inf(0)
|
|
properties: trans-labels explicit-labels trans-acc complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {0}
|
|
[!1] 0
|
|
[!0&1] 1
|
|
State: 1
|
|
[0] 0 {0}
|
|
[!0] 1
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: parity min odd 3
|
|
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[!0] 0 {2}
|
|
[0] 1 {1}
|
|
State: 1
|
|
[!0] 0 {0}
|
|
[0] 1 {1}
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: Streett 1
|
|
Acceptance: 2 Fin(0) | Inf(1)
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {1}
|
|
[!1] 0 {0}
|
|
[!0&1] 1 {0}
|
|
State: 1
|
|
[0] 0 {1}
|
|
[!0] 1 {0}
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: parity min odd 3
|
|
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[!0] 0 {2}
|
|
[0] 1 {1}
|
|
State: 1
|
|
[!0] 0 {0}
|
|
[0] 1 {1}
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: parity min odd 3
|
|
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {1}
|
|
[!1] 0 {2}
|
|
[!0&1] 1 {2}
|
|
State: 1
|
|
[0] 0 {1}
|
|
[!0] 1 {2}
|
|
--END--
|
|
HOA: v1
|
|
name: "FGa"
|
|
States: 2
|
|
Start: 0
|
|
AP: 1 "a"
|
|
acc-name: parity max even 4
|
|
Acceptance: 4 Fin(3) & (Inf(2) | (Fin(1) & Inf(0)))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[!0] 0 {1}
|
|
[0] 1 {2}
|
|
State: 1
|
|
[!0] 0 {3}
|
|
[0] 1 {2}
|
|
--END--
|
|
HOA: v1
|
|
name: "G(Fa & Fb)"
|
|
States: 2
|
|
Start: 0
|
|
AP: 2 "a" "b"
|
|
acc-name: parity max even 3
|
|
Acceptance: 3 Inf(2) | (Fin(1) & Inf(0))
|
|
properties: trans-labels explicit-labels trans-acc colored complete
|
|
properties: deterministic stutter-invariant
|
|
--BODY--
|
|
State: 0
|
|
[0&1] 0 {2}
|
|
[!1] 0 {1}
|
|
[!0&1] 1 {1}
|
|
State: 1
|
|
[0] 0 {2}
|
|
[!0] 1 {1}
|
|
--END--
|
|
EOF
|
|
diff expected2 res3
|
|
diff expected2 res4
|
|
|
|
ltlcross 'ltl2tgba -P' 'ltl2tgba -P"odd max"' 'ltl2tgba -P"even min"' \
|
|
'ltl2tgba -p' 'ltl2tgba -p"odd max"' 'ltl2tgba -p"even min"' \
|
|
-f FGa -f 'GFa&GFb' -f 'GF(a <-> XXXb)'
|