twa_graph: add a merge_univ_dests() method

and call it after parsing

* spot/twa/twagraph.cc, spot/twa/twagraph.hh
(twa_graph::merge_univ_dests): New method.
* spot/parseaut/parseaut.yy: Call it.
* spot/twaalgos/dot.cc: Improve output, now that
several edges can use the same universal destination.
* tests/core/alternating.test, tests/core/complete.test,
tests/core/parseaut.test, tests/python/_altscc.ipynb,
tests/python/alternating.py, tests/python/alternation.ipynb: Adjust
test case.
* doc/org/tut24.org: Adjust example.
This commit is contained in:
Alexandre Duret-Lutz 2016-12-27 12:35:16 +01:00
parent 3d0a971aa8
commit 12f6c8cf10
11 changed files with 567 additions and 517 deletions

View file

@ -61,34 +61,34 @@ digraph G {
label="Fin(⓿)"
labelloc="t"
I [label="", style=invis, width=0]
I -> -11 [dir=none]
-11 [label=<>,width=0,height=0,shape=none]
I -> -11 [arrowhead=onormal]
-11 [label=<>,shape=point]
-11 -> 0
-11 -> 2
subgraph cluster_0 {
color=green
label=""
6 [label="t"]
2 [label="G(a)"]
}
subgraph cluster_1 {
color=red
label=""
4 [label="F(b)\n⓿"]
1 [label="FG(a)\n⓿"]
}
subgraph cluster_2 {
color=green
label=""
3 [label="GF(b)"]
6 [label="t"]
}
subgraph cluster_3 {
color=green
label=""
2 [label="G(a)"]
}
subgraph cluster_4 {
color=red
label=""
1 [label="FG(a)\n⓿"]
4 [label="F(b)\n⓿"]
}
subgraph cluster_4 {
color=green
label=""
3 [label="GF(b)"]
}
subgraph cluster_5 {
color=red
@ -100,23 +100,23 @@ digraph G {
label=""
0 [label="((((a) U (b)) && GF(b)) && FG(a))"]
}
0 -> -1 [label="b", dir=none]
-1 [label=<>,width=0,height=0,shape=none]
-1 -> 3
0 -> -1 [label="b", arrowhead=onormal]
-1 [label=<>,shape=point]
-1 -> 1
0 -> -4 [label="a & !b", style=bold, color="#F15854", dir=none]
-4 [label=<>,width=0,height=0,shape=none]
-4 -> 5 [style=bold, color="#F15854"]
-4 -> 3 [style=bold, color="#F15854"]
-1 -> 3
0 -> -4 [label="a & !b", style=bold, color="#F15854", arrowhead=onormal]
-4 [label=<>,shape=point]
-4 -> 1 [style=bold, color="#F15854"]
-4 -> 3 [style=bold, color="#F15854"]
-4 -> 5 [style=bold, color="#F15854"]
1 -> 2 [label="a"]
1 -> 1 [label="1"]
2 -> 2 [label="a"]
3 -> 3 [label="b"]
3 -> -8 [label="!b", style=bold, color="#FAA43A", dir=none]
-8 [label=<>,width=0,height=0,shape=none]
-8 -> 4 [style=bold, color="#FAA43A"]
3 -> -8 [label="!b", style=bold, color="#FAA43A", arrowhead=onormal]
-8 [label=<>,shape=point]
-8 -> 3 [style=bold, color="#FAA43A"]
-8 -> 4 [style=bold, color="#FAA43A"]
4 -> 6 [label="b"]
4 -> 4 [label="!b"]
5 -> 6 [label="b"]
@ -147,7 +147,7 @@ AP: 1 "a"
properties: trans-labels explicit-labels state-acc univ-branch very-weak
--BODY--
State: 0 "GF(a)"
[t] 1&0
[t] 0&1
State: 1 "F(a)" {0}
[(0)] 2
[t] 1
@ -172,7 +172,7 @@ properties: univ-branch trans-labels explicit-labels state-acc complete
properties: very-weak
--BODY--
State: 0 {0}
[t] 1&0
[t] 0&1
State: 1
[0] 2
[t] 1

View file

@ -203,7 +203,7 @@ properties: deterministic very-weak
--BODY--
State: 0
[!0 | 1] 0
[0&!1] 1&0
[0&!1] 0&1
State: 1 {0}
[0&!1] 1
[!0 | 1] 1

View file

@ -1946,7 +1946,7 @@ State: 5 "F!((c2))" {0}
[t] 5
State: 6 "GF!((c1))"
[!1] 6
[t] 7&6
[t] 6&7
State: 7 "F!((c1))" {0}
[!1] 11
[t] 7
@ -1954,9 +1954,9 @@ State: 8 "((!((c1)) U (!((c1)) && !((p1)))) R F!((p2)))"
[!0&!1&!2] 11
[!1&!2] 10
[!0&!1] 9
[!1] 10&9
[!1] 9&10
[!0] 8
[t] 10&8
[t] 8&10
State: 9 "(!((c1)) U (!((c1)) && !((p1))))" {0}
[!1&!2] 11
[!1] 9
@ -2407,8 +2407,8 @@ properties: univ-branch trans-labels explicit-labels state-acc
properties: very-weak
--BODY--
State: 0 "((((a) U (b)) && GF(b)) && FG(a))"
[0] 3&1
[!0&1] 5&3&1
[0] 1&3
[!0&1] 1&3&5
State: 1 "FG(a)" {0}
[1] 2
[t] 1
@ -2416,7 +2416,7 @@ State: 2 "G(a)"
[1] 2
State: 3 "GF(b)"
[0] 3
[!0] 4&3
[!0] 3&4
State: 4 "F(b)" {0}
[0] 6
[!0] 4
@ -2438,18 +2438,18 @@ properties: deterministic
State: 0
[!0&!1] 0&1
[0&!1] 1
[!0&1] 0&2&1
[!0&1] 0&1&2
[0&1] 0&1
State: 1
[!0&!1] 0&1
[0&!1] 2&1
[0&!1] 1&2
[!0&1] 2
[0&1] 1&1
[0&1] 1
State: 2
[!0&!1] 0&1
[0&!1] 2&1
[0&!1] 1&2
[!0&1] 2
[0&1] 0&2&1
[0&1] 0&1&2
--END--
EOF
@ -2613,8 +2613,8 @@ properties: univ-branch trans-labels explicit-labels state-acc
properties: very-weak
--BODY--
State: 0 "((((a) U (b)) && GF(b)) && FG(a))"
[0] 3&1
[!0&1] 5&3&1
[0] 1&3
[!0&1] 1&3&5
State: 1 "FG(a)" {0}
[1] 2
[t] 1
@ -2622,7 +2622,7 @@ State: 2 "G(a)"
[1] 2
State: 3 "GF(b)"
[0] 3
[!0] 4&3
[!0] 3&4
State: 4 "F(b)" {0}
[0] 6
[!0] 4
@ -2644,18 +2644,18 @@ properties: deterministic
State: 0
[!0&!1] 0&1
[0&!1] 1
[!0&1] 0&2&1
[!0&1] 0&1&2
[0&1] 0&1
State: 1
[!0&!1] 0&1
[0&!1] 2&1
[0&!1] 1&2
[!0&1] 2
[0&1] 1&1
[0&1] 1
State: 2
[!0&!1] 0&1
[0&!1] 2&1
[0&!1] 1&2
[!0&1] 2
[0&1] 0&2&1
[0&1] 0&1&2
--END--
EOF