These examples are tests for scc_info on alternating automata.


In [1]:
import spot
spot.setup(show_default='.bas')

In [2]:
spot.automaton('''
HOA: v1
States: 2
Start: 0&1
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
--BODY--
State: 0
[0] 0
[!0] 1
State: 1
[1] 1 {0}
--END--
''')


Out[2]:
G Inf( ) cluster_0 cluster_1 -1 I->-1 0 0 -1->0 1 1 -1->1 0->0 a 0->1 !a 1->1 b

universal edges are handled as if they were many distinct existencial edges from the point of view of scc_info, so the acceptance / rejection status is not always meaningful.


In [3]:
spot.automaton('''
HOA: v1
States: 2
Start: 0&1
AP: 2 "a" "b"
Acceptance: 1 Fin(0)
--BODY--
State: 0
[0] 0&1 {0}
State: 1
[1] 1
--END--
''')


Out[3]:
G Fin( ) cluster_0 cluster_1 -1 I->-1 0 0 -1->0 1 1 -1->1 -1.1 -1.1 0->-1.1 a 1->1 b

In [5]:
spot.automaton('''
HOA: v1
States: 2
Start: 0&1
AP: 2 "a" "b"
Acceptance: 1 Fin(0)
--BODY--
State: 0
[0] 0 {0}
[!0] 1
State: 1
[1] 1&0
--END--
''')


Out[5]:
G Fin( ) cluster_0 -1 I->-1 0 0 -1->0 1 1 -1->1 0->0 a 0->1 !a -1.0 -1.0 1->-1.0 b

In [6]:
spot.automaton('''
HOA: v1
States: 2
Start: 0
AP: 2 "a" "b"
Acceptance: 1 Fin(0)
--BODY--
State: 0
[0] 0
[!0] 1 {0}
State: 1
[1] 1&0
--END--
''')


Out[6]:
G Fin( ) cluster_0 0 0 I->0 0->0 a 1 1 0->1 !a -1.0 1->-1.0 b -1.0->0 -1.0->1

In [7]:
spot.automaton('''
HOA: v1
States: 2
Start: 0
AP: 2 "a" "b"
Acceptance: 1 Fin(0)
--BODY--
State: 0
[0] 0 {0}
[!0] 1 
State: 1
[1] 1&0 {0}
--END--
''')


Out[7]:
G Fin( ) cluster_0 0 0 I->0 0->0 a 1 1 0->1 !a -1.0 1->-1.0 b -1.0->0 -1.0->1

In [ ]: