Preliminirary support for generic acceptance.

* src/tgba/acc.hh: Add creation and printing of generic acceptance
code.
* src/tgba/acc.cc: New file.
* src/tgba/Makefile.am: Add it.
* src/tgbatest/acc.cc: More tests.
* src/tgbatest/acc.test: Update.
* src/tgba/tgba.hh (set_acceptance, get_acceptance): New methods.
* src/tgba/tgbagraph.hh: Store acceptance code.
* src/hoaparse/hoaparse.yy: Read any acceptance.
* src/dstarparse/nsa2tgba.cc, src/ta/taexplicit.cc,
src/tgba/tgbaproduct.cc, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/degen.cc, src/tgbaalgos/hoa.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/product.cc, src/tgbaalgos/stutter.cc,
src/tgbatest/hoaparse.test: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-02-18 11:28:03 +01:00
parent c61f053e2d
commit fd1f6c4d61
19 changed files with 778 additions and 176 deletions

View file

@ -1321,9 +1321,6 @@ EOF
# Acceptance: 1 Inf(0)
# and a development version of our parser would
# incorrectly interpret the former as the latter.
#
# Make sure we ignore all {0} if the acceptance is "1 t".
# See https://github.com/adl/hoaf/issues/36
cat >input <<EOF
HOA: v1
@ -1362,46 +1359,83 @@ State: 0
--END--
EOF
# The mapping of acceptance sets for the second automaton is
# input -> output
# 0 -> 0
# 1 -> removed
# 2 -> 1
# 3 -> removed
# 4 -> 2
# !2 -> 3
expectok input <<EOF
expectok input -v --is-empty <<EOF
HOA: v1
name: "TGBA for Fa"
States: 2
Start: 0
AP: 1 "a"
acc-name: all
Acceptance: 0 t
properties: trans-labels explicit-labels state-acc complete deterministic
Acceptance: 1 t
properties: trans-labels explicit-labels trans-acc complete deterministic
--BODY--
State: 0 "F(a)"
[0] 1
[0] 1 {0}
[!0] 0
State: 1 "t"
[t] 1
[t] 1 {0}
--END--
HOA: v1
States: 1
Start: 0
AP: 3 "a" "b" "c"
acc-name: generalized-Buchi 4
Acceptance: 4 Inf(0)&Inf(1)&Inf(2)&Inf(3)
Acceptance: 6 Inf(0)&Inf(2)&Inf(4)&Inf(5)
properties: trans-labels explicit-labels trans-acc complete deterministic
--BODY--
State: 0
[0&1&2] 0 {0 1 2}
[!0&1&2] 0 {1 2}
[0&!1&2] 0 {0 1}
[!0&!1&2] 0 {1}
[0&1&!2] 0 {0 2 3}
[!0&1&!2] 0 {2 3}
[0&!1&!2] 0 {0 3}
[!0&!1&!2] 0 {3}
[0&1&2] 0 {0 2 4}
[!0&1&2] 0 {2 4}
[0&!1&2] 0 {0 2}
[!0&!1&2] 0 {2}
[0&1&!2] 0 {0 4 5}
[!0&1&!2] 0 {4 5}
[0&!1&!2] 0 {0 5}
[!0&!1&!2] 0 {5}
--END--
EOF
# FIXME: Test removal of useless acceptance sets
#
# # The mapping of acceptance sets for the second automaton is
# # input -> output
# # 0 -> 0
# # 1 -> removed
# # 2 -> 1
# # 3 -> removed
# # 4 -> 2
# # !2 -> 3
# expectok input <<EOF
# HOA: v1
# name: "TGBA for Fa"
# States: 2
# Start: 0
# AP: 1 "a"
# acc-name: all
# Acceptance: 0 t
# properties: trans-labels explicit-labels state-acc complete deterministic
# --BODY--
# State: 0 "F(a)"
# [0] 1
# [!0] 0
# State: 1 "t"
# [t] 1
# --END--
# HOA: v1
# States: 1
# Start: 0
# AP: 3 "a" "b" "c"
# acc-name: generalized-Buchi 4
# Acceptance: 4 Inf(0)&Inf(1)&Inf(2)&Inf(3)
# properties: trans-labels explicit-labels trans-acc complete deterministic
# --BODY--
# State: 0
# [0&1&2] 0 {0 1 2}
# [!0&1&2] 0 {1 2}
# [0&!1&2] 0 {0 1}
# [!0&!1&2] 0 {1}
# [0&1&!2] 0 {0 2 3}
# [!0&1&!2] 0 {2 3}
# [0&!1&!2] 0 {0 3}
# [!0&!1&!2] 0 {3}
# --END--
# EOF