python: better support for explicit Kripke

Part of issue #376, reported by Hashim Ali.

* python/spot/impl.i: Add bindings for kripke_graph.
* python/spot/__init__.py (automaton): Add a want_kripke option.
* spot/kripke/kripkegraph.hh: Honnor the "state-names" property
when displaying states.
* spot/twaalgos/hoa.cc: Preserve names of Kripke states.
* tests/python/ltsmin-dve.ipynb: Illustrate all the above.
* NEWS: Mention those changes.
* THANKS: Add Hashim.
This commit is contained in:
Alexandre Duret-Lutz 2019-02-13 17:43:40 +01:00
parent a86925e20e
commit f26dd904ff
7 changed files with 393 additions and 33 deletions

View file

@ -436,7 +436,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7f0f044132a0> >"
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7fb8f84f9870> >"
]
},
"execution_count": 9,
@ -1265,7 +1265,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0f04381d50> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fb8f84691e0> >"
]
},
"execution_count": 12,
@ -1453,7 +1453,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_product; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_product > *' at 0x7f0f04381b10> >"
"<spot.impl.twa_product; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_product > *' at 0x7fb8f8469360> >"
]
},
"execution_count": 13,
@ -1548,7 +1548,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 18,
"metadata": {},
"outputs": [
{
@ -1582,7 +1582,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 19,
"metadata": {},
"outputs": [
{
@ -1663,10 +1663,10 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0f04392d80> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fb8f85624e0> >"
]
},
"execution_count": 20,
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
@ -1676,11 +1676,338 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": []
"source": [
"# Saving Kripke structures to some file\n",
"\n",
"For experiments, it is sometime useful to save a Kripke structure in the HOA format. The HOA printer will automatically use `state-labels` for Kripke structures."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HOA: v1\n",
"States: 22\n",
"Start: 0\n",
"AP: 3 \"a<1\" \"b>2\" \"dead\"\n",
"acc-name: all\n",
"Acceptance: 0 t\n",
"properties: state-labels explicit-labels state-acc\n",
"--BODY--\n",
"State: [0&!1&!2] 0 \"a=0, b=0, Q=0\"\n",
"1 2\n",
"State: [!0&!1&!2] 1 \"a=1, b=0, Q=0\"\n",
"3 4\n",
"State: [0&!1&!2] 2 \"a=0, b=1, Q=0\"\n",
"4 5\n",
"State: [!0&!1&!2] 3 \"a=2, b=0, Q=0\"\n",
"6 7\n",
"State: [!0&!1&!2] 4 \"a=1, b=1, Q=0\"\n",
"7 8\n",
"State: [0&!1&!2] 5 \"a=0, b=2, Q=0\"\n",
"8 9 10\n",
"State: [!0&!1&2] 6 \"a=3, b=0, Q=0\"\n",
"6\n",
"State: [!0&!1&!2] 7 \"a=2, b=1, Q=0\"\n",
"11 12\n",
"State: [!0&!1&!2] 8 \"a=1, b=2, Q=0\"\n",
"12 13 14\n",
"State: [0&1&!2] 9 \"a=0, b=3, Q=0\"\n",
"15\n",
"State: [0&!1&!2] 10 \"a=0, b=2, Q=1\"\n",
"14 15\n",
"State: [!0&!1&2] 11 \"a=3, b=1, Q=0\"\n",
"11\n",
"State: [!0&!1&!2] 12 \"a=2, b=2, Q=0\"\n",
"16 17 18\n",
"State: [!0&1&!2] 13 \"a=1, b=3, Q=0\"\n",
"19\n",
"State: [!0&!1&!2] 14 \"a=1, b=2, Q=1\"\n",
"18 19\n",
"State: [0&1&2] 15 \"a=0, b=3, Q=1\"\n",
"15\n",
"State: [!0&!1&!2] 16 \"a=3, b=2, Q=0\"\n",
"20\n",
"State: [!0&1&!2] 17 \"a=2, b=3, Q=0\"\n",
"21\n",
"State: [!0&!1&!2] 18 \"a=2, b=2, Q=1\"\n",
"20 21 12\n",
"State: [!0&1&2] 19 \"a=1, b=3, Q=1\"\n",
"19\n",
"State: [!0&!1&!2] 20 \"a=3, b=2, Q=1\"\n",
"16\n",
"State: [!0&1&!2] 21 \"a=2, b=3, Q=1\"\n",
"17\n",
"--END--\n"
]
}
],
"source": [
"string = k.to_str('hoa')\n",
"print(string)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can load this as a Kripke structure by passing the `want_kripke` option to `spot.automaton()`. The type `kripke_graph` stores the Kripke structure explicitely (like a `twa_graph` stores an automaton explicitely), so you may want to avoid it for very large modelsand use it only for development."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'spot.impl.kripke_graph'>\n"
]
},
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Pages: 1 -->\n",
"<svg width=\"734pt\" height=\"242pt\"\n",
" viewBox=\"0.00 0.00 734.00 242.46\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.6487 .6487) rotate(0) translate(4 369.7401)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-369.7401 1127.4104,-369.7401 1127.4104,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"558.7052\" y=\"-350.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">t</text>\n",
"<text text-anchor=\"start\" x=\"550.7052\" y=\"-335.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[all]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"150.1371\" cy=\"-154.8701\" rx=\"113.2743\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"105.1371\" y=\"-158.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=0, b=0, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"78.1371\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; !dead</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=\"#000000\" d=\"M1.1671,-154.8701C3.9097,-154.8701 14.8741,-154.8701 29.7057,-154.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"36.7767,-154.8701 29.7767,-158.0202 33.2767,-154.8701 29.7767,-154.8702 29.7767,-154.8702 29.7767,-154.8702 33.2767,-154.8701 29.7766,-151.7202 36.7767,-154.8701 36.7767,-154.8701\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"415.2397\" cy=\"-190.8701\" rx=\"115.931\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"370.2397\" y=\"-194.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=1, b=0, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"341.2397\" y=\"-179.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; !dead</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=\"#000000\" d=\"M248.4748,-168.224C267.7667,-170.8437 288.0966,-173.6045 307.6721,-176.2628\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"314.8467,-177.237 307.4865,-179.4164 311.3786,-176.766 307.9104,-176.295 307.9104,-176.295 307.9104,-176.295 311.3786,-176.766 308.3343,-173.1737 314.8467,-177.237 314.8467,-177.237\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"415.2397\" cy=\"-118.8701\" rx=\"113.2743\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"370.2397\" y=\"-122.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=0, b=1, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"343.2397\" y=\"-107.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; !dead</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=\"#000000\" d=\"M248.4748,-141.5161C268.3786,-138.8133 289.3872,-135.9604 309.5324,-133.2247\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"316.6187,-132.2624 310.1063,-136.3258 313.1506,-132.7334 309.6824,-133.2045 309.6824,-133.2045 309.6824,-133.2045 313.1506,-132.7334 309.2585,-130.0831 316.6187,-132.2624 316.6187,-132.2624\"/>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"683.1707\" cy=\"-226.8701\" rx=\"115.931\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"638.1707\" y=\"-230.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=2, b=0, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"609.1707\" y=\"-215.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; !dead</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M515.7696,-204.3776C535.2954,-207.0011 555.8335,-209.7607 575.576,-212.4133\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"582.5231,-213.3467 575.1659,-215.5364 579.0543,-212.8806 575.5854,-212.4145 575.5854,-212.4145 575.5854,-212.4145 579.0543,-212.8806 576.0049,-209.2926 582.5231,-213.3467 582.5231,-213.3467\"/>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"683.1707\" cy=\"-154.8701\" rx=\"115.931\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"638.1707\" y=\"-158.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=1, b=1, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"609.1707\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; !dead</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M515.7696,-177.3626C535.2954,-174.739 555.8335,-171.9795 575.576,-169.3268\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"582.5231,-168.3934 576.0049,-172.4476 579.0543,-168.8595 575.5854,-169.3256 575.5854,-169.3256 575.5854,-169.3256 579.0543,-168.8595 575.1659,-166.2037 582.5231,-168.3934 582.5231,-168.3934\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M513.8659,-132.1218C533.8869,-134.8118 555.0421,-137.6543 575.3619,-140.3845\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"582.5112,-141.3451 575.154,-143.5348 579.0423,-140.879 575.5735,-140.4129 575.5735,-140.4129 575.5735,-140.4129 579.0423,-140.879 575.993,-137.291 582.5112,-141.3451 582.5112,-141.3451\"/>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>5</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"683.1707\" cy=\"-82.8701\" rx=\"113.2743\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"638.1707\" y=\"-86.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=0, b=2, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"611.1707\" y=\"-71.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; !dead</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M513.8659,-105.6184C534.5106,-102.8445 556.3611,-99.9086 577.2583,-97.1008\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"584.3054,-96.1539 577.7873,-100.2081 580.8366,-96.62 577.3678,-97.0861 577.3678,-97.0861 577.3678,-97.0861 580.8366,-96.62 576.9483,-93.9642 584.3054,-96.1539 584.3054,-96.1539\"/>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>6</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"948.2733\" cy=\"-282.8701\" rx=\"113.2743\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"903.2733\" y=\"-286.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=3, b=0, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"876.2733\" y=\"-271.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!&quot;a&lt;1&quot; &amp; !&quot;b&gt;2&quot; &amp; dead</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;6 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>3&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M768.8758,-244.9743C796.7674,-250.8661 827.8348,-257.4288 856.1739,-263.4151\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"863.3164,-264.9239 855.8165,-266.559 859.892,-264.2004 856.4676,-263.477 856.4676,-263.477 856.4676,-263.477 859.892,-264.2004 857.1186,-260.395 863.3164,-264.9239 863.3164,-264.9239\"/>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>7</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"948.2733\" cy=\"-210.8701\" rx=\"74.9067\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"903.2733\" y=\"-214.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=2, b=1, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"943.2733\" y=\"-199.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;7 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>3&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M795.5981,-220.0846C819.5378,-218.6398 844.3743,-217.1408 866.8851,-215.7822\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"874.108,-215.3462 867.3105,-218.9123 870.6144,-215.5571 867.1207,-215.768 867.1207,-215.768 867.1207,-215.768 870.6144,-215.5571 866.9309,-212.6238 874.108,-215.3462 874.108,-215.3462\"/>\n",
"</g>\n",
"<!-- 4&#45;&gt;7 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>4&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M768.8758,-172.9743C803.6186,-180.3133 843.289,-188.6933 876.4758,-195.7036\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"883.455,-197.1779 875.9551,-198.8131 880.0306,-196.4545 876.6062,-195.7311 876.6062,-195.7311 876.6062,-195.7311 880.0306,-196.4545 877.2572,-192.6491 883.455,-197.1779 883.455,-197.1779\"/>\n",
"</g>\n",
"<!-- 8 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>8</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"948.2733\" cy=\"-138.8701\" rx=\"74.9067\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"903.2733\" y=\"-142.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=1, b=2, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"943.2733\" y=\"-127.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;8 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>4&#45;&gt;8</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M795.5981,-148.0846C819.5378,-146.6398 844.3743,-145.1408 866.8851,-143.7822\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"874.108,-143.3462 867.3105,-146.9123 870.6144,-143.5571 867.1207,-143.768 867.1207,-143.768 867.1207,-143.768 870.6144,-143.5571 866.9309,-140.6238 874.108,-143.3462 874.108,-143.3462\"/>\n",
"</g>\n",
"<!-- 5&#45;&gt;8 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>5&#45;&gt;8</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M767.7797,-100.7428C802.7225,-108.1241 842.8025,-116.5905 876.3042,-123.6674\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"883.349,-125.1555 875.8491,-126.7907 879.9246,-124.4321 876.5001,-123.7087 876.5001,-123.7087 876.5001,-123.7087 879.9246,-124.4321 877.1512,-120.6267 883.349,-125.1555 883.349,-125.1555\"/>\n",
"</g>\n",
"<!-- u5 -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>u5</title>\n",
"<polygon fill=\"#ffffaa\" stroke=\"transparent\" points=\"961.2733,-94.3701 935.2733,-94.3701 935.2733,-71.3701 961.2733,-71.3701 961.2733,-94.3701\"/>\n",
"<text text-anchor=\"middle\" x=\"948.2733\" y=\"-79.1701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;u5 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>5&#45;&gt;u5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" stroke-dasharray=\"5,2\" d=\"M796.367,-82.8701C846.0208,-82.8701 899.3777,-82.8701 927.7542,-82.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"935.0716,-82.8701 928.0716,-86.0202 931.5716,-82.8701 928.0716,-82.8702 928.0716,-82.8702 928.0716,-82.8702 931.5716,-82.8701 928.0715,-79.7202 935.0716,-82.8701 935.0716,-82.8701\"/>\n",
"</g>\n",
"<!-- 9 -->\n",
"<g id=\"node12\" class=\"node\">\n",
"<title>9</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"948.2733\" cy=\"-26.8701\" rx=\"74.9067\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"903.2733\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a=0, b=3, Q=0</text>\n",
"<text text-anchor=\"start\" x=\"943.2733\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;9 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>5&#45;&gt;9</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M767.7797,-64.9973C802.7225,-57.6161 842.8025,-49.1496 876.3042,-42.0727\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"883.349,-40.5846 877.1512,-45.1134 879.9246,-41.308 876.5001,-42.0314 876.5001,-42.0314 876.5001,-42.0314 879.9246,-41.308 875.8491,-38.9494 883.349,-40.5846 883.349,-40.5846\"/>\n",
"</g>\n",
"<!-- 6&#45;&gt;6 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>6&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M918.017,-309.1406C916.6722,-319.2978 926.7577,-327.7401 948.2733,-327.7401 964.41,-327.7401 974.1173,-322.9913 977.395,-316.3318\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"978.5297,-309.1406 980.5501,-316.546 977.9841,-312.5978 977.4386,-316.055 977.4386,-316.055 977.4386,-316.055 977.9841,-312.5978 974.3271,-315.5641 978.5297,-309.1406 978.5297,-309.1406\"/>\n",
"</g>\n",
"<!-- u7 -->\n",
"<g id=\"node13\" class=\"node\">\n",
"<title>u7</title>\n",
"<polygon fill=\"#ffffaa\" stroke=\"transparent\" points=\"1123.4104,-222.3701 1097.4104,-222.3701 1097.4104,-199.3701 1123.4104,-199.3701 1123.4104,-222.3701\"/>\n",
"<text text-anchor=\"middle\" x=\"1110.4104\" y=\"-207.1701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;u7 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>7&#45;&gt;u7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" stroke-dasharray=\"5,2\" d=\"M1023.6459,-210.8701C1048.0287,-210.8701 1073.1021,-210.8701 1089.9848,-210.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1097.1334,-210.8701 1090.1335,-214.0202 1093.6334,-210.8701 1090.1334,-210.8702 1090.1334,-210.8702 1090.1334,-210.8702 1093.6334,-210.8701 1090.1334,-207.7202 1097.1334,-210.8701 1097.1334,-210.8701\"/>\n",
"</g>\n",
"<!-- u8 -->\n",
"<g id=\"node14\" class=\"node\">\n",
"<title>u8</title>\n",
"<polygon fill=\"#ffffaa\" stroke=\"transparent\" points=\"1123.4104,-150.3701 1097.4104,-150.3701 1097.4104,-127.3701 1123.4104,-127.3701 1123.4104,-150.3701\"/>\n",
"<text text-anchor=\"middle\" x=\"1110.4104\" y=\"-135.1701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 8&#45;&gt;u8 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>8&#45;&gt;u8</title>\n",
"<path fill=\"none\" stroke=\"#000000\" stroke-dasharray=\"5,2\" d=\"M1023.6459,-138.8701C1048.0287,-138.8701 1073.1021,-138.8701 1089.9848,-138.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1097.1334,-138.8701 1090.1335,-142.0202 1093.6334,-138.8701 1090.1334,-138.8702 1090.1334,-138.8702 1090.1334,-138.8702 1093.6334,-138.8701 1090.1334,-135.7202 1097.1334,-138.8701 1097.1334,-138.8701\"/>\n",
"</g>\n",
"<!-- u9 -->\n",
"<g id=\"node15\" class=\"node\">\n",
"<title>u9</title>\n",
"<polygon fill=\"#ffffaa\" stroke=\"transparent\" points=\"1123.4104,-38.3701 1097.4104,-38.3701 1097.4104,-15.3701 1123.4104,-15.3701 1123.4104,-38.3701\"/>\n",
"<text text-anchor=\"middle\" x=\"1110.4104\" y=\"-23.1701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">...</text>\n",
"</g>\n",
"<!-- 9&#45;&gt;u9 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>9&#45;&gt;u9</title>\n",
"<path fill=\"none\" stroke=\"#000000\" stroke-dasharray=\"5,2\" d=\"M1023.6459,-26.8701C1048.0287,-26.8701 1073.1021,-26.8701 1089.9848,-26.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1097.1334,-26.8701 1090.1335,-30.0202 1093.6334,-26.8701 1090.1334,-26.8702 1090.1334,-26.8702 1090.1334,-26.8702 1093.6334,-26.8701 1090.1334,-23.7202 1097.1334,-26.8701 1097.1334,-26.8701\"/>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.kripke_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke_graph > *' at 0x7fb8f84690f0> >"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"k2 = spot.automaton(string, want_kripke=True)\n",
"print(type(k2))\n",
"k2"
]
}
],
"metadata": {
@ -1699,7 +2026,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.7.2+"
}
},
"nbformat": 4,