Use new zielonka for synthesis

Remove all now unnecessary colorize_parity and
change_parity calls.

* spot/twaalgos/synthesis.cc: Change here
* spot/twaalgos/game.cc: Adjust pg-print
* tests/core/ltlsynt.test,
  tests/python/_mealy.ipynb,
  tests/python/games.ipynb,
  tests/python/synthesis.ipynb,
  tests/python/synthesis.py: Adjust tests
This commit is contained in:
Philipp Schlehuber-Caissier 2022-06-24 14:12:50 +02:00
parent 9124484719
commit 6bc1dd0467
7 changed files with 848 additions and 1016 deletions

View file

@ -65,78 +65,70 @@
"<!-- Generated by graphviz version 2.43.0 (0)\n",
" -->\n",
"<!-- Pages: 1 -->\n",
"<svg width=\"212pt\" height=\"212pt\"\n",
" viewBox=\"0.00 0.00 212.00 212.07\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 208.07)\">\n",
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-208.07 208,-208.07 208,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"54.5\" y=\"-189.87\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"75.5\" y=\"-189.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"91.5\" y=\"-189.87\" font-family=\"Lato\" font-size=\"14.00\">) | Fin(</text>\n",
"<text text-anchor=\"start\" x=\"129.5\" y=\"-189.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"145.5\" y=\"-189.87\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"70.5\" y=\"-175.87\" font-family=\"Lato\" font-size=\"14.00\">[Streett 1]</text>\n",
"<svg width=\"212pt\" height=\"152pt\"\n",
" viewBox=\"0.00 0.00 212.00 152.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 148)\">\n",
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-148 208,-148 208,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"99\" y=\"-128.8\" font-family=\"Lato\" font-size=\"14.00\">t</text>\n",
"<text text-anchor=\"start\" x=\"91\" y=\"-113.8\" font-family=\"Lato\" font-size=\"14.00\">[all]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" cx=\"56\" cy=\"-75.07\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-71.37\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" cx=\"56\" cy=\"-51\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-47.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-75.07C2.79,-75.07 17.15,-75.07 30.63,-75.07\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-75.07 30.94,-78.22 34.44,-75.07 30.94,-75.07 30.94,-75.07 30.94,-75.07 34.44,-75.07 30.94,-71.92 37.94,-75.07 37.94,-75.07\"/>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-51C2.79,-51 17.15,-51 30.63,-51\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-51 30.94,-54.15 34.44,-51 30.94,-51 30.94,-51 30.94,-51 34.44,-51 30.94,-47.85 37.94,-51 37.94,-51\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"177,-133.07 150,-115.07 177,-97.07 204,-115.07 177,-133.07\"/>\n",
"<text text-anchor=\"middle\" x=\"177\" y=\"-111.37\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"177,-101 150,-83 177,-65 204,-83 177,-101\"/>\n",
"<text text-anchor=\"middle\" x=\"177\" y=\"-79.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M62.13,-92.21C67.26,-105.97 76.64,-124.4 92,-133.07 111.84,-144.27 137.9,-135.7 155.7,-126.96\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"162.32,-123.52 157.56,-129.54 159.22,-125.13 156.11,-126.75 156.11,-126.75 156.11,-126.75 159.22,-125.13 154.66,-123.95 162.32,-123.52 162.32,-123.52\"/>\n",
"<text text-anchor=\"start\" x=\"92.5\" y=\"-156.87\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !c</text>\n",
"<text text-anchor=\"start\" x=\"104\" y=\"-141.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M66.88,-65.34C73.09,-73.04 81.84,-81.79 92,-86 110.4,-93.62 133.06,-92.26 150.21,-89.33\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"157.19,-88 150.9,-92.41 153.75,-88.66 150.31,-89.31 150.31,-89.31 150.31,-89.31 153.75,-88.66 149.72,-86.22 157.19,-88 157.19,-88\"/>\n",
"<text text-anchor=\"start\" x=\"92.5\" y=\"-94.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !c</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"177,-53.07 150,-35.07 177,-17.07 204,-35.07 177,-53.07\"/>\n",
"<text text-anchor=\"middle\" x=\"177\" y=\"-31.37\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"177,-36 150,-18 177,0 204,-18 177,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"177\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M70.12,-63.58C76.36,-58.69 84.15,-53.37 92,-50.07 108.69,-43.04 128.6,-39.3 144.85,-37.32\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"152.03,-36.52 145.42,-40.42 148.55,-36.91 145.07,-37.29 145.07,-37.29 145.07,-37.29 148.55,-36.91 144.73,-34.16 152.03,-36.52 152.03,-36.52\"/>\n",
"<text text-anchor=\"start\" x=\"99.5\" y=\"-68.87\" font-family=\"Lato\" font-size=\"14.00\">a | c</text>\n",
"<text text-anchor=\"start\" x=\"104\" y=\"-53.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M72.89,-44.63C78.83,-42.37 85.67,-39.92 92,-38 110.66,-32.34 132.04,-27.26 148.57,-23.65\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"155.79,-22.09 149.61,-26.64 152.37,-22.83 148.95,-23.56 148.95,-23.56 148.95,-23.56 152.37,-22.83 148.28,-20.48 155.79,-22.09 155.79,-22.09\"/>\n",
"<text text-anchor=\"start\" x=\"99.5\" y=\"-41.8\" font-family=\"Lato\" font-size=\"14.00\">a | c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M159.34,-108.84C151.13,-105.81 141.08,-102.17 132,-99.07 114.77,-93.18 95.16,-86.92 80.32,-82.27\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"73.45,-80.13 81.07,-79.21 76.94,-80.69 80.28,-81.74 80.13,-82.21 79.98,-82.69 76.64,-81.65 79.19,-85.22 73.45,-80.13 73.45,-80.13\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-117.87\" font-family=\"Lato\" font-size=\"14.00\">!b &amp; !d</text>\n",
"<text text-anchor=\"start\" x=\"104\" y=\"-102.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M159.46,-76.37C151.29,-73.25 141.22,-69.65 132,-67 115.06,-62.14 95.59,-58.03 80.74,-55.19\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"73.85,-53.9 81.31,-52.09 77.38,-54.05 80.82,-54.7 80.73,-55.19 80.63,-55.68 77.19,-55.04 80.15,-58.29 73.85,-53.9 73.85,-53.9\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-70.8\" font-family=\"Lato\" font-size=\"14.00\">!b &amp; !d</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M164.73,-25.06C147.96,-11.43 115.84,9.67 92,-5.07 76.06,-14.92 67.14,-34.46 62.3,-50.4\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"60.35,-57.43 59.19,-49.84 60.81,-53.92 61.74,-50.55 62.22,-50.68 62.7,-50.82 61.77,-54.19 65.26,-51.52 60.35,-57.43 60.35,-57.43\"/>\n",
"<text text-anchor=\"start\" x=\"98.5\" y=\"-23.87\" font-family=\"Lato\" font-size=\"14.00\">b | d</text>\n",
"<text text-anchor=\"start\" x=\"104\" y=\"-8.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M160,-11.16C142.45,-4.76 113.88,2.4 92,-8 82.58,-12.48 74.86,-20.87 69.09,-29.06\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"65.07,-35.22 66.26,-27.64 66.57,-32.02 68.48,-29.09 68.9,-29.36 69.32,-29.63 67.4,-32.56 71.54,-31.08 65.07,-35.22 65.07,-35.22\"/>\n",
"<text text-anchor=\"start\" x=\"98.5\" y=\"-11.8\" font-family=\"Lato\" font-size=\"14.00\">b | d</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f32ec50ce40> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fc1244a3d50> >"
]
},
"execution_count": 4,
@ -216,7 +208,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f32ec571c30> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fc124439570> >"
]
},
"execution_count": 6,
@ -290,7 +282,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f32ec571c30> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fc124439570> >"
]
},
"execution_count": 8,
@ -301,6 +293,14 @@
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "923a59d6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
@ -319,7 +319,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.8.10"
}
},
"nbformat": 4,