hoa: add alias support

* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Test it.
This commit is contained in:
Alexandre Duret-Lutz 2014-11-21 11:05:24 +01:00
parent 691ab05926
commit 7a03228880
2 changed files with 83 additions and 3 deletions

View file

@ -322,3 +322,67 @@ EOF
expecterr input <<EOF
input:13.7: too many transition for this state, ignoring this one
EOF
cat >input <<EOF
HOA: v1
name: "GFa & GF(b & c)"
States: 1
Start: 0
acc-name: generalized-Buchi 2
Acceptance: 2 (Inf(0) & Inf(1))
AP: 3 "a" "b" "c"
Alias: @a 0
Alias: @a 1 & 2 /* should be @bc */
--BODY--
State: 0
[!@a & !@bc] 0
[@a & !@bc] 0 {0}
[!@a & @bc] 0 {1}
[@a & @bc] 0 {0 1}
--END--
EOF
expecterr input <<EOF
input:9.5-19: ignoring redefinition of alias @a
input:12.13-15: unknown alias @bc
input:13.12-14: unknown alias @bc
input:14.12-14: unknown alias @bc
input:15.11-13: unknown alias @bc
EOF
cat >input <<EOF
HOA: v1
name: "GFa & GF(b & c)"
States: 1
Start: 0
acc-name: generalized-Buchi 2
Acceptance: 2 (Inf(0) & Inf(1))
AP: 3 "a" "b" "c"
Alias: @a 0
Alias: @bc 1 & 2
--BODY--
State: 0
[!@a & !@bc] 0
[@a & !@bc] 0 {0}
[!@a & @bc] 0 {1}
[@a & @bc] 0 {0 1}
--END--
EOF
expectok input <<EOF
HOA: v1
States: 1
Start: 0
AP: 3 "a" "b" "c"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: trans-labels explicit-labels trans-acc complete deterministic
--BODY--
State: 0
[!0&!1 | !0&!2] 0
[0&!1 | 0&!2] 0 {0}
[!0&1&2] 0 {1}
[0&1&2] 0 {0 1}
--END--
EOF