hoa: add option to output implicit labels

Fixes #59.

* src/tgbaalgos/hoa.cc: Add option i.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc,
src/tgbaalgos/hoa.hh: Document it.
* src/tgbatest/hoaparse.test: Test it.
This commit is contained in:
Alexandre Duret-Lutz 2015-02-28 12:48:23 +01:00
parent 5749fe6f7c
commit 566118a5be
5 changed files with 220 additions and 45 deletions

View file

@ -1439,3 +1439,101 @@ State: 0
[!0&!1&!2] 0 {3}
--END--
EOF
# Implicit labels
../../bin/ltl2tgba -H 'GFa & GFb & (c U d)' > out.hoa
../../bin/ltl2tgba -C -Hi 'GFa & GFb & (c U d)' > out-i.hoa
../../bin/autfilt -C -Hi out.hoa --name=%M > out-i2.hoa
diff out-i.hoa out-i2.hoa
cat >expected <<EOF
HOA: v1
name: "(c U d) & G(Fa & Fb)"
States: 3
Start: 1
AP: 4 "c" "d" "a" "b"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: implicit-labels trans-acc complete deterministic
--BODY--
State: 0
0
0
0
0
0 {0}
0 {0}
0 {0}
0 {0}
0 {1}
0 {1}
0 {1}
0 {1}
0 {0 1}
0 {0 1}
0 {0 1}
0 {0 1}
State: 1
2
1
0
0
2
1
0
0
2
1
0
0
2
1
0
0
State: 2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
--END--
EOF
diff out-i.hoa expected
expectok out-i.hoa --sbacc -Hi <<EOF
HOA: v1
States: 6
Start: 0
AP: 4 "c" "d" "a" "b"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: implicit-labels state-acc complete deterministic
--BODY--
State: 0
1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2
State: 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
State: 2
2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
State: 3 {0}
2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
State: 4 {1}
2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
State: 5 {0 1}
2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
--END--
EOF