to_weak_alternating(): fixes a bug on generalized co-Büchi automata
Fixes #278. Also adds a test ensuring non-regression. * spot/twaalgos/toweak.cc: Fixes the bug. * tests/python/toweak.py: Add a test case.
This commit is contained in:
parent
df04c715cf
commit
4b5606e742
2 changed files with 51 additions and 2 deletions
|
|
@ -53,3 +53,51 @@ def test_phi(phi):
|
|||
|
||||
for p in phi1:
|
||||
test_phi(p)
|
||||
|
||||
|
||||
phi2 = spot.formula("(G((F a) U b)) W a")
|
||||
a2 = spot.automaton("""
|
||||
HOA: v1
|
||||
States: 7
|
||||
Start: 1
|
||||
AP: 2 "a" "b"
|
||||
acc-name: generalized-Buchi 2
|
||||
Acceptance: 2 Inf(0)&Inf(1)
|
||||
properties: trans-labels explicit-labels trans-acc complete univ-branch
|
||||
--BODY--
|
||||
State: 0
|
||||
[t] 0 {0 1}
|
||||
State: 1
|
||||
[0] 0 {0 1}
|
||||
[1] 1&2 {0 1}
|
||||
[0&!1] 1&3 {0 1}
|
||||
[!0&!1] 1&4 {0 1}
|
||||
State: 2
|
||||
[1] 2 {0 1}
|
||||
[0&!1] 3 {0 1}
|
||||
[!0&!1] 4 {0 1}
|
||||
State: 3
|
||||
[1] 2 {0 1}
|
||||
[0&!1] 3 {1}
|
||||
[!0&!1] 4 {1}
|
||||
State: 4
|
||||
[0&1] 2 {0 1}
|
||||
[0&!1] 3 {1}
|
||||
[!0&!1] 4 {1}
|
||||
[!0&1] 5 {0 1}
|
||||
State: 5
|
||||
[0&1] 2 {0 1}
|
||||
[0&!1] 3 {0 1}
|
||||
[!0&1] 5 {0}
|
||||
[!0&!1] 6 {0}
|
||||
State: 6
|
||||
[0&1] 2 {0 1}
|
||||
[0&!1] 3 {1}
|
||||
[!0&1] 5 {0}
|
||||
[!0&!1] 6
|
||||
--END--
|
||||
""")
|
||||
a2 = spot.to_weak_alternating(a2)
|
||||
assert equivalent(a2, phi2)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue