hoa: fix I/O of determinism

Fixes #212.

* spot/parseaut/parseaut.yy, spot/twaalgos/hoa.cc: Recognize
exist-branch, and adjust printer to the 1.1 semantics.
* tests/core/alternating.test, tests/core/complete.test,
tests/core/det.test, tests/core/explsum.test,
tests/core/parseaut.test, tests/core/readsave.test,
tests/core/sbacc.test, tests/core/tgbagraph.test,
tests/python/alternating.py, tests/python/dualize.py: Adjust test
cases.
* NEWS: Mention the change.
This commit is contained in:
Alexandre Duret-Lutz 2017-07-31 21:03:49 +02:00
parent 0cf250d839
commit d3607a7ce3
13 changed files with 291 additions and 106 deletions

View file

@ -129,7 +129,7 @@ diff expect.dot alt.dot
autfilt --trust=no --check=strength alt.hoa | grep properties: >output
cat >expected <<EOF
properties: univ-branch trans-labels explicit-labels state-acc
properties: trans-labels explicit-labels state-acc univ-branch
properties: very-weak
EOF
diff output expected
@ -168,7 +168,7 @@ Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: trans-labels explicit-labels state-acc complete univ-branch
properties: very-weak
--BODY--
State: 0 {0}
@ -211,8 +211,8 @@ Start: 0
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc complete
properties: deterministic
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[0] 0
@ -232,8 +232,8 @@ Start: 0&1
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc complete
properties: deterministic
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[0] 0
@ -253,8 +253,8 @@ Start: 0
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc complete
properties: deterministic
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[0] 1
@ -280,8 +280,8 @@ Start: 0&2
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc
properties: deterministic
properties: trans-labels explicit-labels trans-acc deterministic
properties: univ-branch
--BODY--
State: 0
[0] 0
@ -301,8 +301,8 @@ Start: 0&2&4
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc
properties: deterministic
properties: trans-labels explicit-labels trans-acc deterministic
properties: univ-branch
--BODY--
State: 0
[0] 0
@ -325,8 +325,8 @@ Start: 0&1
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc complete
properties: deterministic
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[0] 0
@ -343,8 +343,8 @@ Start: 0&1&3
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc
properties: deterministic
properties: trans-labels explicit-labels trans-acc deterministic
properties: univ-branch
--BODY--
State: 0
[0] 0
@ -365,8 +365,8 @@ Start: 0&1
AP: 1 "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc complete
properties: deterministic
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[0] 0
@ -896,8 +896,8 @@ Start: 0&1
AP: 1 "p1"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels trans-acc
properties: deterministic
properties: trans-labels explicit-labels trans-acc deterministic
properties: univ-branch
--BODY--
State: 0 "p1"
[0] 2

View file

@ -195,8 +195,8 @@ Start: 0
AP: 2 "a" "b"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic very-weak
properties: trans-labels explicit-labels state-acc complete
properties: deterministic univ-branch very-weak
--BODY--
State: 0
[!0 | 1] 0
@ -210,8 +210,8 @@ Start: 0&1
AP: 0
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic
properties: trans-labels explicit-labels state-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[t] 0
@ -233,8 +233,8 @@ Start: 0
AP: 2 "a" "b"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc
properties: deterministic very-weak
properties: trans-labels explicit-labels state-acc deterministic
properties: univ-branch very-weak
--BODY--
State: 0
[!0 | 1] 0
@ -248,8 +248,8 @@ Start: 0&1
AP: 0
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc
properties: deterministic
properties: trans-labels explicit-labels state-acc deterministic
properties: univ-branch
--BODY--
State: 0
State: 1

View file

@ -153,7 +153,7 @@ AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc !complete
properties: !deterministic
properties: !deterministic exist-branch
spot.highlight.states: 0 1
spot.highlight.edges: 1 2 2 2
--BODY--
@ -178,7 +178,7 @@ AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc !complete
properties: !deterministic
properties: !deterministic exist-branch
spot.highlight.states: 1 1
--BODY--
State: 0 {0}
@ -202,7 +202,7 @@ AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc !complete
properties: !deterministic
properties: !deterministic exist-branch
spot.highlight.states: 1 5
spot.highlight.edges: 2 5 3 5
--BODY--
@ -263,7 +263,7 @@ AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc !complete
properties: !deterministic
properties: !deterministic exist-branch
spot.highlight.states: 0 2 1 5
spot.highlight.edges: 1 3 2 5 3 5
--BODY--

View file

@ -170,7 +170,7 @@ States: 6
Start: 5
AP: 3 "a" "b" "c"
Acceptance: 2 Inf(0) | Inf(1)
properties: univ-branch trans-labels explicit-labels trans-acc
properties: trans-labels explicit-labels trans-acc univ-branch
--BODY--
State: 0
[0] 0&1
@ -222,7 +222,7 @@ States: 7
Start: 0&2&5
AP: 3 "b" "a" "c"
Acceptance: 4 Fin(0) | Inf(1) | (Inf(2)&Inf(3))
properties: univ-branch trans-labels explicit-labels trans-acc
properties: trans-labels explicit-labels trans-acc univ-branch
--BODY--
State: 0
[1] 0 {0}
@ -254,7 +254,7 @@ States: 8
Start: 7
AP: 3 "b" "a" "c"
Acceptance: 4 Fin(0) | Inf(1) | (Inf(2)&Inf(3))
properties: univ-branch trans-labels explicit-labels trans-acc
properties: trans-labels explicit-labels trans-acc univ-branch
--BODY--
State: 0
[1] 0 {0}

View file

@ -690,12 +690,108 @@ State: 1
[!0] 1
[!0] 0
--END--
HOA: v1
States: 2
Start: 0
Start: 1
AP: 2 "a" "\"b\""
Acceptance: 1 Inf(0)
properties: !exist-branch univ-branch
--BODY--
State: 0 {0}
[1] 1
[!1] 0
State: 1
[!0] 1
[!0] 0
--END--
HOA: v1
States: 2
Start: 0
AP: 2 "a" "\"b\""
Acceptance: 1 Inf(0)
properties: !exist-branch univ-branch
--BODY--
State: 0 {0}
[1] 1
[!1] 0
State: 1
[!0] 1
[!0] 0
--END--
HOA: v1
States: 2
Start: 0&1
AP: 2 "a" "\"b\""
Acceptance: 1 Inf(0)
properties: exist-branch !univ-branch
--BODY--
State: 0 {0}
[1] 1
[!1] 0
State: 1
[!0] 1
[!0] 0
--END--
HOA: v1
States: 2
Start: 0
AP: 2 "a" "\"b\""
Acceptance: 1 Inf(0)
properties: exist-branch !univ-branch
--BODY--
State: 0 {0}
[1] 1
[!1] 0
State: 1
[!0] 1&0
--END--
HOA: v1
States: 2
Start: 0&1 /* This is ok in the v1 format */
AP: 2 "a" "b"
Acceptance: 1 Inf(0)
properties: deterministic
--BODY--
State: 0 {0}
[1] 1
[!1] 0
State: 1
[!0] 0
--END--
HOA: v1.1
States: 2
Start: 0&1 /* This is NOT ok since v1.1 */
AP: 2 "a" "b"
Acceptance: 1 Inf(0)
properties: deterministic
--BODY--
State: 0 {0}
[1] 1
[!1] 0
State: 1
[!0] 0
--END--
EOF
expecterr input <<EOF
input:7.13-25: deterministic automata should have at most one initial state
input:20.13-20: complete automata should have at least one initial state
input:33.1-35.6: automaton is not deterministic...
input:28.13-25: ... despite 'properties: deterministic'
input:43.13-25: universal automata should have at most one initial state
input:62.1-64.6: automaton has existential branching...
input:57.13-25: ... despite 'properties: !exist-branch'
input:58.9-64.6: automaton is has no universal branching...
input:57.27-37: ... despite 'properties: univ-branch'
input:68.1-10: conjunct initial state despite...
input:71.26-37: ... property: !univ-branch
input:91.6-8: universal branch used despite previous declaration...
input:85.26-37: ... here
input:86.9-91.8: automaton has no existential branching...
input:85.13-24: ... despite 'properties: exist-branch'
input:106.6-9: we can read HOA v1 but this file uses v1.1; $t
input:108.1-10: conjunct initial state despite...
input:111.13-25: ... property: deterministic
EOF
# Mix HOA with neverclaims and LBTT automata
@ -1960,7 +2056,7 @@ Start: 12
AP: 4 "p2" "c1" "p1" "c2"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc
properties: trans-labels explicit-labels state-acc univ-branch
properties: very-weak
--BODY--
State: 0 "X (G(c2))"
@ -2435,7 +2531,7 @@ Start: 0
AP: 2 "b" "a"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc
properties: trans-labels explicit-labels state-acc univ-branch
properties: very-weak
--BODY--
State: 0 "((((a) U (b)) && GF(b)) && FG(a))"
@ -2464,8 +2560,8 @@ Start: 0
AP: 2 "a" "b"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic
properties: trans-labels explicit-labels state-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[!0&!1] 0&1
@ -2641,7 +2737,7 @@ Start: 0
AP: 2 "b" "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: univ-branch trans-labels explicit-labels state-acc
properties: trans-labels explicit-labels state-acc univ-branch
properties: very-weak
--BODY--
State: 0 "((((a) U (b)) && GF(b)) && FG(a))"
@ -2670,8 +2766,8 @@ Start: 0
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic
properties: trans-labels explicit-labels state-acc complete
properties: deterministic univ-branch
--BODY--
State: 0
[!0&!1] 0&1

View file

@ -809,8 +809,8 @@ Start: 1
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: no-univ-branch trans-labels explicit-labels state-acc
properties: deterministic unambiguous semi-deterministic weak
properties: trans-labels explicit-labels state-acc deterministic
properties: no-univ-branch unambiguous semi-deterministic weak
properties: inherently-weak
--BODY--
State: 0

View file

@ -249,7 +249,7 @@ Start: 0
AP: 1 "a"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: univ-branch trans-labels explicit-labels state-acc
properties: trans-labels explicit-labels state-acc univ-branch
--BODY--
State: 0 {0}
[0] 3

View file

@ -260,8 +260,8 @@ Start: 2&0
AP: 0
acc-name: all
Acceptance: 0 t
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic
properties: trans-labels explicit-labels state-acc complete
properties: !deterministic univ-branch
--BODY--
State: 0
[t] 0