dot: fix printing of alternating automata

Related to #208.

* spot/twaalgos/dot.cc: Fix missing definitions of universal nodes,
and inclusion of universal nodes inside of SCC when none of the
destination comes back to the SCC.
* tests/python/_altscc.ipynb: Adjust and add more test cases.
* tests/core/alternating.test, tests/core/neverclaimread.test,
tests/core/readsave.test, tests/core/sccdot.test,
tests/python/decompose.ipynb: Adjust test cases.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2017-05-31 17:14:52 +02:00
parent 617a7187b3
commit 97f3efabe3
8 changed files with 1603 additions and 1173 deletions

View file

@ -62,66 +62,66 @@ digraph G {
labelloc="t"
I [label="", style=invis, width=0]
I -> -11 [arrowhead=onormal]
-11 [label=<>,shape=point]
-11 -> 0
-11 -> 2
subgraph cluster_0 {
color=green
label=""
2 [label="G(a)"]
2 -> 2 [label="a"]
}
subgraph cluster_1 {
color=red
label=""
1 [label="FG(a)\n⓿"]
1 -> 2 [label="a"]
1 -> 1 [label="1"]
}
subgraph cluster_2 {
color=green
label=""
6 [label="t"]
6 -> 6 [label="1"]
}
subgraph cluster_3 {
color=red
label=""
4 [label="F(b)\n⓿"]
4 -> 6 [label="b"]
4 -> 4 [label="!b"]
}
subgraph cluster_4 {
color=green
label=""
3 [label="GF(b)"]
3 -> 3 [label="b"]
3 -> -8.4 [label="!b", style=bold, color="#FAA43A", arrowhead=onormal]
-8.4 [label=<>,shape=point]
-8.4 -> 3 [style=bold, color="#FAA43A"]
-8.4 -> 4 [style=bold, color="#FAA43A"]
-8 [label=<>,shape=point]
}
subgraph cluster_5 {
color=red
label=""
5 [label="((a) U (b))\n⓿"]
5 -> 6 [label="b"]
5 -> 5 [label="a & !b"]
}
subgraph cluster_6 {
color=black
label=""
0 [label="((((a) U (b)) && GF(b)) && FG(a))"]
0 -> -1 [label="b", arrowhead=onormal]
-1 [label=<>,shape=point]
-1 -> 1
-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"]
}
-11 [label=<>,shape=point]
-11 -> 0
-11 -> 2
0 -> -1 [label="b", arrowhead=onormal]
-1 [label=<>,shape=point]
-1 -> 1
-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", arrowhead=onormal]
-8 -> 3 [style=bold, color="#FAA43A"]
-8 -> 4 [style=bold, color="#FAA43A"]
4 -> 6 [label="b"]
4 -> 4 [label="!b"]
5 -> 6 [label="b"]
5 -> 5 [label="a & !b"]
6 -> 6 [label="1"]
}
EOF
@ -508,19 +508,19 @@ digraph G {
edge [fontname="Lato"]
I [label="", style=invis, width=0]
I -> -1 [arrowhead=onormal]
-1 [label=<>,shape=point]
-1 -> 0
-1 -> 1
-1 [label=<>,shape=point]
-1 -> 0
-1 -> 1
0 [label=<0>]
0 -> 0 [label=<!a &amp; !c>]
0 -> -1.1 [label=<a &amp; b &amp; !c>, style=bold, color="#F17CB0", $style]
-1.1 [label=<>,shape=point]
-1.1 -> 0 [style=bold, color="#F17CB0"]
-1.1 -> 1 [style=bold, color="#F17CB0"]
-1.1 [label=<>,shape=point]
-1.1 -> 0 [style=bold, color="#F17CB0"]
-1.1 -> 1 [style=bold, color="#F17CB0"]
0 -> -1.2 [label=<a &amp; !c>, style=bold, color="#FAA43A", $style]
-1.2 [label=<>,shape=point]
-1.2 -> 0 [style=bold, color="#FAA43A"]
-1.2 -> 1 [style=bold, color="#FAA43A"]
-1.2 [label=<>,shape=point]
-1.2 -> 0 [style=bold, color="#FAA43A"]
-1.2 -> 1 [style=bold, color="#FAA43A"]
1 [label=<1>]
1 -> 1 [label=<b>]
}
@ -574,52 +574,52 @@ digraph G {
color=green
label=""
4 [label="t"]
4 -> 4 [label=<1>]
}
subgraph cluster_1 {
color=green
label=""
1 [label="G(a & b)"]
1 -> 1 [label=<a &amp; b>]
}
subgraph cluster_2 {
color=red
label=""
2 [label="F!a"]
2 -> 4 [label=<!a>]
2 -> 2 [label=<a<br/><font color="#F17CB0">❶</font>>]
}
subgraph cluster_3 {
color=red
label=""
3 [label="F!b"]
3 -> 4 [label=<!b>]
3 -> 3 [label=<b<br/><font color="#5DA5DA">⓿</font>>]
}
subgraph cluster_4 {
color=green
label=""
0 [label="c R (c | G(a & b) | (F!b & F!a))"]
-1 [label=<>,shape=point]
-4 [label=<>,shape=point]
-7 [label=<>,shape=point]
-10 [label=<>,shape=point]
}
0 -> 4 [label=<c>]
0 -> 0 [label=<!a &amp; !b &amp; !c>]
0 -> -1.4 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-1.4 [label=<>,shape=point]
-1.4 -> 0
-1.4 -> 1
0 -> -4.4 [label=<a &amp; !b &amp; !c>, arrowhead=onormal]
-4.4 [label=<>,shape=point]
-4.4 -> 0
-4.4 -> 2
0 -> -7.4 [label=<!a &amp; b &amp; !c>, arrowhead=onormal]
-7.4 [label=<>,shape=point]
-7.4 -> 0
-7.4 -> 3
0 -> -10.4 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-10.4 [label=<>,shape=point]
-10.4 -> 0
-10.4 -> 2
-10.4 -> 3
}
0 -> -1 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-1 -> 0
-1 -> 1
0 -> -4 [label=<a &amp; !b &amp; !c>, arrowhead=onormal]
-4 -> 0
-4 -> 2
0 -> -7 [label=<!a &amp; b &amp; !c>, arrowhead=onormal]
-7 -> 0
-7 -> 3
0 -> -10 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-10 -> 0
-10 -> 2
-10 -> 3
1 -> 1 [label=<a &amp; b>]
2 -> 4 [label=<!a>]
2 -> 2 [label=<a<br/><font color="#F17CB0">❶</font>>]
3 -> 4 [label=<!b>]
3 -> 3 [label=<b<br/><font color="#5DA5DA">⓿</font>>]
4 -> 4 [label=<1>]
}
EOF
@ -670,48 +670,48 @@ digraph G {
color=green
label=""
4 [label="t"]
4 -> 4 [label=<1>]
}
subgraph cluster_1 {
color=red
label=""
2 [label="F!a"]
2 -> 4 [label=<!a>]
2 -> 2 [label=<a<br/><font color="#F17CB0">❶</font>>]
}
subgraph cluster_2 {
color=red
label=""
3 [label="F!b"]
3 -> 4 [label=<!b>]
3 -> 3 [label=<b<br/><font color="#5DA5DA">⓿</font>>]
}
subgraph cluster_3 {
color=green
label=""
0 [label="c R (c | G(a & b) | (F!b & F!a))"]
-1 [label=<>,shape=point]
-4 [label=<>,shape=point]
-7 [label=<>,shape=point]
1 [label="G(a & b)"]
-10 [label=<>,shape=point]
}
0 -> 4 [label=<c>]
0 -> 0 [label=<!a &amp; !b &amp; !c>]
0 -> -1.3 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-1.3 [label=<>,shape=point]
-1.3 -> 0
-1.3 -> 1
0 -> -4.3 [label=<a &amp; !b &amp; !c>, arrowhead=onormal]
-4.3 [label=<>,shape=point]
-4.3 -> 0
-4.3 -> 2
0 -> -7.3 [label=<!a &amp; b &amp; !c>, arrowhead=onormal]
-7.3 [label=<>,shape=point]
-7.3 -> 0
-7.3 -> 3
1 [label="G(a & b)"]
0 -> -1 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-1 -> 0
-1 -> 1
0 -> -4 [label=<a &amp; !b &amp; !c>, arrowhead=onormal]
-4 -> 0
-4 -> 2
0 -> -7 [label=<!a &amp; b &amp; !c>, arrowhead=onormal]
-7 -> 0
-7 -> 3
1 -> 1 [label=<a &amp; b>]
1 -> -10.3 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-10.3 [label=<>,shape=point]
-10.3 -> 0
-10.3 -> 2
-10.3 -> 3
}
1 -> -10 [label=<a &amp; b &amp; !c>, arrowhead=onormal]
-10 -> 0
-10 -> 2
-10 -> 3
2 -> 4 [label=<!a>]
2 -> 2 [label=<a<br/><font color="#F17CB0">❶</font>>]
3 -> 4 [label=<!b>]
3 -> 3 [label=<b<br/><font color="#5DA5DA">⓿</font>>]
4 -> 4 [label=<1>]
}
EOF
@ -749,16 +749,16 @@ digraph G {
I -> 0
0 [label=<0>]
0 -> -1.1 [label=<b &amp; c>, style=bold, color="#F17CB0", arrowhead=onormal]
-1.1 [label=<>,shape=point]
-1.1 -> 1 [style=bold, color="#F17CB0"]
-1.1 -> 2 [style=bold, color="#F17CB0"]
-1.1 [label=<>,shape=point]
-1.1 -> 1 [style=bold, color="#F17CB0"]
-1.1 -> 2 [style=bold, color="#F17CB0"]
1 [label=<1>]
1 -> -1.1 [label=<a &amp; b>, style=bold, color="#F17CB0", arrowhead=onormal]
2 [label=<2>]
2 -> -1.2 [label=<!a &amp; !b &amp; !c>, style=bold, color="#FAA43A", $style]
-1.2 [label=<>,shape=point]
-1.2 -> 1 [style=bold, color="#FAA43A"]
-1.2 -> 2 [style=bold, color="#FAA43A"]
-1.2 [label=<>,shape=point]
-1.2 -> 1 [style=bold, color="#FAA43A"]
-1.2 -> 2 [style=bold, color="#FAA43A"]
}
EOF
@ -796,19 +796,19 @@ digraph G {
I -> 0
0 [label=<0>]
0 -> -1.1 [label=<b &amp; c>, style=bold, color="#F17CB0", arrowhead=onormal]
-1.1 [label=<>,shape=point]
-1.1 -> 1 [style=bold, color="#F17CB0"]
-1.1 -> 2 [style=bold, color="#F17CB0"]
-1.1 [label=<>,shape=point]
-1.1 -> 1 [style=bold, color="#F17CB0"]
-1.1 -> 2 [style=bold, color="#F17CB0"]
1 [label=<1>]
1 -> -1.3 [label=<a &amp; b>, style=bold, color="#B276B2", arrowhead=onormal]
-1.3 [label=<>,shape=point]
-1.3 -> 1 [style=bold, color="#B276B2"]
-1.3 -> 2 [style=bold, color="#B276B2"]
-1.3 [label=<>,shape=point]
-1.3 -> 1 [style=bold, color="#B276B2"]
-1.3 -> 2 [style=bold, color="#B276B2"]
2 [label=<2>]
2 -> -1.2 [label=<!a &amp; !b &amp; !c>, style=bold, color="#FAA43A", $style]
-1.2 [label=<>,shape=point]
-1.2 -> 1 [style=bold, color="#FAA43A"]
-1.2 -> 2 [style=bold, color="#FAA43A"]
-1.2 [label=<>,shape=point]
-1.2 -> 1 [style=bold, color="#FAA43A"]
-1.2 -> 2 [style=bold, color="#FAA43A"]
}
EOF
@ -853,35 +853,35 @@ digraph G {
color=green
label=""
3 [label="t"]
3 -> 3 [label=<1>]
}
subgraph cluster_1 {
color=green
label=""
1 [label="Fa"]
1 -> 3 [label=<a>]
1 -> 1 [label=<!a>]
}
subgraph cluster_2 {
color=green
label=""
2 [label="G!a"]
2 -> 2 [label=<!a>]
}
subgraph cluster_3 {
color=green
label=""
0 [label="G((b & Fa) | (!b & G!a))"]
0 -> 0 [label=<a &amp; b>]
0 -> -1.3 [label=<!a &amp; b>, arrowhead=onormal]
-1.3 [label=<>,shape=point]
-1.3 -> 0
-1.3 -> 1
0 -> -4.3 [label=<!a &amp; !b>, arrowhead=onormal]
-4.3 [label=<>,shape=point]
-4.3 -> 0
-4.3 -> 2
-1 [label=<>,shape=point]
-4 [label=<>,shape=point]
}
0 -> 0 [label=<a &amp; b>]
0 -> -1 [label=<!a &amp; b>, arrowhead=onormal]
-1 -> 0
-1 -> 1
0 -> -4 [label=<!a &amp; !b>, arrowhead=onormal]
-4 -> 0
-4 -> 2
1 -> 3 [label=<a>]
1 -> 1 [label=<!a>]
2 -> 2 [label=<!a>]
3 -> 3 [label=<1>]
}
EOF

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
# Recherche et Développement de l'Epita (LRDE).
# Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2017 Laboratoire
# de Recherche et Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -336,15 +336,15 @@ digraph G {
color=green
label=""
1 [label="1", peripheries=2]
1 -> 1 [label="1"]
}
subgraph cluster_1 {
color=red
label=""
0 [label="0"]
}
0 -> 1 [label="b"]
0 -> 0 [label="0"]
}
1 -> 1 [label="1"]
}
EOF
diff stdout expected

