hoa: output acc-name for several acceptance types
So far the HOA output would emit an acc-name only for generalized-Buchi or inferior types (Buchi, all). It now knows about none, co-Buchi, generalized-co-Buchi, Rabin, Streett, and generalized-Rabin as well. * src/twa/acc.cc, src/twa/acc.hh: Add detection code. * src/twaalgos/hoa.cc: Use it. * src/tests/remfin.test, src/tests/maskacc.test, src/tests/complete.test, src/tests/sim3.test, src/tests/ltl2dstar.test: Adjust tests. * src/tests/hoaparse.test: Adjust and add more tests.
This commit is contained in:
parent
8e1c846984
commit
d276f73eed
9 changed files with 371 additions and 15 deletions
|
|
@ -64,6 +64,7 @@ HOA: v1
|
|||
States: 3
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
acc-name: co-Buchi
|
||||
Acceptance: 1 Fin(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
|
|
@ -99,6 +100,7 @@ HOA: v1
|
|||
States: 2
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
acc-name: none
|
||||
Acceptance: 0 f
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
|
|
|
|||
|
|
@ -1375,6 +1375,7 @@ HOA: v1
|
|||
States: 2
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
|
|
@ -1428,6 +1429,7 @@ HOA: v1
|
|||
States: 2
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
|
|
@ -1731,3 +1733,188 @@ expecterr input <<EOF
|
|||
input:4.8-12: alternation is not yet supported
|
||||
autfilt: failed to read automaton from input
|
||||
EOF
|
||||
|
||||
|
||||
cat >input <<EOF
|
||||
HOA: v1
|
||||
tool: "Rabinizer" "3"
|
||||
name: "DTGRA for (G F a | F G b)"
|
||||
properties: deterministic
|
||||
States: 1
|
||||
Start: 0
|
||||
Acceptance: 4 (Fin(0)&Inf(1)) | (Fin(2)&Inf(3))
|
||||
AP: 2 "a" "b"
|
||||
--BODY--
|
||||
State: 0
|
||||
0 {2} /*{}*/
|
||||
0 {1 2} /*{a}*/
|
||||
0 {3} /*{b}*/
|
||||
0 {3 1} /*{a, b}*/
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 4 (Fin(0) | Inf(1)) & (Fin(2) | Inf(3))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {2}
|
||||
[0&!1] 0 {1 2}
|
||||
[!0&1] 0 {3}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 6 Fin(0) | (Fin(1) & Inf(2) & Inf(3)) | (Fin(4) & Inf(5))
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {0 1 4}
|
||||
[0&!1] 0 {2 4}
|
||||
[!0&1] 0 {3 5}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 3 Fin(0)|Fin(1)|Fin(2)
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {0 1}
|
||||
[0&!1] 0 {1}
|
||||
[!0&1] 0 {2}
|
||||
[0&1] 0 {}
|
||||
--END--
|
||||
EOF
|
||||
|
||||
expectok input <<EOF
|
||||
HOA: v1
|
||||
name: "DTGRA for (G F a | F G b)"
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {2}
|
||||
[0&!1] 0 {1 2}
|
||||
[!0&1] 0 {3}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Streett 2
|
||||
Acceptance: 4 (Fin(0) | Inf(1)) & (Fin(2) | Inf(3))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {2}
|
||||
[0&!1] 0 {1 2}
|
||||
[!0&1] 0 {3}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: generalized-Rabin 3 0 2 1
|
||||
Acceptance: 6 Fin(0) | (Fin(1) & (Inf(2)&Inf(3))) | (Fin(4) & Inf(5))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {0 1 4}
|
||||
[0&!1] 0 {2 4}
|
||||
[!0&1] 0 {3 5}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: generalized-co-Buchi 3
|
||||
Acceptance: 3 Fin(0)|Fin(1)|Fin(2)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {0 1}
|
||||
[0&!1] 0 {1}
|
||||
[!0&1] 0 {2}
|
||||
[0&1] 0
|
||||
--END--
|
||||
EOF
|
||||
|
||||
# The complements are Streett and Rabin, but the acceptance set are
|
||||
# not ordered in the way we call "Streett" and "Rabin" in the HOA
|
||||
# specifications.
|
||||
expectok input --complement-acc <<EOF
|
||||
HOA: v1
|
||||
name: "DTGRA for (G F a | F G b)"
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 4 (Inf(0) | Fin(1)) & (Inf(2) | Fin(3))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {2}
|
||||
[0&!1] 0 {1 2}
|
||||
[!0&1] 0 {3}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 4 (Fin(1) & Inf(0)) | (Fin(3) & Inf(2))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {2}
|
||||
[0&!1] 0 {1 2}
|
||||
[!0&1] 0 {3}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 6 (Inf(1) | (Fin(2)|Fin(3))) & (Inf(4) | Fin(5)) & Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {0 1 4}
|
||||
[0&!1] 0 {2 4}
|
||||
[!0&1] 0 {3 5}
|
||||
[0&1] 0 {1 3}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: generalized-Buchi 3
|
||||
Acceptance: 3 Inf(0)&Inf(1)&Inf(2)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0 {0 1}
|
||||
[0&!1] 0 {1}
|
||||
[!0&1] 0 {2}
|
||||
[0&1] 0
|
||||
--END--
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ HOA: v1
|
|||
States: 5
|
||||
Start: 3
|
||||
AP: 2 "b" "a"
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
||||
properties: implicit-labels state-acc complete deterministic
|
||||
--BODY--
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ HOA: v1
|
|||
States: 4
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: co-Buchi
|
||||
Acceptance: 1 Fin(0)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
--BODY--
|
||||
|
|
@ -72,6 +73,7 @@ HOA: v1
|
|||
States: 4
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: co-Buchi
|
||||
Acceptance: 1 Fin(0)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
--BODY--
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ HOA: v1
|
|||
States: 1
|
||||
Start: 0
|
||||
AP: 0
|
||||
acc-name: none
|
||||
Acceptance: 0 f
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ HOA: v1
|
|||
States: 7
|
||||
Start: 0
|
||||
AP: 2 "b" "a"
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
||||
properties: implicit-labels state-acc complete deterministic
|
||||
--BODY--
|
||||
|
|
@ -54,6 +55,7 @@ HOA: v1
|
|||
States: 5
|
||||
Start: 0
|
||||
AP: 2 "b" "a"
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue