remfin: deal with almost-Rabin automata
I.e., automata that could be Rabin if we add some empty Fin(x) or full Inf(y) sets. This way it does not matter when remove_fin() is called after cleanup_acceptance(). * src/twaalgos/remfin.cc: Implement that. * src/tests/remfin.test: More tests.
This commit is contained in:
parent
ef1bbfc659
commit
5f0b6dc36c
2 changed files with 376 additions and 37 deletions
|
|
@ -158,7 +158,7 @@ State: 7 {3}
|
|||
[!0] 6
|
||||
[0] 4
|
||||
--END--
|
||||
/* echo 'i F ^ F p1 U p0 V G p0 p1 F V f p0' | ltl2dstar -H - - */
|
||||
/* echo 'i F ^ F p1 U p0 V G p0 p1 F V f p0' | ltl2dstar -H - - | fmt */
|
||||
HOA: v1 States: 14 properties: implicit-labels
|
||||
trans-labels no-univ-branch deterministic complete comment:
|
||||
"Union{Safra[NBA=9],Safra[NBA=2]}" acc-name: Rabin 5 Acceptance: 10
|
||||
|
|
@ -170,6 +170,42 @@ State: 6 {1 2 4 6 9} 12 11 4 6 State: 7 {1 2 4 6 9} 12 12 4 7 State:
|
|||
8 {0 2 4 6 9} 12 12 8 8 State: 9 {2 4 6 9} 12 11 1 3 State: 10 {1 2 4
|
||||
6 8} 10 12 5 8 State: 11 {1 2 4 6 8} 12 11 8 6 State: 12 {0 2 4 6 8}
|
||||
12 12 8 8 State: 13 {2 4 6 8} 10 11 2 3 --END--
|
||||
/* ltlfilt -l -f '(F((p1) R (p0))) | (G(F(p0)))' | ltl2dstar -H - - |
|
||||
./autfilt --merge -H | fmt
|
||||
|
||||
This one is DBA-type, however because some unused acceptance sets are
|
||||
removed before calling remfin(), that function could miss the fact
|
||||
that this was a Rabin automaton...
|
||||
*/
|
||||
HOA: v1 States: 4 Start: 0 AP: 2 "p1" "p0" acc-name: Rabin 3 Acceptance:
|
||||
6 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3)) | (Fin(4) & Inf(5)) properties:
|
||||
trans-labels explicit-labels state-acc complete deterministic --BODY--
|
||||
State: 0 {2} [!1] 0 [0&1] 2 [!0&1] 3 State: 1 {1 2} [!1] 1 [1] 2 State:
|
||||
2 {1 2 5} [!1] 1 [1] 2 State: 3 {3 5} [!1] 0 [0&1] 2 [!0&1] 3 --END--
|
||||
/*
|
||||
ltlfilt -f '(X((X(p0)) R ((!(p1)) | (X(p0)))))' -l |
|
||||
ltl2dstar --automata=streett -H --ltl2nba=spin:ltl2tgba@-s - - |
|
||||
fmt
|
||||
|
||||
This Streett automaton can be seen as a Rabin-like automaton with
|
||||
two pairs. So the BA-type check should apply. During testing, it
|
||||
triggered assertions.
|
||||
*/
|
||||
HOA: v1 States: 6 properties: implicit-labels trans-labels no-univ-branch
|
||||
deterministic complete comment: "Streett{Safra[NBA=5]}" acc-name: Streett
|
||||
1 Acceptance: 2 (Fin(0)|Inf(1)) Start: 5 AP: 2 "p0" "p1" --BODY-- State:
|
||||
0 {0} 0 0 0 0 State: 1 {0} 0 2 0 2 State: 2 {1} 2 2 2 2 State: 3 {}
|
||||
3 2 1 2 State: 4 {} 3 3 1 1 State: 5 {} 4 4 4 4 --END--
|
||||
/*
|
||||
ltlfilt -l -f '(F(!((1) U (!((G(p0)) -> (p1))))))' | ltl2dstar -H - - | fmt
|
||||
|
||||
This Rabin automaton was incorrectly reduced at some point.
|
||||
*/
|
||||
HOA: v1 States: 4 properties: implicit-labels trans-labels no-univ-branch
|
||||
deterministic complete stutter-insensitive comment: "Safra[NBA=3]"
|
||||
acc-name: Rabin 2 Acceptance: 4 (Fin(0)&Inf(1))|(Fin(2)&Inf(3)) Start:
|
||||
1 AP: 2 "p0" "p1" --BODY-- State: 0 {2} 2 0 2 3 State: 1 {0 2} 2 1 2 2
|
||||
State: 2 {1 2} 2 0 2 2 State: 3 {3} 2 0 2 3 --END--
|
||||
EOF
|
||||
|
||||
cat >expected <<EOF
|
||||
|
|
@ -403,6 +439,102 @@ State: 14 {0}
|
|||
[!0&1] 14
|
||||
[0&1] 14
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 4
|
||||
Start: 0
|
||||
AP: 2 "p1" "p0"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!1] 0
|
||||
[0&1] 2
|
||||
[!0&1] 3
|
||||
State: 1 {0}
|
||||
[!1] 1
|
||||
[1] 2
|
||||
State: 2 {0}
|
||||
[!1] 1
|
||||
[1] 2
|
||||
State: 3 {0}
|
||||
[!1] 0
|
||||
[0&1] 2
|
||||
[!0&1] 3
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 6
|
||||
Start: 5
|
||||
AP: 2 "p0" "p1"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0
|
||||
[0&!1] 0
|
||||
[!0&1] 0
|
||||
[0&1] 0
|
||||
State: 1
|
||||
[!0&!1] 0
|
||||
[0&!1] 2
|
||||
[!0&1] 0
|
||||
[0&1] 2
|
||||
State: 2 {0}
|
||||
[!0&!1] 2
|
||||
[0&!1] 2
|
||||
[!0&1] 2
|
||||
[0&1] 2
|
||||
State: 3 {0}
|
||||
[!0&!1] 3
|
||||
[0&!1] 2
|
||||
[!0&1] 1
|
||||
[0&1] 2
|
||||
State: 4
|
||||
[!0&!1] 3
|
||||
[0&!1] 3
|
||||
[!0&1] 1
|
||||
[0&1] 1
|
||||
State: 5
|
||||
[!0&!1] 4
|
||||
[0&!1] 4
|
||||
[!0&1] 4
|
||||
[0&1] 4
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 5
|
||||
Start: 1
|
||||
AP: 2 "p0" "p1"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 2
|
||||
[0&!1] 0
|
||||
[!0&1] 2
|
||||
[0&1] 3
|
||||
State: 1
|
||||
[!0&!1] 2
|
||||
[0&!1] 1
|
||||
[!0&1] 2
|
||||
[0&1] 2
|
||||
State: 2 {0}
|
||||
[!0&!1] 2
|
||||
[0&!1] 0
|
||||
[!0&1] 2
|
||||
[0&1] 2
|
||||
State: 3
|
||||
[!0&!1] 2
|
||||
[0&!1] 0
|
||||
[!0&1] 2
|
||||
[0&1] 3
|
||||
[0&1] 4
|
||||
State: 4 {0}
|
||||
[0&1] 4
|
||||
--END--
|
||||
EOF
|
||||
|
||||
cat >expected-tgba <<EOF
|
||||
|
|
@ -640,6 +772,102 @@ State: 14 {0}
|
|||
[!0&1] 14
|
||||
[0&1] 14
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 4
|
||||
Start: 0
|
||||
AP: 2 "p1" "p0"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!1] 0
|
||||
[0&1] 2
|
||||
[!0&1] 3
|
||||
State: 1 {0}
|
||||
[!1] 1
|
||||
[1] 2
|
||||
State: 2 {0}
|
||||
[!1] 1
|
||||
[1] 2
|
||||
State: 3 {0}
|
||||
[!1] 0
|
||||
[0&1] 2
|
||||
[!0&1] 3
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 6
|
||||
Start: 5
|
||||
AP: 2 "p0" "p1"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 0
|
||||
[0&!1] 0
|
||||
[!0&1] 0
|
||||
[0&1] 0
|
||||
State: 1
|
||||
[!0&!1] 0
|
||||
[0&!1] 2
|
||||
[!0&1] 0
|
||||
[0&1] 2
|
||||
State: 2 {0}
|
||||
[!0&!1] 2
|
||||
[0&!1] 2
|
||||
[!0&1] 2
|
||||
[0&1] 2
|
||||
State: 3 {0}
|
||||
[!0&!1] 3
|
||||
[0&!1] 2
|
||||
[!0&1] 1
|
||||
[0&1] 2
|
||||
State: 4
|
||||
[!0&!1] 3
|
||||
[0&!1] 3
|
||||
[!0&1] 1
|
||||
[0&1] 1
|
||||
State: 5
|
||||
[!0&!1] 4
|
||||
[0&!1] 4
|
||||
[!0&1] 4
|
||||
[0&1] 4
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 5
|
||||
Start: 1
|
||||
AP: 2 "p0" "p1"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc
|
||||
--BODY--
|
||||
State: 0
|
||||
[!0&!1] 2
|
||||
[0&!1] 0
|
||||
[!0&1] 2
|
||||
[0&1] 3
|
||||
State: 1
|
||||
[!0&!1] 2
|
||||
[0&!1] 1
|
||||
[!0&1] 2
|
||||
[0&1] 2
|
||||
State: 2 {0}
|
||||
[!0&!1] 2
|
||||
[0&!1] 0
|
||||
[!0&1] 2
|
||||
[0&1] 2
|
||||
State: 3
|
||||
[!0&!1] 2
|
||||
[0&!1] 0
|
||||
[!0&1] 2
|
||||
[0&1] 3
|
||||
[0&1] 4
|
||||
State: 4 {0}
|
||||
[0&1] 4
|
||||
--END--
|
||||
EOF
|
||||
|
||||
run 0 $autfilt -H --remove-fin test1 > output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue