Avoid creating parallel edges in acd_transform
a = spot.automaton("""HOA: v1
Start: 0
Acceptance: 5 Fin(0) | Inf(1) & Inf(2) & Inf(3) | Inf(4)
properties: trans-acc no-univ-branch
properties: deterministic unambiguous
AP: 3 "a" "b" "c"
--BODY--
State: 0
[0&1] 1
[!0] 2
[0&!1] 3
State: 1
[!0] 1
[0] 1 {0}
State: 2
[t] 2
State: 3
[0&1&2] 1
[0&1&!2] 4 {0 1 3}
[0&!1&2] 4 {0 1 2 3}
[0&!1&!2] 3 {1 2 3}
[!0&1&2] 3 {0 1 2 3}
[!0&1&!2] 3 {1 3}
[!0&!1&2] 3 {0 1 3}
State: 4
[0&1&2] 1
[0&1&!2] 4 {2 3}
[0&!1&2] 4 {0 2 3}
[0&!1&!2] 4 {1 2 3}
[!0&1&2] 4 {0 1 2 3}
[!0&1&!2] 3 {0 1 2 3}
[!0&!1&2] 3 {0 2 3}
--END--""")
b = spot.acd_transform(a)
b.highlight_edges([8, 9], 2)
b.highlight_edges([10, 11], 3)
b.highlight_edges([17, 18], 5)
b.highlight_edges([19, 20], 1)
b.show(".g")
In this example acd_transform
creates several parallel edges with the same colors.
Even though they can be merged with merge_edges
, it could be done more efficiently in acd_transform
.