View file

@ -327,21 +327,21 @@ digraph G {
subgraph cluster_0 {
color=green
1 [label="s1", peripheries=2]
1 -> 1 [label="a"]
}
subgraph cluster_1 {
color=green
0 [label="s0", peripheries=2]
0 -> 0 [label="b"]
}
subgraph cluster_2 {
color=black
3 [label="s3"]
3 -> 1 [label="a"]
3 -> 0 [label="b"]
}
0 -> 0 [label="b"]
1 -> 1 [label="a"]
2 [label="s2"]
2 -> 0 [label="b"]
3 -> 1 [label="a"]
3 -> 0 [label="b"]
}
EOF

View file

@ -83,67 +83,67 @@ digraph G {
color=grey
label=""
5 [label="5"]
5 -> 6 [label="1"]
6 [label="6"]
6 -> 5 [label="1"]
}
subgraph cluster_1 {
color=grey
label=""
0 [label="0"]
0 -> 0 [label="a & b\n{0,1,2}"]
0 -> 0 [label="!a & !b\n{2}"]
0 -> 5 [label="a\n{2}"]
}
subgraph cluster_2 {
color=green
label=""
9 [label="9"]
9 -> 9 [label="!a & b\n{0,2}"]
9 -> 10 [label="a & b\n{0,1}"]
10 [label="10"]
10 -> 9 [label="!a & b\n{0,1}"]
10 -> 10 [label="a & b\n{0,2}"]
}
subgraph cluster_3 {
color=green
label=""
8 [label="8"]
8 -> 8 [label="!a & b\n{0,2}"]
8 -> 8 [label="a & b\n{0,1}"]
8 -> 9 [label="1"]
}
subgraph cluster_4 {
color=green
label=""
7 [label="7"]
7 -> 7 [label="!a & b\n{0,1}"]
7 -> 7 [label="a & b\n{0,2}"]
7 -> 8 [label="1"]
}
subgraph cluster_5 {
color=black
label=""
2 [label="2"]
2 -> 0 [label="a"]
2 -> 7 [label="b"]
}
subgraph cluster_6 {
color=red
label=""
4 [label="4"]
4 -> 4 [label="!b\n{1,2}"]
4 -> 2 [label="b"]
}
subgraph cluster_7 {
color=green
label=""
1 [label="1"]
3 [label="3"]
}
0 -> 0 [label="a & b\n{0,1,2}"]
0 -> 0 [label="!a & !b\n{2}"]
0 -> 5 [label="a\n{2}"]
1 -> 4 [label="b"]
1 -> 3 [label="a & !b"]
3 [label="3"]
2 -> 0 [label="a"]
2 -> 7 [label="b"]
3 -> 1 [label="a & b\n{0,1}"]
}
4 -> 4 [label="!b\n{1,2}"]
4 -> 2 [label="b"]
5 -> 6 [label="1"]
6 -> 5 [label="1"]
7 -> 7 [label="!a & b\n{0,1}"]
7 -> 7 [label="a & b\n{0,2}"]
7 -> 8 [label="1"]
8 -> 8 [label="!a & b\n{0,2}"]
8 -> 8 [label="a & b\n{0,1}"]
8 -> 9 [label="1"]
9 -> 9 [label="!a & b\n{0,2}"]
9 -> 10 [label="a & b\n{0,1}"]
10 -> 9 [label="!a & b\n{0,1}"]
10 -> 10 [label="a & b\n{0,2}"]
}
EOF