spot/tests/python/highlighting.ipynb
Alexandre Duret-Lutz 3303b86a89 ltl-split: translate any "safety" with "rest"
* tests/core/ltl2tgba2.test: Add a test-case reported by Maximilien.
* spot/twaalgos/translate.cc: Translate any "safety" formula with
"rest".
* tests/python/highlighting.ipynb: Adjust.
2018-07-26 18:17:13 +02:00

2773 lines
186 KiB
Text

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import spot\n",
"spot.setup()\n",
"from IPython.display import display"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This notebook shows you different ways in which states or transitions can be highlighted in Spot. \n",
"\n",
"It should be noted that highlighting works using some special [named properties](https://spot.lrde.epita.fr/concepts.html#named-properties): basically, two maps that are attached to the automaton, and associated state or edge numbers to color numbers. This named properties are fragile: they will be lost if the automaton is transformed into a new automaton, and they can become meaningless of the automaton is modified in place (e.g., if the transitions or states are reordered).\n",
"\n",
"Nonetheless, highlighting is OK to use right before displaying or printing the automaton. The `dot` and `hoa` printer both know how to represent highlighted states and transitions.\n",
"\n",
"# Manual highlighting"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"a = spot.translate('a U b U c')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The `#` option of `print_dot()` can be used to display the internal number of each transition "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg height=\"165pt\" viewBox=\"0.00 0.00 307.00 164.80\" width=\"307pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 160.8)\">\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-160.8 303,-160.8 303,4 -4,4\" stroke=\"transparent\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"126.5\" y=\"-126.6\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>2</title>\n",
"<ellipse cx=\"56\" cy=\"-62\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-58.3\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>I-&gt;2</title>\n",
"<path d=\"M1.1233,-62C4.178,-62 17.9448,-62 30.9241,-62\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"37.9807,-62 30.9808,-65.1501 34.4807,-62 30.9807,-62.0001 30.9807,-62.0001 30.9807,-62.0001 34.4807,-62 30.9807,-58.8501 37.9807,-62 37.9807,-62\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge7\">\n",
"<title>2-&gt;2</title>\n",
"<path d=\"M49.6208,-79.0373C48.3189,-88.8579 50.4453,-98 56,-98 60.166,-98 62.4036,-92.8576 62.7128,-86.1433\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"62.3792,-79.0373 65.8541,-85.8818 62.5434,-82.5335 62.7076,-86.0296 62.7076,-86.0296 62.7076,-86.0296 62.5434,-82.5335 59.561,-86.1774 62.3792,-79.0373 62.3792,-79.0373\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"38\" y=\"-101.8\">a &amp; !c</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"41.1208\" y=\"-82.8373\">#6</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>0</title>\n",
"<ellipse cx=\"277\" cy=\"-62\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<ellipse cx=\"277\" cy=\"-62\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"277\" y=\"-58.3\">0</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge5\">\n",
"<title>2-&gt;0</title>\n",
"<path d=\"M73.8043,-66.4087C102.797,-73.0076 161.9993,-84.0634 212,-78 224.3248,-76.5054 237.6823,-73.472 249.0644,-70.4443\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"255.8692,-68.5737 249.9546,-73.4666 252.4944,-69.5015 249.1196,-70.4292 249.1196,-70.4292 249.1196,-70.4292 252.4944,-69.5015 248.2846,-67.3919 255.8692,-68.5737 255.8692,-68.5737\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-82.8\">c</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"82.3043\" y=\"-55.2087\">#4</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>1</title>\n",
"<ellipse cx=\"194\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"189.5\" y=\"-14.3\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge6\">\n",
"<title>2-&gt;1</title>\n",
"<path d=\"M73.1988,-56.5163C97.4739,-48.7764 141.9077,-34.6091 169.5907,-25.7827\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"176.5845,-23.5528 170.8722,-28.6804 173.2499,-24.616 169.9153,-25.6793 169.9153,-25.6793 169.9153,-25.6793 173.2499,-24.616 168.9584,-22.6781 176.5845,-23.5528 176.5845,-23.5528\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-53.8\">!a &amp; b &amp; !c</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"81.6988\" y=\"-45.3163\">#5</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>0-&gt;0</title>\n",
"<path d=\"M269.3173,-82.9908C268.3688,-93.0872 270.9297,-102 277,-102 281.5527,-102 284.1314,-96.9866 284.7361,-90.2204\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"284.6827,-82.9908 287.8844,-89.9673 284.7086,-86.4907 284.7345,-89.9906 284.7345,-89.9906 284.7345,-89.9906 284.7086,-86.4907 281.5846,-90.0139 284.6827,-82.9908 284.6827,-82.9908\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"272.5\" y=\"-105.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"260.8173\" y=\"-86.7908\">#1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>1-&gt;0</title>\n",
"<path d=\"M210.0032,-26.4836C221.6622,-32.6643 237.7048,-41.1688 251.1684,-48.3062\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"257.5402,-51.684 249.8801,-51.1884 254.4478,-50.0446 251.3555,-48.4053 251.3555,-48.4053 251.3555,-48.4053 254.4478,-50.0446 252.8309,-45.6221 257.5402,-51.684 257.5402,-51.684\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"230\" y=\"-43.8\">c</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"218.5032\" y=\"-30.2836\">#2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>1-&gt;1</title>\n",
"<path d=\"M187.2664,-35.0373C185.8922,-44.8579 188.1367,-54 194,-54 198.3975,-54 200.7594,-48.8576 201.0858,-42.1433\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"200.7336,-35.0373 204.2263,-41.8728 200.9069,-38.533 201.0802,-42.0287 201.0802,-42.0287 201.0802,-42.0287 200.9069,-38.533 197.934,-42.1847 200.7336,-35.0373 200.7336,-35.0373\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"175.5\" y=\"-57.8\">b &amp; !c</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"178.7664\" y=\"-38.8373\">#3</text>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.show('.#')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Using these numbers you can selectively hightlight some transitions. The second argument is a color number (from a list of predefined colors)."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"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=\"307pt\" height=\"165pt\"\n",
" viewBox=\"0.00 0.00 307.00 164.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 160.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-160.8 303,-160.8 303,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-126.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-62C4.178,-62 17.9448,-62 30.9241,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-62 30.9808,-65.1501 34.4807,-62 30.9807,-62.0001 30.9807,-62.0001 30.9807,-62.0001 34.4807,-62 30.9807,-58.8501 37.9807,-62 37.9807,-62\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-79.0373C48.3189,-88.8579 50.4453,-98 56,-98 60.166,-98 62.4036,-92.8576 62.7128,-86.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-79.0373 65.8541,-85.8818 62.5434,-82.5335 62.7076,-86.0296 62.7076,-86.0296 62.7076,-86.0296 62.5434,-82.5335 59.561,-86.1774 62.3792,-79.0373 62.3792,-79.0373\"/>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"277\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"277\" cy=\"-62\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"277\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</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=\"#ff4da0\" stroke-width=\"2\" d=\"M73.8043,-66.4087C102.797,-73.0076 161.9993,-84.0634 212,-78 224.3248,-76.5054 237.6823,-73.472 249.0644,-70.4443\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"255.8692,-68.5737 249.9546,-73.4666 252.6269,-69.9836 249.2521,-70.9113 249.1196,-70.4292 248.9871,-69.9471 252.3619,-69.0194 248.2846,-67.3919 255.8692,-68.5737 255.8692,-68.5737\"/>\n",
"<text text-anchor=\"start\" x=\"190.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"194\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"189.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M73.1988,-56.5163C97.4739,-48.7764 141.9077,-34.6091 169.5907,-25.7827\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"176.5845,-23.5528 170.8722,-28.6804 173.4018,-25.0924 170.0672,-26.1556 169.9153,-25.6793 169.7634,-25.2029 173.098,-24.1396 168.9584,-22.6781 176.5845,-23.5528 176.5845,-23.5528\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-53.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.3173,-82.9908C268.3688,-93.0872 270.9297,-102 277,-102 281.5527,-102 284.1314,-96.9866 284.7361,-90.2204\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"284.6827,-82.9908 287.8844,-89.9673 284.7086,-86.4907 284.7345,-89.9906 284.7345,-89.9906 284.7345,-89.9906 284.7086,-86.4907 281.5846,-90.0139 284.6827,-82.9908 284.6827,-82.9908\"/>\n",
"<text text-anchor=\"start\" x=\"272.5\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M210.0032,-26.4836C221.6622,-32.6643 237.7048,-41.1688 251.1684,-48.3062\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"257.5402,-51.684 249.8801,-51.1884 254.2136,-50.4864 251.1213,-48.847 251.3555,-48.4053 251.5897,-47.9635 254.682,-49.6028 252.8309,-45.6221 257.5402,-51.684 257.5402,-51.684\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M187.2664,-35.0373C185.8922,-44.8579 188.1367,-54 194,-54 198.3975,-54 200.7594,-48.8576 201.0858,-42.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"200.7336,-35.0373 204.2263,-41.8728 200.9069,-38.533 201.0802,-42.0287 201.0802,-42.0287 201.0802,-42.0287 200.9069,-38.533 197.934,-42.1847 200.7336,-35.0373 200.7336,-35.0373\"/>\n",
"<text text-anchor=\"start\" x=\"175.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; !c</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 0x7f6a44f3f090> >"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.highlight_edges([2, 4, 5], 1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that these `highlight_` functions work for edges and states, and come with both singular (changing the color of single state or edge) and plural versions.\n",
"\n",
"They modify the automaton in place."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"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=\"307pt\" height=\"165pt\"\n",
" viewBox=\"0.00 0.00 307.00 164.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 160.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-160.8 303,-160.8 303,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-126.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-62C4.178,-62 17.9448,-62 30.9241,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-62 30.9808,-65.1501 34.4807,-62 30.9807,-62.0001 30.9807,-62.0001 30.9807,-62.0001 34.4807,-62 30.9807,-58.8501 37.9807,-62 37.9807,-62\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#ff7f00\" stroke-width=\"2\" d=\"M49.6208,-79.0373C48.3189,-88.8579 50.4453,-98 56,-98 60.166,-98 62.4036,-92.8576 62.7128,-86.1433\"/>\n",
"<polygon fill=\"#ff7f00\" stroke=\"#ff7f00\" stroke-width=\"2\" points=\"62.3792,-79.0373 65.8541,-85.8818 63.0428,-82.51 63.207,-86.0062 62.7076,-86.0296 62.2081,-86.0531 62.0439,-82.5569 59.561,-86.1774 62.3792,-79.0373 62.3792,-79.0373\"/>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-62\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"277\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</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=\"#ff4da0\" stroke-width=\"2\" d=\"M73.8043,-66.4087C102.797,-73.0076 161.9993,-84.0634 212,-78 224.3248,-76.5054 237.6823,-73.472 249.0644,-70.4443\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"255.8692,-68.5737 249.9546,-73.4666 252.6269,-69.9836 249.2521,-70.9113 249.1196,-70.4292 248.9871,-69.9471 252.3619,-69.0194 248.2846,-67.3919 255.8692,-68.5737 255.8692,-68.5737\"/>\n",
"<text text-anchor=\"start\" x=\"190.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"194\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"189.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M73.1988,-56.5163C97.4739,-48.7764 141.9077,-34.6091 169.5907,-25.7827\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"176.5845,-23.5528 170.8722,-28.6804 173.4018,-25.0924 170.0672,-26.1556 169.9153,-25.6793 169.7634,-25.2029 173.098,-24.1396 168.9584,-22.6781 176.5845,-23.5528 176.5845,-23.5528\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-53.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.3173,-82.9908C268.3688,-93.0872 270.9297,-102 277,-102 281.5527,-102 284.1314,-96.9866 284.7361,-90.2204\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"284.6827,-82.9908 287.8844,-89.9673 284.7086,-86.4907 284.7345,-89.9906 284.7345,-89.9906 284.7345,-89.9906 284.7086,-86.4907 281.5846,-90.0139 284.6827,-82.9908 284.6827,-82.9908\"/>\n",
"<text text-anchor=\"start\" x=\"272.5\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M210.0032,-26.4836C221.6622,-32.6643 237.7048,-41.1688 251.1684,-48.3062\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"257.5402,-51.684 249.8801,-51.1884 254.2136,-50.4864 251.1213,-48.847 251.3555,-48.4053 251.5897,-47.9635 254.682,-49.6028 252.8309,-45.6221 257.5402,-51.684 257.5402,-51.684\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M187.2664,-35.0373C185.8922,-44.8579 188.1367,-54 194,-54 198.3975,-54 200.7594,-48.8576 201.0858,-42.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"200.7336,-35.0373 204.2263,-41.8728 200.9069,-38.533 201.0802,-42.0287 201.0802,-42.0287 201.0802,-42.0287 200.9069,-38.533 197.934,-42.1847 200.7336,-35.0373 200.7336,-35.0373\"/>\n",
"<text text-anchor=\"start\" x=\"175.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa; proxy of <Swig Object of type 'std::shared_ptr< spot::twa > *' at 0x7f6a44edacc0> >"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.highlight_edge(6, 2).highlight_states((0, 1), 0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The plural version can take a list or tuple of state numbers (as above) or of Booleans (as below). In the latter case the indices of the True values give the states to highlight."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"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=\"307pt\" height=\"165pt\"\n",
" viewBox=\"0.00 0.00 307.00 164.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 160.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-160.8 303,-160.8 303,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-126.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"56\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-62C4.178,-62 17.9448,-62 30.9241,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-62 30.9808,-65.1501 34.4807,-62 30.9807,-62.0001 30.9807,-62.0001 30.9807,-62.0001 34.4807,-62 30.9807,-58.8501 37.9807,-62 37.9807,-62\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#ff7f00\" stroke-width=\"2\" d=\"M49.6208,-79.0373C48.3189,-88.8579 50.4453,-98 56,-98 60.166,-98 62.4036,-92.8576 62.7128,-86.1433\"/>\n",
"<polygon fill=\"#ff7f00\" stroke=\"#ff7f00\" stroke-width=\"2\" points=\"62.3792,-79.0373 65.8541,-85.8818 63.0428,-82.51 63.207,-86.0062 62.7076,-86.0296 62.2081,-86.0531 62.0439,-82.5569 59.561,-86.1774 62.3792,-79.0373 62.3792,-79.0373\"/>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-62\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"277\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</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=\"#ff4da0\" stroke-width=\"2\" d=\"M73.8043,-66.4087C102.797,-73.0076 161.9993,-84.0634 212,-78 224.3248,-76.5054 237.6823,-73.472 249.0644,-70.4443\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"255.8692,-68.5737 249.9546,-73.4666 252.6269,-69.9836 249.2521,-70.9113 249.1196,-70.4292 248.9871,-69.9471 252.3619,-69.0194 248.2846,-67.3919 255.8692,-68.5737 255.8692,-68.5737\"/>\n",
"<text text-anchor=\"start\" x=\"190.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"194\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"189.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M73.1988,-56.5163C97.4739,-48.7764 141.9077,-34.6091 169.5907,-25.7827\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"176.5845,-23.5528 170.8722,-28.6804 173.4018,-25.0924 170.0672,-26.1556 169.9153,-25.6793 169.7634,-25.2029 173.098,-24.1396 168.9584,-22.6781 176.5845,-23.5528 176.5845,-23.5528\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-53.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.3173,-82.9908C268.3688,-93.0872 270.9297,-102 277,-102 281.5527,-102 284.1314,-96.9866 284.7361,-90.2204\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"284.6827,-82.9908 287.8844,-89.9673 284.7086,-86.4907 284.7345,-89.9906 284.7345,-89.9906 284.7345,-89.9906 284.7086,-86.4907 281.5846,-90.0139 284.6827,-82.9908 284.6827,-82.9908\"/>\n",
"<text text-anchor=\"start\" x=\"272.5\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M210.0032,-26.4836C221.6622,-32.6643 237.7048,-41.1688 251.1684,-48.3062\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"257.5402,-51.684 249.8801,-51.1884 254.2136,-50.4864 251.1213,-48.847 251.3555,-48.4053 251.5897,-47.9635 254.682,-49.6028 252.8309,-45.6221 257.5402,-51.684 257.5402,-51.684\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M187.2664,-35.0373C185.8922,-44.8579 188.1367,-54 194,-54 198.3975,-54 200.7594,-48.8576 201.0858,-42.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"200.7336,-35.0373 204.2263,-41.8728 200.9069,-38.533 201.0802,-42.0287 201.0802,-42.0287 201.0802,-42.0287 200.9069,-38.533 197.934,-42.1847 200.7336,-35.0373 200.7336,-35.0373\"/>\n",
"<text text-anchor=\"start\" x=\"175.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; !c</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 0x7f6a44f3f090> >"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.highlight_states([False, True, True], 5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Saving to HOA 1.1\n",
"\n",
"When saving to HOA format, the highlighting is only output if version 1.1 of the format is selected, because the headers `spot.highlight.edges` and `spot.highlight.states` contain dots, which are disallowed in version 1. Compare these two outputs:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HOA: v1\n",
"States: 3\n",
"Start: 2\n",
"AP: 3 \"a\" \"b\" \"c\"\n",
"acc-name: Buchi\n",
"Acceptance: 1 Inf(0)\n",
"properties: trans-labels explicit-labels state-acc deterministic\n",
"properties: stutter-invariant terminal\n",
"--BODY--\n",
"State: 0 {0}\n",
"[t] 0\n",
"State: 1\n",
"[2] 0\n",
"[1&!2] 1\n",
"State: 2\n",
"[2] 0\n",
"[!0&1&!2] 1\n",
"[0&!2] 2\n",
"--END--\n",
"\n",
"HOA: v1.1\n",
"States: 3\n",
"Start: 2\n",
"AP: 3 \"a\" \"b\" \"c\"\n",
"acc-name: Buchi\n",
"Acceptance: 1 Inf(0)\n",
"properties: trans-labels explicit-labels state-acc !complete\n",
"properties: deterministic stutter-invariant terminal\n",
"spot.highlight.states: 0 0 1 5 2 5\n",
"spot.highlight.edges: 2 1 4 1 5 1 6 2\n",
"--BODY--\n",
"State: 0 {0}\n",
"[t] 0\n",
"State: 1\n",
"[2] 0\n",
"[1&!2] 1\n",
"State: 2\n",
"[2] 0\n",
"[!0&1&!2] 1\n",
"[0&!2] 2\n",
"--END--\n"
]
}
],
"source": [
"print(a.to_str('HOA', '1'))\n",
"print()\n",
"print(a.to_str('HOA', '1.1'))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Highlighting a run\n",
"\n",
"One use of this highlighting is to highlight a run in an automaton.\n",
"\n",
"The following few command generate an automaton, then an accepting run on this automaton, and highlight that accepting run on the automaton. Note that a run knows the automaton from which it was generated, so calling `highlight()` will directly decorate that automaton."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"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=\"386pt\" height=\"276pt\"\n",
" viewBox=\"0.00 0.00 386.00 276.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 1) rotate(0) translate(4 272)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-272 382,-272 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 4 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;4 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-105C4.178,-105 17.9448,-105 30.9241,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-105 30.9808,-108.1501 34.4807,-105 30.9807,-105.0001 30.9807,-105.0001 30.9807,-105.0001 34.4807,-105 30.9807,-101.8501 37.9807,-105 37.9807,-105\"/>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"137\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.3802,-105C85.4352,-105 99.6622,-105 111.7609,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"118.9716,-105 111.9716,-108.1501 115.4716,-105 111.9716,-105.0001 111.9716,-105.0001 111.9716,-105.0001 115.4716,-105 111.9716,-101.8501 118.9716,-105 118.9716,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M129.9688,-121.6641C128.4063,-131.625 130.75,-141 137,-141 141.6875,-141 144.1777,-135.7266 144.4707,-128.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"144.0313,-121.6641 147.6006,-128.4598 144.2438,-125.1576 144.4564,-128.6511 144.4564,-128.6511 144.4564,-128.6511 144.2438,-125.1576 141.3122,-128.8425 144.0313,-121.6641 144.0313,-121.6641\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"360\" cy=\"-129\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-125.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M144.8384,-121.309C157.9792,-146.5059 187.0932,-193.9758 228,-213 273.4887,-234.1551 322.045,-181.0667 345.5673,-149.848\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"349.9296,-143.9244 348.3152,-151.4288 347.8542,-146.7426 345.7787,-149.5609 345.7787,-149.5609 345.7787,-149.5609 347.8542,-146.7426 343.2423,-147.693 349.9296,-143.9244 349.9296,-143.9244\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-220.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M155.412,-105C173.9217,-105 202.5942,-105 223.2267,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"230.4306,-105 223.4307,-108.1501 226.9306,-105 223.4306,-105.0001 223.4306,-105.0001 223.4306,-105.0001 226.9306,-105 223.4306,-101.8501 230.4306,-105 230.4306,-105\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M151.5767,-93.6263C171.301,-78.236 206.5611,-50.7236 228.6783,-33.4662\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"234.2723,-29.1014 230.6912,-35.8911 231.5129,-31.2545 228.7535,-33.4076 228.7535,-33.4076 228.7535,-33.4076 231.5129,-31.2545 226.8157,-30.9242 234.2723,-29.1014 234.2723,-29.1014\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M355.1797,-146.4099C354.28,-156.0879 355.8867,-165 360,-165 363.0207,-165 364.6896,-160.1936 365.0067,-153.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"364.8203,-146.4099 368.1457,-153.3283 364.9085,-149.9088 364.9967,-153.4077 364.9967,-153.4077 364.9967,-153.4077 364.9085,-149.9088 361.8477,-153.4871 364.8203,-146.4099 364.8203,-146.4099\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-183.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.7325,-145.5959C347.2416,-166.8633 349.6641,-195 360,-195 369.2458,-195 372.1594,-172.4854 368.7408,-152.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2675,-145.5959 371.8066,-151.7861 367.9966,-149.0191 368.7257,-152.4423 368.7257,-152.4423 368.7257,-152.4423 367.9966,-149.0191 365.6448,-153.0985 367.2675,-145.5959 367.2675,-145.5959\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M243.5012,-122.4099C242.5681,-132.0879 244.2344,-141 248.5,-141 251.6326,-141 253.3633,-136.1936 253.6921,-129.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"253.4988,-122.4099 256.8307,-129.3252 253.5903,-125.9087 253.6818,-129.4075 253.6818,-129.4075 253.6818,-129.4075 253.5903,-125.9087 250.5329,-129.4899 253.4988,-122.4099 253.4988,-122.4099\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M240.9634,-121.5959C235.269,-142.8633 237.7813,-171 248.5,-171 258.0883,-171 261.1098,-148.4854 257.5645,-128.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.0366,-121.5959 260.6223,-127.7517 256.7915,-125.0135 257.5464,-128.4311 257.5464,-128.4311 257.5464,-128.4311 256.7915,-125.0135 254.4706,-129.1106 256.0366,-121.5959 256.0366,-121.5959\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-174.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M261.2905,-30.7331C281.0962,-50.4501 319.2564,-88.4391 341.8888,-110.9701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"347.0153,-116.0735 339.832,-113.3672 344.5348,-113.6042 342.0544,-111.1348 342.0544,-111.1348 342.0544,-111.1348 344.5348,-113.6042 344.2768,-108.9024 347.0153,-116.0735 347.0153,-116.0735\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-96.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M238.9254,-33.5414C236.2303,-43.9087 239.4219,-54 248.5,-54 255.4504,-54 258.9503,-48.0847 258.9995,-40.6591\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"258.0746,-33.5414 262.1004,-40.0771 258.5256,-37.0123 258.9767,-40.4831 258.9767,-40.4831 258.9767,-40.4831 258.5256,-37.0123 255.853,-40.889 258.0746,-33.5414 258.0746,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</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 0x7f6a44eec0c0> >"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"b = spot.translate('X (F(Ga <-> b) & GF!b)'); b"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Prefix:\n",
" 4\n",
" | 1\n",
" 0\n",
" | !a & !b\n",
"Cycle:\n",
" 1\n",
" | !b\t{0}"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = b.accepting_run(); r"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"r.highlight(5) # the parameter is a color number"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The call of `highlight(5)` on the accepting run `r` modified the original automaton `b`:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"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=\"386pt\" height=\"276pt\"\n",
" viewBox=\"0.00 0.00 386.00 276.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 1) rotate(0) translate(4 272)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-272 382,-272 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 4 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;4 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-105C4.178,-105 17.9448,-105 30.9241,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-105 30.9808,-108.1501 34.4807,-105 30.9807,-105.0001 30.9807,-105.0001 30.9807,-105.0001 34.4807,-105 30.9807,-101.8501 37.9807,-105 37.9807,-105\"/>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"137\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.3802,-105C85.4352,-105 99.6622,-105 111.7609,-105\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"118.9716,-105 111.9716,-108.1501 115.4716,-105.5 111.9716,-105.5001 111.9716,-105.0001 111.9716,-104.5001 115.4716,-104.5 111.9716,-101.8501 118.9716,-105 118.9716,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M129.9688,-121.6641C128.4063,-131.625 130.75,-141 137,-141 141.6875,-141 144.1777,-135.7266 144.4707,-128.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"144.0313,-121.6641 147.6006,-128.4598 144.2438,-125.1576 144.4564,-128.6511 144.4564,-128.6511 144.4564,-128.6511 144.2438,-125.1576 141.3122,-128.8425 144.0313,-121.6641 144.0313,-121.6641\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"360\" cy=\"-129\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-125.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M144.8384,-121.309C157.9792,-146.5059 187.0932,-193.9758 228,-213 273.4887,-234.1551 322.045,-181.0667 345.5673,-149.848\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"349.9296,-143.9244 348.3152,-151.4288 348.2568,-147.0391 346.1813,-149.8574 345.7787,-149.5609 345.3761,-149.2644 347.4516,-146.4461 343.2423,-147.693 349.9296,-143.9244 349.9296,-143.9244\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-220.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M155.412,-105C173.9217,-105 202.5942,-105 223.2267,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"230.4306,-105 223.4307,-108.1501 226.9306,-105 223.4306,-105.0001 223.4306,-105.0001 223.4306,-105.0001 226.9306,-105 223.4306,-101.8501 230.4306,-105 230.4306,-105\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M151.5767,-93.6263C171.301,-78.236 206.5611,-50.7236 228.6783,-33.4662\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"234.2723,-29.1014 230.6912,-35.8911 231.5129,-31.2545 228.7535,-33.4076 228.7535,-33.4076 228.7535,-33.4076 231.5129,-31.2545 226.8157,-30.9242 234.2723,-29.1014 234.2723,-29.1014\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M355.1797,-146.4099C354.28,-156.0879 355.8867,-165 360,-165 363.0207,-165 364.6896,-160.1936 365.0067,-153.8073\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"364.8203,-146.4099 368.1457,-153.3283 365.4083,-149.8962 365.4966,-153.3951 364.9967,-153.4077 364.4969,-153.4203 364.4086,-149.9214 361.8477,-153.4871 364.8203,-146.4099 364.8203,-146.4099\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-183.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.7325,-145.5959C347.2416,-166.8633 349.6641,-195 360,-195 369.2458,-195 372.1594,-172.4854 368.7408,-152.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2675,-145.5959 371.8066,-151.7861 367.9966,-149.0191 368.7257,-152.4423 368.7257,-152.4423 368.7257,-152.4423 367.9966,-149.0191 365.6448,-153.0985 367.2675,-145.5959 367.2675,-145.5959\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M243.5012,-122.4099C242.5681,-132.0879 244.2344,-141 248.5,-141 251.6326,-141 253.3633,-136.1936 253.6921,-129.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"253.4988,-122.4099 256.8307,-129.3252 253.5903,-125.9087 253.6818,-129.4075 253.6818,-129.4075 253.6818,-129.4075 253.5903,-125.9087 250.5329,-129.4899 253.4988,-122.4099 253.4988,-122.4099\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M240.9634,-121.5959C235.269,-142.8633 237.7813,-171 248.5,-171 258.0883,-171 261.1098,-148.4854 257.5645,-128.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.0366,-121.5959 260.6223,-127.7517 256.7915,-125.0135 257.5464,-128.4311 257.5464,-128.4311 257.5464,-128.4311 256.7915,-125.0135 254.4706,-129.1106 256.0366,-121.5959 256.0366,-121.5959\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-174.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M261.2905,-30.7331C281.0962,-50.4501 319.2564,-88.4391 341.8888,-110.9701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"347.0153,-116.0735 339.832,-113.3672 344.5348,-113.6042 342.0544,-111.1348 342.0544,-111.1348 342.0544,-111.1348 344.5348,-113.6042 344.2768,-108.9024 347.0153,-116.0735 347.0153,-116.0735\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-96.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M238.9254,-33.5414C236.2303,-43.9087 239.4219,-54 248.5,-54 255.4504,-54 258.9503,-48.0847 258.9995,-40.6591\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"258.0746,-33.5414 262.1004,-40.0771 258.5256,-37.0123 258.9767,-40.4831 258.9767,-40.4831 258.9767,-40.4831 258.5256,-37.0123 255.853,-40.889 258.0746,-33.5414 258.0746,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</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 0x7f6a44eec0c0> >"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"b"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Highlighting from a product\n",
"\n",
"Pretty often, accepting runs are found in a product but we want to display them on one of the original automata. This can be done by projecting the runs on those automata before displaying them."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"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=\"171pt\" height=\"125pt\"\n",
" viewBox=\"0.00 0.00 171.00 124.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 120.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-120.8 167,-120.8 167,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"58.5\" y=\"-86.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-22C4.178,-22 17.9448,-22 30.9241,-22\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-22 30.9808,-25.1501 34.4807,-22 30.9807,-22.0001 30.9807,-22.0001 30.9807,-22.0001 34.4807,-22 30.9807,-18.8501 37.9807,-22 37.9807,-22\"/>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-39.0373C48.3189,-48.8579 50.4453,-58 56,-58 60.166,-58 62.4036,-52.8576 62.7128,-46.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-39.0373 65.8541,-45.8818 62.5434,-42.5335 62.7076,-46.0296 62.7076,-46.0296 62.7076,-46.0296 62.5434,-42.5335 59.561,-46.1774 62.3792,-39.0373 62.3792,-39.0373\"/>\n",
"<text text-anchor=\"start\" x=\"37.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"141\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"141\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.0263,-22C84.9439,-22 99.13,-22 111.634,-22\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"118.7644,-22 111.7645,-25.1501 115.2644,-22 111.7644,-22.0001 111.7644,-22.0001 111.7644,-22.0001 115.2644,-22 111.7644,-18.8501 118.7644,-22 118.7644,-22\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M132.9937,-42.5808C131.8859,-52.8447 134.5547,-62 141,-62 145.834,-62 148.5437,-56.8502 149.129,-49.9451\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"149.0063,-42.5808 152.2726,-49.5273 149.0647,-46.0803 149.123,-49.5798 149.123,-49.5798 149.123,-49.5798 149.0647,-46.0803 145.9735,-49.6324 149.0063,-42.5808 149.0063,-42.5808\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</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 0x7f6a44e7cb70> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"82pt\" height=\"161pt\"\n",
" viewBox=\"0.00 0.00 82.00 161.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 1) rotate(0) translate(4 157)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-157 78,-157 78,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"16\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"54\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"14\" y=\"-124.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"#000000\" d=\"M1.1233,-18C4.178,-18 17.9448,-18 30.9241,-18\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-18 30.9808,-21.1501 34.4807,-18 30.9807,-18.0001 30.9807,-18.0001 30.9807,-18.0001 34.4807,-18 30.9807,-14.8501 37.9807,-18 37.9807,-18\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M52.7643,-35.7817C52.2144,-45.3149 53.293,-54 56,-54 57.988,-54 59.0977,-49.3161 59.3292,-43.0521\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"59.2357,-35.7817 62.4756,-42.7406 59.2808,-39.2814 59.3258,-42.7812 59.3258,-42.7812 59.3258,-42.7812 59.2808,-39.2814 56.1761,-42.8217 59.2357,-35.7817 59.2357,-35.7817\"/>\n",
"<text text-anchor=\"start\" x=\"50.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M50.6841,-35.4203C47.6538,-52.791 49.4258,-72 56,-72 61.7011,-72 63.7908,-57.5545 62.2691,-42.3894\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"61.3159,-35.4203 65.3856,-41.9288 61.7902,-38.888 62.2646,-42.3557 62.2646,-42.3557 62.2646,-42.3557 61.7902,-38.888 59.1437,-42.7826 61.3159,-35.4203 61.3159,-35.4203\"/>\n",
"<text text-anchor=\"start\" x=\"52.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"48\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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 0x7f6a44e7c8a0> >"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"left = spot.translate('a U b')\n",
"right = spot.translate('GFa')\n",
"display(left, right)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"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=\"227pt\" height=\"164pt\"\n",
" viewBox=\"0.00 0.00 227.00 164.45\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 160.4473)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-160.4473 223,-160.4473 223,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"88.5\" y=\"-142.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"110.5\" y=\"-142.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-142.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"86.5\" y=\"-128.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"65\" cy=\"-21.4473\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"55\" y=\"-17.7473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1,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=\"#000000\" d=\"M1.2244,-21.4473C4.383,-21.4473 17.3969,-21.4473 30.8528,-21.4473\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8798,-21.4473 30.8799,-24.5974 34.3798,-21.4474 30.8798,-21.4474 30.8798,-21.4474 30.8798,-21.4474 34.3798,-21.4474 30.8798,-18.2974 37.8798,-21.4473 37.8798,-21.4473\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M57.1448,-38.8572C55.6785,-48.5352 58.2969,-57.4473 65,-57.4473 69.9226,-57.4473 72.6423,-52.641 73.1591,-46.2546\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"72.8552,-38.8572 76.2899,-45.722 72.9989,-42.3543 73.1426,-45.8513 73.1426,-45.8513 73.1426,-45.8513 72.9989,-42.3543 69.9953,-45.9806 72.8552,-38.8572 72.8552,-38.8572\"/>\n",
"<text text-anchor=\"start\" x=\"46.5\" y=\"-61.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"192\" cy=\"-21.4473\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"182\" y=\"-17.7473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0,0</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=\"M92.2447,-21.4473C111.4127,-21.4473 137.2089,-21.4473 157.7667,-21.4473\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"164.8004,-21.4473 157.8004,-24.5974 161.3004,-21.4474 157.8004,-21.4474 157.8004,-21.4474 157.8004,-21.4474 161.3004,-21.4474 157.8003,-18.2974 164.8004,-21.4473 164.8004,-21.4473\"/>\n",
"<text text-anchor=\"start\" x=\"110\" y=\"-25.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M86.4111,-10.3522C93.6978,-7.1385 102.0208,-4.0628 110,-2.4473 126.1174,.8158 130.8826,.8158 147,-2.4473 152.6104,-3.5832 158.3907,-5.441 163.8613,-7.5611\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"170.5889,-10.3522 162.9162,-10.5793 167.3561,-9.0109 164.1233,-7.6697 164.1233,-7.6697 164.1233,-7.6697 167.3561,-9.0109 165.3304,-4.7602 170.5889,-10.3522 170.5889,-10.3522\"/>\n",
"<text text-anchor=\"start\" x=\"111.5\" y=\"-6.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M186.4273,-39.2291C185.4803,-48.7623 187.3379,-57.4473 192,-57.4473 195.4237,-57.4473 197.335,-52.7634 197.7337,-46.4994\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"197.5727,-39.2291 200.877,-46.1576 197.6502,-42.7282 197.7277,-46.2273 197.7277,-46.2273 197.7277,-46.2273 197.6502,-42.7282 194.5785,-46.2971 197.5727,-39.2291 197.5727,-39.2291\"/>\n",
"<text text-anchor=\"start\" x=\"186.5\" y=\"-61.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M182.9293,-38.5891C177.5936,-56.0323 180.6172,-75.4473 192,-75.4473 201.871,-75.4473 205.4558,-60.8469 202.7543,-45.5934\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"201.0707,-38.5891 205.7695,-44.659 201.8887,-41.9922 202.7067,-45.3952 202.7067,-45.3952 202.7067,-45.3952 201.8887,-41.9922 199.644,-46.1315 201.0707,-38.5891 201.0707,-38.5891\"/>\n",
"<text text-anchor=\"start\" x=\"188.5\" y=\"-94.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"184\" y=\"-79.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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 0x7f6a44e7c960> >"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"prod = spot.product(left, right); prod"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Prefix:\n",
" 1,0\n",
" | !a & b\n",
"Cycle:\n",
" 0,0\n",
" | a\t{0}"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"run = prod.accepting_run(); run"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"run.highlight(5)\n",
"# Note that by default project() needs to know on which side you project, but it cannot \n",
"# guess it. The left-side is assumed unless you pass True as a second argument.\n",
"run.project(left).highlight(5)\n",
"run.project(right, True).highlight(5)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"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=\"227pt\" height=\"164pt\"\n",
" viewBox=\"0.00 0.00 227.00 164.45\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 160.4473)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-160.4473 223,-160.4473 223,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"88.5\" y=\"-142.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"110.5\" y=\"-142.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-142.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"86.5\" y=\"-128.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"65\" cy=\"-21.4473\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"55\" y=\"-17.7473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1,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=\"#000000\" d=\"M1.2244,-21.4473C4.383,-21.4473 17.3969,-21.4473 30.8528,-21.4473\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8798,-21.4473 30.8799,-24.5974 34.3798,-21.4474 30.8798,-21.4474 30.8798,-21.4474 30.8798,-21.4474 34.3798,-21.4474 30.8798,-18.2974 37.8798,-21.4473 37.8798,-21.4473\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M57.1448,-38.8572C55.6785,-48.5352 58.2969,-57.4473 65,-57.4473 69.9226,-57.4473 72.6423,-52.641 73.1591,-46.2546\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"72.8552,-38.8572 76.2899,-45.722 72.9989,-42.3543 73.1426,-45.8513 73.1426,-45.8513 73.1426,-45.8513 72.9989,-42.3543 69.9953,-45.9806 72.8552,-38.8572 72.8552,-38.8572\"/>\n",
"<text text-anchor=\"start\" x=\"46.5\" y=\"-61.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"192\" cy=\"-21.4473\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"182\" y=\"-17.7473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0,0</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=\"#e31a1c\" stroke-width=\"2\" d=\"M92.2447,-21.4473C111.4127,-21.4473 137.2089,-21.4473 157.7667,-21.4473\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"164.8004,-21.4473 157.8004,-24.5974 161.3004,-21.9474 157.8004,-21.9474 157.8004,-21.4474 157.8004,-20.9474 161.3004,-20.9474 157.8003,-18.2974 164.8004,-21.4473 164.8004,-21.4473\"/>\n",
"<text text-anchor=\"start\" x=\"110\" y=\"-25.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M86.4111,-10.3522C93.6978,-7.1385 102.0208,-4.0628 110,-2.4473 126.1174,.8158 130.8826,.8158 147,-2.4473 152.6104,-3.5832 158.3907,-5.441 163.8613,-7.5611\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"170.5889,-10.3522 162.9162,-10.5793 167.3561,-9.0109 164.1233,-7.6697 164.1233,-7.6697 164.1233,-7.6697 167.3561,-9.0109 165.3304,-4.7602 170.5889,-10.3522 170.5889,-10.3522\"/>\n",
"<text text-anchor=\"start\" x=\"111.5\" y=\"-6.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M186.4273,-39.2291C185.4803,-48.7623 187.3379,-57.4473 192,-57.4473 195.4237,-57.4473 197.335,-52.7634 197.7337,-46.4994\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"197.5727,-39.2291 200.877,-46.1576 197.6502,-42.7282 197.7277,-46.2273 197.7277,-46.2273 197.7277,-46.2273 197.6502,-42.7282 194.5785,-46.2971 197.5727,-39.2291 197.5727,-39.2291\"/>\n",
"<text text-anchor=\"start\" x=\"186.5\" y=\"-61.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M182.9293,-38.5891C177.5936,-56.0323 180.6172,-75.4473 192,-75.4473 201.871,-75.4473 205.4558,-60.8469 202.7543,-45.5934\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"201.0707,-38.5891 205.7695,-44.659 202.3749,-41.8753 203.1929,-45.2784 202.7067,-45.3952 202.2206,-45.5121 201.4025,-42.109 199.644,-46.1315 201.0707,-38.5891 201.0707,-38.5891\"/>\n",
"<text text-anchor=\"start\" x=\"188.5\" y=\"-94.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"184\" y=\"-79.2473\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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 0x7f6a44e7c960> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"171pt\" height=\"125pt\"\n",
" viewBox=\"0.00 0.00 171.00 124.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 120.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-120.8 167,-120.8 167,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"58.5\" y=\"-86.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-22C4.178,-22 17.9448,-22 30.9241,-22\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-22 30.9808,-25.1501 34.4807,-22 30.9807,-22.0001 30.9807,-22.0001 30.9807,-22.0001 34.4807,-22 30.9807,-18.8501 37.9807,-22 37.9807,-22\"/>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-39.0373C48.3189,-48.8579 50.4453,-58 56,-58 60.166,-58 62.4036,-52.8576 62.7128,-46.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-39.0373 65.8541,-45.8818 62.5434,-42.5335 62.7076,-46.0296 62.7076,-46.0296 62.7076,-46.0296 62.5434,-42.5335 59.561,-46.1774 62.3792,-39.0373 62.3792,-39.0373\"/>\n",
"<text text-anchor=\"start\" x=\"37.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"141\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"141\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.0263,-22C84.9439,-22 99.13,-22 111.634,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"118.7644,-22 111.7645,-25.1501 115.2644,-22.5 111.7644,-22.5001 111.7644,-22.0001 111.7644,-21.5001 115.2644,-21.5 111.7644,-18.8501 118.7644,-22 118.7644,-22\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M132.9937,-42.5808C131.8859,-52.8447 134.5547,-62 141,-62 145.834,-62 148.5437,-56.8502 149.129,-49.9451\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"149.0063,-42.5808 152.2726,-49.5273 149.5646,-46.072 149.623,-49.5715 149.123,-49.5798 148.6231,-49.5882 148.5647,-46.0887 145.9735,-49.6324 149.0063,-42.5808 149.0063,-42.5808\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</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 0x7f6a44e7cb70> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"82pt\" height=\"161pt\"\n",
" viewBox=\"0.00 0.00 82.00 161.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 1) rotate(0) translate(4 157)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-157 78,-157 78,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"16\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"54\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"14\" y=\"-124.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"#000000\" d=\"M1.1233,-18C4.178,-18 17.9448,-18 30.9241,-18\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-18 30.9808,-21.1501 34.4807,-18 30.9807,-18.0001 30.9807,-18.0001 30.9807,-18.0001 34.4807,-18 30.9807,-14.8501 37.9807,-18 37.9807,-18\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M52.7643,-35.7817C52.2144,-45.3149 53.293,-54 56,-54 57.988,-54 59.0977,-49.3161 59.3292,-43.0521\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"59.2357,-35.7817 62.4756,-42.7406 59.7808,-39.275 59.8258,-42.7747 59.3258,-42.7812 58.8259,-42.7876 58.7808,-39.2879 56.1761,-42.8217 59.2357,-35.7817 59.2357,-35.7817\"/>\n",
"<text text-anchor=\"start\" x=\"50.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M50.6841,-35.4203C47.6538,-52.791 49.4258,-72 56,-72 61.7011,-72 63.7908,-57.5545 62.2691,-42.3894\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"61.3159,-35.4203 65.3856,-41.9288 62.2856,-38.8202 62.76,-42.2879 62.2646,-42.3557 61.7692,-42.4235 61.2949,-38.9558 59.1437,-42.7826 61.3159,-35.4203 61.3159,-35.4203\"/>\n",
"<text text-anchor=\"start\" x=\"52.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"48\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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 0x7f6a44e7c8a0> >"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(prod, left, right)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The projection also works for products generated on-the-fly, but the on-the-fly product itself cannot be highlighted (it does not store states or transitions). "
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Prefix:\n",
" 0 * 3\n",
" | a & !b\n",
" 1 * 2\n",
" | a\t{0}\n",
" 1 * 1\n",
" | a\t{0}\n",
" 1 * 0\n",
" | a & b\t{0}\n",
"Cycle:\n",
" 1 * 4\n",
" | a\t{0,1}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"687pt\" height=\"262pt\"\n",
" viewBox=\"0.00 0.00 686.57 262.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 1) rotate(0) translate(4 258)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-258 682.5675,-258 682.5675,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"292.2837\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"314.2837\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"330.2837\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)&amp;Inf(</text>\n",
"<text text-anchor=\"start\" x=\"366.2837\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"382.2837\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"295.2837\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[gen. Büchi 2]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"68.5473\" cy=\"-166\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"53.0473\" y=\"-162.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0 * 3</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.2642,-166C4.4473,-166 17.1175,-166 30.6189,-166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.7092,-166 30.7093,-169.1501 34.2092,-166 30.7092,-166.0001 30.7092,-166.0001 30.7092,-166.0001 34.2092,-166 30.7092,-162.8501 37.7092,-166 37.7092,-166\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"202.6419\" cy=\"-193\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"187.1419\" y=\"-189.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1 * 2</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=\"M97.6438,-171.8586C117.8516,-175.9274 144.9174,-181.3772 166.5079,-185.7244\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"173.6021,-187.1528 166.118,-188.8591 170.171,-186.4619 166.7398,-185.771 166.7398,-185.771 166.7398,-185.771 170.171,-186.4619 167.3617,-182.683 173.6021,-187.1528 173.6021,-187.1528\"/>\n",
"<text text-anchor=\"start\" x=\"117.0946\" y=\"-185.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"202.6419\" cy=\"-139\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"187.1419\" y=\"-135.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2 * 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=\"#000000\" d=\"M97.6438,-160.1414C117.8516,-156.0726 144.9174,-150.6228 166.5079,-146.2756\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"173.6021,-144.8472 167.3617,-149.317 170.171,-145.5381 166.7398,-146.229 166.7398,-146.229 166.7398,-146.229 170.171,-145.5381 166.118,-143.1409 173.6021,-144.8472 173.6021,-144.8472\"/>\n",
"<text text-anchor=\"start\" x=\"129.0946\" y=\"-158.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"315.7364\" cy=\"-182\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"300.2364\" y=\"-178.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1 * 1</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=\"M232.9491,-190.0522C246.8938,-188.6959 263.574,-187.0735 278.2962,-185.6416\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"285.3455,-184.9559 278.6834,-188.7689 281.862,-185.2948 278.3784,-185.6337 278.3784,-185.6337 278.3784,-185.6337 281.862,-185.2948 278.0734,-182.4985 285.3455,-184.9559 285.3455,-184.9559\"/>\n",
"<text text-anchor=\"start\" x=\"255.6892\" y=\"-206.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"251.1892\" y=\"-191.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>2&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M228.588,-148.8651C244.8232,-155.0379 265.8742,-163.0418 283.2194,-169.6366\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"289.911,-172.1808 282.2485,-172.6374 286.6395,-170.9369 283.368,-169.693 283.368,-169.693 283.368,-169.693 286.6395,-170.9369 284.4875,-166.7487 289.911,-172.1808 289.911,-172.1808\"/>\n",
"<text text-anchor=\"start\" x=\"255.6892\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"315.7364\" cy=\"-117\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"300.2364\" y=\"-113.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2 * 1</text>\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=\"M225.7285,-126.8171C233.5889,-123.2705 242.5705,-119.8539 251.1892,-118 259.8348,-116.1403 269.2831,-115.332 278.2178,-115.1036\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"285.248,-115.0358 278.2787,-118.2533 281.7482,-115.0696 278.2483,-115.1034 278.2483,-115.1034 278.2483,-115.1034 281.7482,-115.0696 278.2179,-111.9536 285.248,-115.0358 285.248,-115.0358\"/>\n",
"<text text-anchor=\"middle\" x=\"259.1892\" y=\"-121.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>5</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"428.831\" cy=\"-171\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"413.331\" y=\"-167.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1 * 0</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>3&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M346.0437,-179.0522C359.9884,-177.6959 376.6686,-176.0735 391.3907,-174.6416\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"398.4401,-173.9559 391.778,-177.7689 394.9565,-174.2948 391.473,-174.6337 391.473,-174.6337 391.473,-174.6337 394.9565,-174.2948 391.168,-171.4985 398.4401,-173.9559 398.4401,-173.9559\"/>\n",
"<text text-anchor=\"start\" x=\"368.7837\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"364.2837\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;5 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>4&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M339.7209,-128.452C356.8142,-136.6137 379.9295,-147.6507 398.3337,-156.4382\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"404.8811,-159.5645 397.207,-159.3909 401.7227,-158.0564 398.5643,-156.5483 398.5643,-156.5483 398.5643,-156.5483 401.7227,-158.0564 399.9216,-153.7057 404.8811,-159.5645 404.8811,-159.5645\"/>\n",
"<text text-anchor=\"start\" x=\"368.7837\" y=\"-150.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>6</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"428.831\" cy=\"-106\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"413.331\" y=\"-102.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2 * 0</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;6 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>4&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M344.0891,-110.2301C350.6808,-108.9156 357.6972,-107.7229 364.2837,-107 372.9003,-106.0543 382.2021,-105.5887 390.9886,-105.3996\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"398.2217,-105.3012 391.2653,-108.5462 394.722,-105.3488 391.2224,-105.3965 391.2224,-105.3965 391.2224,-105.3965 394.722,-105.3488 391.1795,-102.2468 398.2217,-105.3012 398.2217,-105.3012\"/>\n",
"<text text-anchor=\"middle\" x=\"372.2837\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>7</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"648.0202\" cy=\"-120\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"632.5202\" y=\"-116.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1 * 4</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;7 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>5&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M457.4862,-164.3326C497.2784,-155.074 569.2352,-138.3314 612.4232,-128.2826\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"619.358,-126.669 613.254,-131.3235 615.9491,-127.4622 612.5401,-128.2554 612.5401,-128.2554 612.5401,-128.2554 615.9491,-127.4622 611.8262,-125.1874 619.358,-126.669 619.358,-126.669\"/>\n",
"<text text-anchor=\"start\" x=\"517.9256\" y=\"-171.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"526.9256\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;7 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>6&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M459.3083,-107.9466C498.7837,-110.468 567.5827,-114.8623 610.3068,-117.5912\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"617.4492,-118.0474 610.2626,-120.7447 613.9563,-117.8242 610.4634,-117.6011 610.4634,-117.6011 610.4634,-117.6011 613.9563,-117.8242 610.6643,-114.4575 617.4492,-118.0474 617.4492,-118.0474\"/>\n",
"<text text-anchor=\"start\" x=\"517.9256\" y=\"-118.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 8 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>8</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"534.9256\" cy=\"-18\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"519.4256\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2 * 4</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;8 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>6&#45;&gt;8</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M446.8285,-91.072C464.6161,-76.3181 491.9205,-53.6705 511.4141,-37.5016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"517.1939,-32.7075 513.8171,-39.601 514.5,-34.942 511.8061,-37.1765 511.8061,-37.1765 511.8061,-37.1765 514.5,-34.942 509.795,-34.752 517.1939,-32.7075 517.1939,-32.7075\"/>\n",
"<text text-anchor=\"start\" x=\"477.3783\" y=\"-68.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;7 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>7&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M638.097,-137.0373C636.0718,-146.8579 639.3796,-156 648.0202,-156 654.5007,-156 657.9814,-150.8576 658.4623,-144.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"657.9434,-137.0373 661.595,-143.7892 658.1984,-140.528 658.4533,-144.0187 658.4533,-144.0187 658.4533,-144.0187 658.1984,-140.528 655.3117,-144.2482 657.9434,-137.0373 657.9434,-137.0373\"/>\n",
"<text text-anchor=\"start\" x=\"644.5202\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"632.0202\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"648.0202\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 8&#45;&gt;7 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>8&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M551.9312,-33.2448C564.9572,-44.9307 583.3671,-61.4655 599.4729,-76 607.9809,-83.678 617.3114,-92.1275 625.4993,-99.5521\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"630.9612,-104.5063 623.66,-102.1365 628.3687,-102.1548 625.7763,-99.8033 625.7763,-99.8033 625.7763,-99.8033 628.3687,-102.1548 627.8927,-97.4702 630.9612,-104.5063 630.9612,-104.5063\"/>\n",
"<text text-anchor=\"start\" x=\"587.9729\" y=\"-94.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"<text text-anchor=\"start\" x=\"583.4729\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 8&#45;&gt;8 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>8&#45;&gt;8</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M525.6422,-35.4099C523.9092,-45.0879 527.0037,-54 534.9256,-54 540.7432,-54 543.9574,-49.1936 544.5682,-42.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"544.2091,-35.4099 547.6948,-42.2489 544.3788,-38.9058 544.5486,-42.4017 544.5486,-42.4017 544.5486,-42.4017 544.3788,-38.9058 541.4023,-42.5544 544.2091,-35.4099 544.2091,-35.4099\"/>\n",
"<text text-anchor=\"start\" x=\"530.4256\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"526.9256\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_product; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_product > *' at 0x7f6a44e7cf00> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"255pt\" height=\"165pt\"\n",
" viewBox=\"0.00 0.00 255.00 164.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 160.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-160.8 251,-160.8 251,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"100.5\" y=\"-126.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"#000000\" d=\"M1.1233,-62C4.178,-62 17.9448,-62 30.9241,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-62 30.9808,-65.1501 34.4807,-62 30.9807,-62.0001 30.9807,-62.0001 30.9807,-62.0001 34.4807,-62 30.9807,-58.8501 37.9807,-62 37.9807,-62\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"225\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"225\" cy=\"-62\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"225\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"#e31a1c\" stroke-width=\"2\" d=\"M73.4307,-67.3514C86.8358,-71.1754 105.8972,-75.9862 123,-78 139.3316,-79.923 143.6752,-79.9797 160,-78 172.3248,-76.5054 185.6823,-73.472 197.0644,-70.4443\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"203.8692,-68.5737 197.9546,-73.4666 200.6269,-69.9836 197.2521,-70.9113 197.1196,-70.4292 196.9871,-69.9471 200.3619,-69.0194 196.2846,-67.3919 203.8692,-68.5737 203.8692,-68.5737\"/>\n",
"<text text-anchor=\"start\" x=\"123\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"141.5\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"141.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"#000000\" d=\"M72.0819,-53.7239C85.3378,-46.9022 104.2894,-37.1493 119.0427,-29.557\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"125.4902,-26.239 120.7074,-32.243 122.3781,-27.8405 119.266,-29.4421 119.266,-29.4421 119.266,-29.4421 122.3781,-27.8405 117.8246,-26.6412 125.4902,-26.239 125.4902,-26.239\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-45.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M217.3173,-82.9908C216.3688,-93.0872 218.9297,-102 225,-102 229.5527,-102 232.1314,-96.9866 232.7361,-90.2204\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"232.6827,-82.9908 235.8844,-89.9673 233.2086,-86.487 233.2345,-89.9869 232.7345,-89.9906 232.2345,-89.9943 232.2086,-86.4944 229.5846,-90.0139 232.6827,-82.9908 232.6827,-82.9908\"/>\n",
"<text text-anchor=\"start\" x=\"221.5\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M157.5996,-26.4836C169.3289,-32.6643 185.468,-41.1688 199.0128,-48.3062\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"205.423,-51.684 197.7616,-51.2074 202.3265,-50.0523 199.2301,-48.4206 199.2301,-48.4206 199.2301,-48.4206 202.3265,-50.0523 200.6986,-45.6338 205.423,-51.684 205.423,-51.684\"/>\n",
"<text text-anchor=\"start\" x=\"178\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M134.4688,-34.6641C132.9063,-44.625 135.25,-54 141.5,-54 146.1875,-54 148.6777,-48.7266 148.9707,-41.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"148.5313,-34.6641 152.1006,-41.4598 148.7438,-38.1576 148.9564,-41.6511 148.9564,-41.6511 148.9564,-41.6511 148.7438,-38.1576 145.8122,-41.8425 148.5313,-34.6641 148.5313,-34.6641\"/>\n",
"<text text-anchor=\"middle\" x=\"141.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</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 0x7f6a44e7cf60> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"414pt\" height=\"125pt\"\n",
" viewBox=\"0.00 0.00 414.00 124.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 120.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-120.8 410,-120.8 410,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"180\" y=\"-86.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 3 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;3 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-22C4.178,-22 17.9448,-22 30.9241,-22\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-22 30.9808,-25.1501 34.4807,-22 30.9807,-22.0001 30.9807,-22.0001 30.9807,-22.0001 34.4807,-22 30.9807,-18.8501 37.9807,-22 37.9807,-22\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"137\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.3802,-22C85.4352,-22 99.6622,-22 111.7609,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"118.9716,-22 111.9716,-25.1501 115.4716,-22.5 111.9716,-22.5001 111.9716,-22.0001 111.9716,-21.5001 115.4716,-21.5 111.9716,-18.8501 118.9716,-22 118.9716,-22\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"299\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"299\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"384\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"384\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"384\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M317.0263,-22C327.9439,-22 342.13,-22 354.634,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"361.7644,-22 354.7645,-25.1501 358.2644,-22.5 354.7644,-22.5001 354.7644,-22.0001 354.7644,-21.5001 358.2644,-21.5 354.7644,-18.8501 361.7644,-22 361.7644,-22\"/>\n",
"<text text-anchor=\"start\" x=\"335\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M375.9937,-42.5808C374.8859,-52.8447 377.5547,-62 384,-62 388.834,-62 391.5437,-56.8502 392.129,-49.9451\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"392.0063,-42.5808 395.2726,-49.5273 392.5646,-46.072 392.623,-49.5715 392.123,-49.5798 391.6231,-49.5882 391.5647,-46.0887 388.9735,-49.6324 392.0063,-42.5808 392.0063,-42.5808\"/>\n",
"<text text-anchor=\"middle\" x=\"384\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"218\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"218\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M236.3802,-22C247.4352,-22 261.6622,-22 273.7609,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"280.9716,-22 273.9716,-25.1501 277.4716,-22.5 273.9716,-22.5001 273.9716,-22.0001 273.9716,-21.5001 277.4716,-21.5 273.9716,-18.8501 280.9716,-22 280.9716,-22\"/>\n",
"<text text-anchor=\"middle\" x=\"258.5\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M155.3802,-22C166.4352,-22 180.6622,-22 192.7609,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"199.9716,-22 192.9716,-25.1501 196.4716,-22.5 192.9716,-22.5001 192.9716,-22.0001 192.9716,-21.5001 196.4716,-21.5 192.9716,-18.8501 199.9716,-22 199.9716,-22\"/>\n",
"<text text-anchor=\"middle\" x=\"177.5\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</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 0x7f6a44e7cdb0> >"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"left2 = spot.translate('!b & FG a')\n",
"right2 = spot.translate('XXXb')\n",
"prod2 = spot.otf_product(left2, right2) # Note \"otf_product()\"\n",
"run2 = prod2.accepting_run()\n",
"run2.project(left2).highlight(5)\n",
"run2.project(right2, True).highlight(5)\n",
"display(run2, prod2, left2, right2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Highlighting nondeterminism\n",
"\n",
"Sometimes its is hard to locate non-deterministic states inside a large automaton. Here are two functions that can help for that."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"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=\"386pt\" height=\"276pt\"\n",
" viewBox=\"0.00 0.00 386.00 276.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 1) rotate(0) translate(4 272)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-272 382,-272 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-253.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 4 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;4 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-105C4.178,-105 17.9448,-105 30.9241,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-105 30.9808,-108.1501 34.4807,-105 30.9807,-105.0001 30.9807,-105.0001 30.9807,-105.0001 34.4807,-105 30.9807,-101.8501 37.9807,-105 37.9807,-105\"/>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"137\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.3802,-105C85.4352,-105 99.6622,-105 111.7609,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"118.9716,-105 111.9716,-108.1501 115.4716,-105 111.9716,-105.0001 111.9716,-105.0001 111.9716,-105.0001 115.4716,-105 111.9716,-101.8501 118.9716,-105 118.9716,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M129.9688,-121.6641C128.4063,-131.625 130.75,-141 137,-141 141.6875,-141 144.1777,-135.7266 144.4707,-128.8876\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"144.0313,-121.6641 147.6006,-128.4598 144.7429,-125.1272 144.9555,-128.6208 144.4564,-128.6511 143.9573,-128.6815 143.7448,-125.188 141.3122,-128.8425 144.0313,-121.6641 144.0313,-121.6641\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"360\" cy=\"-129\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-125.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M144.8384,-121.309C157.9792,-146.5059 187.0932,-193.9758 228,-213 273.4887,-234.1551 322.045,-181.0667 345.5673,-149.848\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"349.9296,-143.9244 348.3152,-151.4288 347.8542,-146.7426 345.7787,-149.5609 345.7787,-149.5609 345.7787,-149.5609 347.8542,-146.7426 343.2423,-147.693 349.9296,-143.9244 349.9296,-143.9244\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-220.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M155.412,-105C173.9217,-105 202.5942,-105 223.2267,-105\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"230.4306,-105 223.4307,-108.1501 226.9307,-105.5 223.4307,-105.5001 223.4306,-105.0001 223.4306,-104.5001 226.9306,-104.5 223.4306,-101.8501 230.4306,-105 230.4306,-105\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M151.5767,-93.6263C171.301,-78.236 206.5611,-50.7236 228.6783,-33.4662\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"234.2723,-29.1014 230.6912,-35.8911 231.8205,-31.6487 229.0611,-33.8018 228.7535,-33.4076 228.4459,-33.0134 231.2053,-30.8603 226.8157,-30.9242 234.2723,-29.1014 234.2723,-29.1014\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M355.1797,-146.4099C354.28,-156.0879 355.8867,-165 360,-165 363.0207,-165 364.6896,-160.1936 365.0067,-153.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"364.8203,-146.4099 368.1457,-153.3283 364.9085,-149.9088 364.9967,-153.4077 364.9967,-153.4077 364.9967,-153.4077 364.9085,-149.9088 361.8477,-153.4871 364.8203,-146.4099 364.8203,-146.4099\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-183.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.7325,-145.5959C347.2416,-166.8633 349.6641,-195 360,-195 369.2458,-195 372.1594,-172.4854 368.7408,-152.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2675,-145.5959 371.8066,-151.7861 367.9966,-149.0191 368.7257,-152.4423 368.7257,-152.4423 368.7257,-152.4423 367.9966,-149.0191 365.6448,-153.0985 367.2675,-145.5959 367.2675,-145.5959\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M243.5012,-122.4099C242.5681,-132.0879 244.2344,-141 248.5,-141 251.6326,-141 253.3633,-136.1936 253.6921,-129.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"253.4988,-122.4099 256.8307,-129.3252 253.5903,-125.9087 253.6818,-129.4075 253.6818,-129.4075 253.6818,-129.4075 253.5903,-125.9087 250.5329,-129.4899 253.4988,-122.4099 253.4988,-122.4099\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M240.9634,-121.5959C235.269,-142.8633 237.7813,-171 248.5,-171 258.0883,-171 261.1098,-148.4854 257.5645,-128.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.0366,-121.5959 260.6223,-127.7517 256.7915,-125.0135 257.5464,-128.4311 257.5464,-128.4311 257.5464,-128.4311 256.7915,-125.0135 254.4706,-129.1106 256.0366,-121.5959 256.0366,-121.5959\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-174.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M261.2905,-30.7331C281.0962,-50.4501 319.2564,-88.4391 341.8888,-110.9701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"347.0153,-116.0735 339.832,-113.3672 344.5348,-113.6042 342.0544,-111.1348 342.0544,-111.1348 342.0544,-111.1348 344.5348,-113.6042 344.2768,-108.9024 347.0153,-116.0735 347.0153,-116.0735\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-96.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M238.9254,-33.5414C236.2303,-43.9087 239.4219,-54 248.5,-54 255.4504,-54 258.9503,-48.0847 258.9995,-40.6591\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"258.0746,-33.5414 262.1004,-40.0771 258.5256,-37.0123 258.9767,-40.4831 258.9767,-40.4831 258.9767,-40.4831 258.5256,-37.0123 255.853,-40.889 258.0746,-33.5414 258.0746,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</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 0x7f6a44e7cea0> >"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"b = spot.translate('X (F(Ga <-> b) & GF!b)')\n",
"spot.highlight_nondet_states(b, 5)\n",
"spot.highlight_nondet_edges(b, 4)\n",
"b"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Disappearing highlights\n",
"\n",
"As explained at the top of this notebook, named properties (such as highlights) are fragile, and you should not really on them being preserved across algorithms. In-place algorithm are probably the worst, because they might modify the automaton and ignore the attached named properties. \n",
"\n",
"`randomize()` is one such in-place algorithm: it reorder states or transitions of the automaton. By doing so it renumber the states and edges, and that process would completely invalidate the highlights information. Fortunately `randomize()` know about highlights: it will preserve highlighted states, but it will drop all highlighted edges."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"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=\"386pt\" height=\"299pt\"\n",
" viewBox=\"0.00 0.00 386.00 299.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 1) rotate(0) translate(4 295)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-295 382,-295 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-262.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 3 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;3 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-105C4.178,-105 17.9448,-105 30.9241,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-105 30.9808,-108.1501 34.4807,-105 30.9807,-105.0001 30.9807,-105.0001 30.9807,-105.0001 34.4807,-105 30.9807,-101.8501 37.9807,-105 37.9807,-105\"/>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"137\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>3&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.3802,-105C85.4352,-105 99.6622,-105 111.7609,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"118.9716,-105 111.9716,-108.1501 115.4716,-105 111.9716,-105.0001 111.9716,-105.0001 111.9716,-105.0001 115.4716,-105 111.9716,-101.8501 118.9716,-105 118.9716,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-156\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-152.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M243.5012,-173.4099C242.5681,-183.0879 244.2344,-192 248.5,-192 251.6326,-192 253.3633,-187.1936 253.6921,-180.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"253.4988,-173.4099 256.8307,-180.3252 253.5903,-176.9087 253.6818,-180.4075 253.6818,-180.4075 253.6818,-180.4075 253.5903,-176.9087 250.5329,-180.4899 253.4988,-173.4099 253.4988,-173.4099\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-210.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M240.9634,-172.5959C235.269,-193.8633 237.7813,-222 248.5,-222 258.0883,-222 261.1098,-199.4854 257.5645,-179.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.0366,-172.5959 260.6223,-178.7517 256.7915,-176.0135 257.5464,-179.4311 257.5464,-179.4311 257.5464,-179.4311 256.7915,-176.0135 254.4706,-180.1106 256.0366,-172.5959 256.0366,-172.5959\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"360\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M355.1797,-79.4099C354.28,-89.0879 355.8867,-98 360,-98 363.0207,-98 364.6896,-93.1936 365.0067,-86.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"364.8203,-79.4099 368.1457,-86.3283 364.9085,-82.9088 364.9967,-86.4077 364.9967,-86.4077 364.9967,-86.4077 364.9085,-82.9088 361.8477,-86.4871 364.8203,-79.4099 364.8203,-79.4099\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-116.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.7325,-78.5959C347.2416,-99.8633 349.6641,-128 360,-128 369.2458,-128 372.1594,-105.4854 368.7408,-85.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2675,-78.5959 371.8066,-84.7861 367.9966,-82.0191 368.7257,-85.4423 368.7257,-85.4423 368.7257,-85.4423 367.9966,-82.0191 365.6448,-86.0985 367.2675,-78.5959 367.2675,-78.5959\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-131.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M265.4345,-24.6827C284.3448,-32.1451 315.0839,-44.2752 336.3584,-52.6706\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"342.9062,-55.2545 335.2385,-55.615 339.6505,-53.9697 336.3948,-52.6849 336.3948,-52.6849 336.3948,-52.6849 339.6505,-53.9697 337.5511,-49.7548 342.9062,-55.2545 342.9062,-55.2545\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M238.9254,-33.5414C236.2303,-43.9087 239.4219,-54 248.5,-54 255.4504,-54 258.9503,-48.0847 258.9995,-40.6591\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"258.0746,-33.5414 262.1004,-40.0771 258.5256,-37.0123 258.9767,-40.4831 258.9767,-40.4831 258.9767,-40.4831 258.5256,-37.0123 255.853,-40.889 258.0746,-33.5414 258.0746,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M153.4522,-112.5252C172.4744,-121.226 203.9159,-135.6073 225.3876,-145.4284\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"231.9803,-148.4439 224.3043,-148.3967 228.7974,-146.988 225.6146,-145.5322 225.6146,-145.5322 225.6146,-145.5322 228.7974,-146.988 226.9249,-142.6676 231.9803,-148.4439 231.9803,-148.4439\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-141.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;1 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>4&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M154.7028,-101.6126C169.4872,-98.7818 191.119,-94.6357 210,-91 253.9395,-82.5392 305.1085,-72.6356 334.8967,-66.8652\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"341.9919,-65.4906 335.7188,-69.9146 338.5558,-66.1563 335.1197,-66.8221 335.1197,-66.8221 335.1197,-66.8221 338.5558,-66.1563 334.5205,-63.7296 341.9919,-65.4906 341.9919,-65.4906\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>4&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M150.959,-93.6315C157.6056,-88.2503 165.6831,-81.7563 173,-76 191.5787,-61.3839 212.9624,-44.997 228.2187,-33.3794\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"233.9495,-29.0204 230.2851,-35.7654 231.1638,-31.1393 228.3781,-33.2583 228.3781,-33.2583 228.3781,-33.2583 231.1638,-31.1393 226.471,-30.7511 233.9495,-29.0204 233.9495,-29.0204\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M129.9688,-121.6641C128.4063,-131.625 130.75,-141 137,-141 141.6875,-141 144.1777,-135.7266 144.4707,-128.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"144.0313,-121.6641 147.6006,-128.4598 144.2438,-125.1576 144.4564,-128.6511 144.4564,-128.6511 144.4564,-128.6511 144.2438,-125.1576 141.3122,-128.8425 144.0313,-121.6641 144.0313,-121.6641\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b</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 0x7f6a44e7cea0> >"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.randomize(b); b"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Highlighting with partial output\n",
"\n",
"For simplicity, rendering of partial automata is actually implemented by copying the original automaton and marking some states as \"incomplete\". This also allows the same display code to work with automata generated on-the-fly. However since there is a copy, propagating the highlighting information requires extra work. Let's make sure it has been done:"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"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=\"386pt\" height=\"299pt\"\n",
" viewBox=\"0.00 0.00 386.00 299.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 1) rotate(0) translate(4 295)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-295 382,-295 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-262.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 3 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;3 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-105C4.178,-105 17.9448,-105 30.9241,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-105 30.9808,-108.1501 34.4807,-105 30.9807,-105.0001 30.9807,-105.0001 30.9807,-105.0001 34.4807,-105 30.9807,-101.8501 37.9807,-105 37.9807,-105\"/>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"137\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>3&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.3802,-105C85.4352,-105 99.6622,-105 111.7609,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"118.9716,-105 111.9716,-108.1501 115.4716,-105 111.9716,-105.0001 111.9716,-105.0001 111.9716,-105.0001 115.4716,-105 111.9716,-101.8501 118.9716,-105 118.9716,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-156\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-152.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M243.5012,-173.4099C242.5681,-183.0879 244.2344,-192 248.5,-192 251.6326,-192 253.3633,-187.1936 253.6921,-180.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"253.4988,-173.4099 256.8307,-180.3252 253.5903,-176.9087 253.6818,-180.4075 253.6818,-180.4075 253.6818,-180.4075 253.5903,-176.9087 250.5329,-180.4899 253.4988,-173.4099 253.4988,-173.4099\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-210.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M240.9634,-172.5959C235.269,-193.8633 237.7813,-222 248.5,-222 258.0883,-222 261.1098,-199.4854 257.5645,-179.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.0366,-172.5959 260.6223,-178.7517 256.7915,-176.0135 257.5464,-179.4311 257.5464,-179.4311 257.5464,-179.4311 256.7915,-176.0135 254.4706,-180.1106 256.0366,-172.5959 256.0366,-172.5959\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"360\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M355.1797,-79.4099C354.28,-89.0879 355.8867,-98 360,-98 363.0207,-98 364.6896,-93.1936 365.0067,-86.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"364.8203,-79.4099 368.1457,-86.3283 364.9085,-82.9088 364.9967,-86.4077 364.9967,-86.4077 364.9967,-86.4077 364.9085,-82.9088 361.8477,-86.4871 364.8203,-79.4099 364.8203,-79.4099\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-116.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.7325,-78.5959C347.2416,-99.8633 349.6641,-128 360,-128 369.2458,-128 372.1594,-105.4854 368.7408,-85.5132\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2675,-78.5959 371.8066,-84.7861 367.9966,-82.0191 368.7257,-85.4423 368.7257,-85.4423 368.7257,-85.4423 367.9966,-82.0191 365.6448,-86.0985 367.2675,-78.5959 367.2675,-78.5959\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-131.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"248.5\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M265.4345,-24.6827C284.3448,-32.1451 315.0839,-44.2752 336.3584,-52.6706\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"342.9062,-55.2545 335.2385,-55.615 339.6505,-53.9697 336.3948,-52.6849 336.3948,-52.6849 336.3948,-52.6849 339.6505,-53.9697 337.5511,-49.7548 342.9062,-55.2545 342.9062,-55.2545\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M238.9254,-33.5414C236.2303,-43.9087 239.4219,-54 248.5,-54 255.4504,-54 258.9503,-48.0847 258.9995,-40.6591\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"258.0746,-33.5414 262.1004,-40.0771 258.5256,-37.0123 258.9767,-40.4831 258.9767,-40.4831 258.9767,-40.4831 258.5256,-37.0123 255.853,-40.889 258.0746,-33.5414 258.0746,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M153.4522,-112.5252C172.4744,-121.226 203.9159,-135.6073 225.3876,-145.4284\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"231.9803,-148.4439 224.3043,-148.3967 228.5895,-147.4427 225.4066,-145.9869 225.6146,-145.5322 225.8226,-145.0775 229.0054,-146.5333 226.9249,-142.6676 231.9803,-148.4439 231.9803,-148.4439\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-141.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;1 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>4&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M154.7028,-101.6126C169.4872,-98.7818 191.119,-94.6357 210,-91 253.9395,-82.5392 305.1085,-72.6356 334.8967,-66.8652\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"341.9919,-65.4906 335.7188,-69.9146 338.5558,-66.1563 335.1197,-66.8221 335.1197,-66.8221 335.1197,-66.8221 338.5558,-66.1563 334.5205,-63.7296 341.9919,-65.4906 341.9919,-65.4906\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>4&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M150.959,-93.6315C157.6056,-88.2503 165.6831,-81.7563 173,-76 191.5787,-61.3839 212.9624,-44.997 228.2187,-33.3794\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"233.9495,-29.0204 230.2851,-35.7654 231.4665,-31.5373 228.6808,-33.6562 228.3781,-33.2583 228.0754,-32.8603 230.8611,-30.7414 226.471,-30.7511 233.9495,-29.0204 233.9495,-29.0204\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M129.9688,-121.6641C128.4063,-131.625 130.75,-141 137,-141 141.6875,-141 144.1777,-135.7266 144.4707,-128.8876\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"144.0313,-121.6641 147.6006,-128.4598 144.7429,-125.1272 144.9555,-128.6208 144.4564,-128.6511 143.9573,-128.6815 143.7448,-125.188 141.3122,-128.8425 144.0313,-121.6641 144.0313,-121.6641\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b</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 0x7f6a44e7cea0> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/svg+xml": [
"<svg height=\"206pt\" viewBox=\"0.00 0.00 386.00 205.50\" width=\"386pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 201.5)\">\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-201.5 382,-201.5 382,4 -4,4\" stroke=\"transparent\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"168\" y=\"-183.3\">Inf(</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190\" y=\"-183.3\">⓿</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"206\" y=\"-183.3\">)</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"166\" y=\"-169.3\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-105\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"51.5\" y=\"-101.3\">3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>I-&gt;0</title>\n",
"<path d=\"M1.1233,-105C4.178,-105 17.9448,-105 30.9241,-105\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"37.9807,-105 30.9808,-108.1501 34.4807,-105 30.9807,-105.0001 30.9807,-105.0001 30.9807,-105.0001 34.4807,-105 30.9807,-101.8501 37.9807,-105 37.9807,-105\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>1</title>\n",
"<ellipse cx=\"137\" cy=\"-105\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"132.5\" y=\"-101.3\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>0-&gt;1</title>\n",
"<path d=\"M74.3802,-105C85.4352,-105 99.6622,-105 111.7609,-105\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"118.9716,-105 111.9716,-108.1501 115.4716,-105 111.9716,-105.0001 111.9716,-105.0001 111.9716,-105.0001 115.4716,-105 111.9716,-101.8501 118.9716,-105 118.9716,-105\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge5\">\n",
"<title>1-&gt;1</title>\n",
"<path d=\"M129.9688,-121.6641C128.4063,-131.625 130.75,-141 137,-141 141.6875,-141 144.1777,-135.7266 144.4707,-128.8876\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"144.0313,-121.6641 147.6006,-128.4598 144.7429,-125.1272 144.9555,-128.6208 144.4564,-128.6511 143.9573,-128.6815 143.7448,-125.188 141.3122,-128.8425 144.0313,-121.6641 144.0313,-121.6641\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"123.5\" y=\"-144.8\">a | b</text>\n",
"</g>\n",
"<!-- u1 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>u1</title>\n",
"<polygon fill=\"#ffffaa\" points=\"261.5,-161.5 235.5,-161.5 235.5,-138.5 261.5,-138.5 261.5,-161.5\" stroke=\"transparent\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"248.5\" y=\"-146.3\">...</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;u1 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>1-&gt;u1</title>\n",
"<path d=\"M153.9345,-111.8345C173.9671,-119.9195 207.2741,-133.3617 228.5417,-141.9451\" fill=\"none\" stroke=\"#000000\" stroke-dasharray=\"5,2\"/>\n",
"<polygon fill=\"#000000\" points=\"235.2561,-144.6549 227.5859,-144.9562 232.0105,-143.345 228.7648,-142.0351 228.7648,-142.0351 228.7648,-142.0351 232.0105,-143.345 229.9438,-139.114 235.2561,-144.6549 235.2561,-144.6549\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node5\">\n",
"<title>2</title>\n",
"<ellipse cx=\"360\" cy=\"-62\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"360\" y=\"-58.3\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>1-&gt;2</title>\n",
"<path d=\"M154.7028,-101.6126C169.4872,-98.7818 191.119,-94.6357 210,-91 253.9395,-82.5392 305.1085,-72.6356 334.8967,-66.8652\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"341.9919,-65.4906 335.7188,-69.9146 338.5558,-66.1563 335.1197,-66.8221 335.1197,-66.8221 335.1197,-66.8221 338.5558,-66.1563 334.5205,-63.7296 341.9919,-65.4906 341.9919,-65.4906\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-90.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node6\">\n",
"<title>3</title>\n",
"<ellipse cx=\"248.5\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"248.5\" y=\"-14.3\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge6\">\n",
"<title>1-&gt;3</title>\n",
"<path d=\"M150.959,-93.6315C157.6056,-88.2503 165.6831,-81.7563 173,-76 191.5787,-61.3839 212.9624,-44.997 228.2187,-33.3794\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"233.9495,-29.0204 230.2851,-35.7654 231.4665,-31.5373 228.6808,-33.6562 228.3781,-33.2583 228.0754,-32.8603 230.8611,-30.7414 226.471,-30.7511 233.9495,-29.0204 233.9495,-29.0204\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"173\" y=\"-79.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge7\">\n",
"<title>2-&gt;2</title>\n",
"<path d=\"M355.1797,-79.4099C354.28,-89.0879 355.8867,-98 360,-98 363.0207,-98 364.6896,-93.1936 365.0067,-86.8073\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"364.8203,-79.4099 368.1457,-86.3283 364.9085,-82.9088 364.9967,-86.4077 364.9967,-86.4077 364.9967,-86.4077 364.9085,-82.9088 361.8477,-86.4871 364.8203,-79.4099 364.8203,-79.4099\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"353.5\" y=\"-116.8\">!b</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"352\" y=\"-101.8\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge8\">\n",
"<title>2-&gt;2</title>\n",
"<path d=\"M352.7325,-78.5959C347.2416,-99.8633 349.6641,-128 360,-128 369.2458,-128 372.1594,-105.4854 368.7408,-85.5132\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"367.2675,-78.5959 371.8066,-84.7861 367.9966,-82.0191 368.7257,-85.4423 368.7257,-85.4423 368.7257,-85.4423 367.9966,-82.0191 365.6448,-86.0985 367.2675,-78.5959 367.2675,-78.5959\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"355.5\" y=\"-131.8\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge9\">\n",
"<title>3-&gt;2</title>\n",
"<path d=\"M265.4345,-24.6827C284.3448,-32.1451 315.0839,-44.2752 336.3584,-52.6706\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"342.9062,-55.2545 335.2385,-55.615 339.6505,-53.9697 336.3948,-52.6849 336.3948,-52.6849 336.3948,-52.6849 339.6505,-53.9697 337.5511,-49.7548 342.9062,-55.2545 342.9062,-55.2545\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"287\" y=\"-50.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge10\">\n",
"<title>3-&gt;3</title>\n",
"<path d=\"M238.9254,-33.5414C236.2303,-43.9087 239.4219,-54 248.5,-54 255.4504,-54 258.9503,-48.0847 258.9995,-40.6591\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"258.0746,-33.5414 262.1004,-40.0771 258.5256,-37.0123 258.9767,-40.4831 258.9767,-40.4831 258.9767,-40.4831 258.5256,-37.0123 255.853,-40.889 258.0746,-33.5414 258.0746,-33.5414\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"231.5\" y=\"-57.8\">a &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/svg+xml": [
"<svg height=\"113pt\" viewBox=\"0.00 0.00 226.00 113.00\" width=\"226pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 109)\">\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-109 222,-109 222,4 -4,4\" stroke=\"transparent\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"88\" y=\"-90.8\">Inf(</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"110\" y=\"-90.8\">⓿</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"126\" y=\"-90.8\">)</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"86\" y=\"-76.8\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"51.5\" y=\"-14.3\">3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>I-&gt;0</title>\n",
"<path d=\"M1.1233,-18C4.178,-18 17.9448,-18 30.9241,-18\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"37.9807,-18 30.9808,-21.1501 34.4807,-18 30.9807,-18.0001 30.9807,-18.0001 30.9807,-18.0001 34.4807,-18 30.9807,-14.8501 37.9807,-18 37.9807,-18\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>1</title>\n",
"<ellipse cx=\"137\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"132.5\" y=\"-14.3\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>0-&gt;1</title>\n",
"<path d=\"M74.3802,-18C85.4352,-18 99.6622,-18 111.7609,-18\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"118.9716,-18 111.9716,-21.1501 115.4716,-18 111.9716,-18.0001 111.9716,-18.0001 111.9716,-18.0001 115.4716,-18 111.9716,-14.8501 118.9716,-18 118.9716,-18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"96.5\" y=\"-21.8\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>1-&gt;1</title>\n",
"<path d=\"M130.6208,-35.0373C129.3189,-44.8579 131.4453,-54 137,-54 141.166,-54 143.4036,-48.8576 143.7128,-42.1433\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"143.3792,-35.0373 146.8541,-41.8818 144.0428,-38.51 144.207,-42.0062 143.7076,-42.0296 143.2081,-42.0531 143.0439,-38.5569 140.561,-42.1774 143.3792,-35.0373 143.3792,-35.0373\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"123.5\" y=\"-57.8\">a | b</text>\n",
"</g>\n",
"<!-- u1 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>u1</title>\n",
"<polygon fill=\"#ffffaa\" points=\"218,-29.5 192,-29.5 192,-6.5 218,-6.5 218,-29.5\" stroke=\"transparent\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"205\" y=\"-14.3\">...</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;u1 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>1-&gt;u1</title>\n",
"<path d=\"M155.2228,-18C164.2871,-18 175.2737,-18 184.6169,-18\" fill=\"none\" stroke=\"#000000\" stroke-dasharray=\"5,2\"/>\n",
"<polygon fill=\"#000000\" points=\"191.6896,-18 184.6896,-21.1501 188.1896,-18 184.6896,-18.0001 184.6896,-18.0001 184.6896,-18.0001 188.1896,-18 184.6895,-14.8501 191.6896,-18 191.6896,-18\" stroke=\"#000000\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"spot.highlight_nondet_edges(b, 4) # let's get those highlighted edges back\n",
"display(b, b.show('.<4'), b.show('.<2'))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Highlighting languages\n",
"\n",
"For deterministic automata, the function `spot.highlight_languages()` can be used to highlight states that recognize the same language. This can be a great help in reading automata. States with a colored border share their language, and states with a black border all have a language different from all other states."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg height=\"329pt\" viewBox=\"0.00 0.00 734.00 328.98\" width=\"734pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(.8266 .8266) rotate(0) translate(4 394)\">\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-394 884,-394 884,4 -4,4\" stroke=\"transparent\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"419\" y=\"-375.8\">Inf(</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"441\" y=\"-375.8\">⓿</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"457\" y=\"-375.8\">)</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"417\" y=\"-361.8\">[Büchi]</text>\n",
"<g class=\"cluster\" id=\"clust1\">\n",
"<title>cluster_0</title>\n",
"<polygon fill=\"none\" points=\"543,-144 543,-346 872,-346 872,-144 543,-144\" stroke=\"#00ff00\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust2\">\n",
"<title>cluster_1</title>\n",
"<polygon fill=\"none\" points=\"464,-149 464,-201 516,-201 516,-149 464,-149\" stroke=\"#000000\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust3\">\n",
"<title>cluster_2</title>\n",
"<polygon fill=\"none\" points=\"139,-191 139,-306 403,-306 403,-191 139,-191\" stroke=\"#00ff00\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust4\">\n",
"<title>cluster_3</title>\n",
"<polygon fill=\"none\" points=\"139,-8 139,-108 191,-108 191,-8 139,-8\" stroke=\"#00ff00\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust5\">\n",
"<title>cluster_4</title>\n",
"<polygon fill=\"none\" points=\"30,-102 30,-154 82,-154 82,-102 30,-102\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-128\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-124.3\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>I-&gt;0</title>\n",
"<path d=\"M1.1233,-128C4.178,-128 17.9448,-128 30.9241,-128\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"37.9807,-128 30.9808,-131.1501 34.4807,-128 30.9807,-128.0001 30.9807,-128.0001 30.9807,-128.0001 34.4807,-128 30.9807,-124.8501 37.9807,-128 37.9807,-128\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node6\">\n",
"<title>1</title>\n",
"<ellipse cx=\"490\" cy=\"-175\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"490\" y=\"-171.3\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>0-&gt;1</title>\n",
"<path d=\"M74.1292,-128C95.7601,-128 133.0191,-128 165,-128 165,-128 165,-128 377,-128 411.229,-128 447.1265,-146.6121 469.0379,-160.4116\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"475.1027,-164.335 467.5143,-163.1777 472.164,-162.4339 469.2253,-160.5328 469.2253,-160.5328 469.2253,-160.5328 472.164,-162.4339 470.9362,-157.888 475.1027,-164.335 475.1027,-164.335\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"230.5\" y=\"-131.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node7\">\n",
"<title>2</title>\n",
"<ellipse cx=\"165\" cy=\"-217\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#1f78b4\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"165\" y=\"-213.3\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>0-&gt;2</title>\n",
"<path d=\"M70.2498,-139.6352C89.426,-155.2928 123.6231,-183.2152 145.2652,-200.8863\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"150.7467,-205.3619 143.3322,-203.3746 148.0356,-203.1483 145.3245,-200.9347 145.3245,-200.9347 145.3245,-200.9347 148.0356,-203.1483 147.3168,-198.4947 150.7467,-205.3619 150.7467,-205.3619\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-188.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node9\">\n",
"<title>3</title>\n",
"<ellipse cx=\"165\" cy=\"-34\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"165\" y=\"-30.3\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>0-&gt;3</title>\n",
"<path d=\"M69.8049,-116.0948C89.0516,-99.4968 124.0302,-69.3318 145.8063,-50.5524\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"151.3072,-45.8085 148.0633,-52.7656 148.6566,-48.0943 146.0061,-50.3801 146.0061,-50.3801 146.0061,-50.3801 148.6566,-48.0943 143.9489,-47.9946 151.3072,-45.8085 151.3072,-45.8085\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"107\" y=\"-97.8\">a</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>4</title>\n",
"<ellipse cx=\"569\" cy=\"-234\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#ff4da0\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"569\" y=\"-230.3\">4</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>6</title>\n",
"<ellipse cx=\"695\" cy=\"-221\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#ff4da0\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"695\" y=\"-217.3\">6</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge11\">\n",
"<title>4-&gt;6</title>\n",
"<path d=\"M586.6825,-229.1951C597.3921,-226.5227 611.3779,-223.4509 624,-222 639.0867,-220.2658 656.0943,-219.969 669.6807,-220.1279\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"676.8429,-220.2568 669.7873,-223.2802 673.3434,-220.1937 669.844,-220.1307 669.844,-220.1307 669.844,-220.1307 673.3434,-220.1937 669.9007,-216.9812 676.8429,-220.2568 676.8429,-220.2568\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"626.5\" y=\"-225.8\">!c</text>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g class=\"node\" id=\"node5\">\n",
"<title>7</title>\n",
"<ellipse cx=\"846\" cy=\"-240\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#ff4da0\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"846\" y=\"-236.3\">7</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge12\">\n",
"<title>4-&gt;7</title>\n",
"<path d=\"M576.4064,-217.5184C586.186,-198.5557 605.339,-170 632,-170 632,-170 632,-170 770.5,-170 799.0099,-170 821.302,-197.1731 834.057,-217.6591\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"837.7056,-223.7646 831.4108,-219.3717 835.9102,-220.7602 834.1147,-217.7558 834.1147,-217.7558 834.1147,-217.7558 835.9102,-220.7602 836.8187,-216.1399 837.7056,-223.7646 837.7056,-223.7646\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"691.5\" y=\"-173.8\">c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge16\">\n",
"<title>6-&gt;4</title>\n",
"<path d=\"M677.9355,-227.3217C667.2121,-230.9521 652.9954,-235.1481 640,-237 624.8508,-239.1588 607.7148,-238.5215 594.0732,-237.2908\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"586.8888,-236.56 594.1717,-234.1346 590.3708,-236.9142 593.8529,-237.2685 593.8529,-237.2685 593.8529,-237.2685 590.3708,-236.9142 593.5341,-240.4023 586.8888,-236.56 586.8888,-236.56\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"625.5\" y=\"-256.8\">!b</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"624\" y=\"-241.8\">⓿</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge17\">\n",
"<title>6-&gt;6</title>\n",
"<path d=\"M688.6208,-238.0373C687.3189,-247.8579 689.4453,-257 695,-257 699.166,-257 701.4036,-251.8576 701.7128,-245.1433\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"701.3792,-238.0373 704.8541,-244.8818 701.5434,-241.5335 701.7076,-245.0296 701.7076,-245.0296 701.7076,-245.0296 701.5434,-241.5335 698.561,-245.1774 701.3792,-238.0373 701.3792,-238.0373\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"676.5\" y=\"-260.8\">b &amp; !c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge18\">\n",
"<title>6-&gt;7</title>\n",
"<path d=\"M713.1301,-221.5548C732.4942,-222.326 764.0424,-224.0965 791,-228 801.02,-229.4509 811.9369,-231.6926 821.384,-233.8474\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"828.2826,-235.4638 820.7486,-236.9338 824.8749,-234.6653 821.4672,-233.8669 821.4672,-233.8669 821.4672,-233.8669 824.8749,-234.6653 822.1858,-230.7999 828.2826,-235.4638 828.2826,-235.4638\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"753.5\" y=\"-231.8\">b &amp; c</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge19\">\n",
"<title>7-&gt;4</title>\n",
"<path d=\"M837.3792,-256.1151C825.3165,-276.2236 801.3706,-308 770.5,-308 632,-308 632,-308 632,-308 605.0884,-308 587.2554,-279.2741 577.6349,-257.6175\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"574.912,-251.1631 580.5352,-256.3882 576.2724,-254.3879 577.6329,-257.6126 577.6329,-257.6126 577.6329,-257.6126 576.2724,-254.3879 574.7306,-258.8371 574.912,-251.1631 574.912,-251.1631\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"690.5\" y=\"-326.8\">b</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"687\" y=\"-311.8\">⓿</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge20\">\n",
"<title>7-&gt;6</title>\n",
"<path d=\"M828.1204,-242.8876C808.6992,-245.4858 776.8532,-248.1715 750,-243 739.0051,-240.8826 727.4143,-236.587 717.7231,-232.3489\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"711.3479,-229.4515 719.024,-229.4801 714.5343,-230.8997 717.7206,-232.3479 717.7206,-232.3479 717.7206,-232.3479 714.5343,-230.8997 716.4173,-235.2156 711.3479,-229.4515 711.3479,-229.4515\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"750\" y=\"-248.8\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge21\">\n",
"<title>7-&gt;7</title>\n",
"<path d=\"M839.6208,-257.0373C838.3189,-266.8579 840.4453,-276 846,-276 850.166,-276 852.4036,-270.8576 852.7128,-264.1433\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"852.3792,-257.0373 855.8541,-263.8818 852.5434,-260.5335 852.7076,-264.0296 852.7076,-264.0296 852.7076,-264.0296 852.5434,-260.5335 849.561,-264.1774 852.3792,-257.0373 852.3792,-257.0373\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"827.5\" y=\"-279.8\">!b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge5\">\n",
"<title>1-&gt;4</title>\n",
"<path d=\"M505.306,-185.3002C513.6004,-190.9762 523.9712,-198.2264 533,-205 538.4689,-209.1029 544.2844,-213.6864 549.6103,-217.9764\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"555.1578,-222.4796 547.7377,-220.5134 552.4404,-220.2737 549.723,-218.0678 549.723,-218.0678 549.723,-218.0678 552.4404,-220.2737 551.7083,-215.6221 555.1578,-222.4796 555.1578,-222.4796\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"526\" y=\"-208.8\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge8\">\n",
"<title>2-&gt;4</title>\n",
"<path d=\"M169.9131,-234.5127C179.7482,-265.3245 204.9605,-326 251,-326 251,-326 251,-326 490,-326 525.9049,-326 549.032,-285.1685 560.4711,-257.9093\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"563.1282,-251.3045 563.438,-258.9744 561.8219,-254.5516 560.5156,-257.7987 560.5156,-257.7987 560.5156,-257.7987 561.8219,-254.5516 557.5932,-256.623 563.1282,-251.3045 563.1282,-251.3045\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"373.5\" y=\"-329.8\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge6\">\n",
"<title>2-&gt;1</title>\n",
"<path d=\"M182.9363,-214.6821C237.5383,-207.6258 401.836,-186.3935 464.9394,-178.2386\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"472.1191,-177.3108 465.5806,-181.332 468.648,-177.7594 465.1768,-178.208 465.1768,-178.208 465.1768,-178.208 468.648,-177.7594 464.7731,-175.084 472.1191,-177.3108 472.1191,-177.3108\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-202.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge7\">\n",
"<title>2-&gt;2</title>\n",
"<path d=\"M158.6208,-234.0373C157.3189,-243.8579 159.4453,-253 165,-253 169.166,-253 171.4036,-247.8576 171.7128,-241.1433\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"171.3792,-234.0373 174.8541,-240.8818 171.5434,-237.5335 171.7076,-241.0296 171.7076,-241.0296 171.7076,-241.0296 171.5434,-237.5335 168.561,-241.1774 171.3792,-234.0373 171.3792,-234.0373\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"132\" y=\"-256.8\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node8\">\n",
"<title>5</title>\n",
"<ellipse cx=\"377\" cy=\"-226\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#1f78b4\" stroke-width=\"2\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"377\" y=\"-222.3\">5</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge9\">\n",
"<title>2-&gt;5</title>\n",
"<path d=\"M183.075,-217.7673C220.9374,-219.3747 308.6456,-223.0982 351.924,-224.9355\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"358.9707,-225.2346 351.8434,-228.0848 355.4739,-225.0861 351.977,-224.9376 351.977,-224.9376 351.977,-224.9376 355.4739,-225.0861 352.1107,-221.7904 358.9707,-225.2346 358.9707,-225.2346\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"220\" y=\"-224.8\">!a &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge15\">\n",
"<title>5-&gt;4</title>\n",
"<path d=\"M395.0629,-226.7526C429.3694,-228.1821 504.0395,-231.2933 543.4547,-232.9356\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"550.8452,-233.2436 543.7201,-236.0993 547.3483,-233.0978 543.8513,-232.952 543.8513,-232.952 543.8513,-232.952 547.3483,-233.0978 543.9825,-229.8048 550.8452,-233.2436 550.8452,-233.2436\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"486.5\" y=\"-234.8\">a</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge13\">\n",
"<title>5-&gt;1</title>\n",
"<path d=\"M392.481,-216.2542C398.7338,-212.5082 406.0931,-208.3347 413,-205 430.3661,-196.6156 450.7234,-188.7653 466.1434,-183.1996\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"472.8523,-180.8094 467.3154,-186.126 469.5553,-181.9841 466.2583,-183.1587 466.2583,-183.1587 466.2583,-183.1587 469.5553,-181.9841 465.2011,-180.1914 472.8523,-180.8094 472.8523,-180.8094\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"413\" y=\"-208.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge14\">\n",
"<title>5-&gt;2</title>\n",
"<path d=\"M359.3975,-230.8141C330.1706,-238.0861 269.9042,-250.0143 220,-240 208.7869,-237.7499 197.0066,-233.157 187.2379,-228.6631\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"180.8281,-225.5977 188.5021,-225.776 183.9856,-227.1078 187.1431,-228.6178 187.1431,-228.6178 187.1431,-228.6178 183.9856,-227.1078 185.7841,-231.4596 180.8281,-225.5977 180.8281,-225.5977\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"232.5\" y=\"-261.8\">!a &amp; b</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"243\" y=\"-246.8\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge10\">\n",
"<title>3-&gt;3</title>\n",
"<path d=\"M158.6208,-51.0373C157.3189,-60.8579 159.4453,-70 165,-70 169.166,-70 171.4036,-64.8576 171.7128,-58.1433\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"171.3792,-51.0373 174.8541,-57.8818 171.5434,-54.5335 171.7076,-58.0296 171.7076,-58.0296 171.7076,-58.0296 171.5434,-54.5335 168.561,-58.1774 171.3792,-51.0373 171.3792,-51.0373\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"160.5\" y=\"-88.8\">1</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"157\" y=\"-73.8\">⓿</text>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"aut = spot.translate('(b W Xa) & GF(c <-> Xb) | a', 'generic', 'det')\n",
"spot.highlight_languages(aut)\n",
"aut.show('.bas')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}