spot/tests/python/highlighting.ipynb
Alexandre Duret-Lutz 2a308182db dot: make "a" the default
Fixes #319.

* spot/twaalgos/dot.cc: Enable "a" by default.
* bin/common_aoutput.cc, NEWS: Document it.
* doc/org/autfilt.org, doc/org/concepts.org, doc/org/dstar2tgba.org,
doc/org/hierarchy.org, doc/org/ltl2tgba.org, doc/org/oaut.org,
doc/org/randaut.org, doc/org/satmin.org, doc/org/tut23.org,
doc/org/tut24.org, doc/org/tut30.org, doc/org/tut31.org: Adjust or
simplify the documentation.
* tests/core/det.test, tests/core/dstar.test, tests/core/monitor.test,
tests/core/neverclaimread.test, tests/core/readsave.test,
tests/core/tgbagraph.test, tests/core/wdba.test,
tests/python/_autparserr.ipynb, tests/python/automata-io.ipynb,
tests/python/automata.ipynb, tests/python/highlighting.ipynb
tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb,
tests/python/product.ipynb, tests/python/testingaut.ipynb,
tests/python/word.ipynb: Adjust test cases.
2018-03-10 23:23:51 +01:00

2556 lines
177 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=\"179pt\" viewBox=\"0.00 0.00 307.00 178.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 174.8)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-174.8 303,-174.8 303,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"126.5\" y=\"-140.6\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node2\"><title>2</title>\n",
"<ellipse cx=\"56\" cy=\"-76\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-72.3\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;2</title>\n",
"<path d=\"M1.15491,-76C2.79388,-76 17.1543,-76 30.6317,-76\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"37.9419,-76 30.9419,-79.1501 34.4419,-76 30.9419,-76.0001 30.9419,-76.0001 30.9419,-76.0001 34.4419,-76 30.9418,-72.8501 37.9419,-76 37.9419,-76\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge7\"><title>2-&gt;2</title>\n",
"<path d=\"M49.6208,-93.0373C48.3189,-102.858 50.4453,-112 56,-112 60.166,-112 62.4036,-106.858 62.7128,-100.143\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"62.3792,-93.0373 65.8541,-99.8818 62.5434,-96.5335 62.7076,-100.03 62.7076,-100.03 62.7076,-100.03 62.5434,-96.5335 59.561,-100.177 62.3792,-93.0373 62.3792,-93.0373\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"38\" y=\"-115.8\">a &amp; !c</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"41.1208\" y=\"-96.8373\">#6</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node3\"><title>0</title>\n",
"<ellipse cx=\"277\" cy=\"-76\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"277\" cy=\"-76\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"277\" y=\"-72.3\">0</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>2-&gt;0</title>\n",
"<path d=\"M74.071,-77.7575C79.7664,-78.2653 86.1506,-78.7498 92,-79 147.13,-81.3584 211.623,-79.169 247.752,-77.4948\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"255.018,-77.1472 248.176,-80.6282 251.522,-77.3145 248.026,-77.4818 248.026,-77.4818 248.026,-77.4818 251.522,-77.3145 247.875,-74.3354 255.018,-77.1472 255.018,-77.1472\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-82.8\">c</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"82.571\" y=\"-66.5575\">#4</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node4\"><title>1</title>\n",
"<ellipse cx=\"194\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text 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\"><title>2-&gt;1</title>\n",
"<path d=\"M72.8671,-69.2332C97.0256,-58.9303 143.124,-39.2707 170.658,-27.5281\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"177.234,-24.7237 172.031,-30.3673 174.015,-26.0968 170.795,-27.4698 170.795,-27.4698 170.795,-27.4698 174.015,-26.0968 169.559,-24.5723 177.234,-24.7237 177.234,-24.7237\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-63.8\">!a &amp; b &amp; !c</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"81.3671\" y=\"-58.0332\">#5</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;0</title>\n",
"<path d=\"M269.317,-96.9908C268.369,-107.087 270.93,-116 277,-116 281.553,-116 284.131,-110.987 284.736,-104.22\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"284.683,-96.9908 287.884,-103.967 284.709,-100.491 284.734,-103.991 284.734,-103.991 284.734,-103.991 284.709,-100.491 281.585,-104.014 284.683,-96.9908 284.683,-96.9908\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"272.5\" y=\"-119.8\">1</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"260.817\" y=\"-100.791\">#1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>1-&gt;0</title>\n",
"<path d=\"M209.109,-28.1028C221.166,-36.7361 238.75,-49.3269 252.863,-59.4329\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"258.673,-63.5931 251.148,-62.0789 255.827,-61.5555 252.982,-59.5178 252.982,-59.5178 252.982,-59.5178 255.827,-61.5555 254.816,-56.9566 258.673,-63.5931 258.673,-63.5931\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"230\" y=\"-50.8\">c</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"217.609\" y=\"-31.9028\">#2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>1-&gt;1</title>\n",
"<path d=\"M187.266,-35.0373C185.892,-44.8579 188.137,-54 194,-54 198.397,-54 200.759,-48.8576 201.086,-42.1433\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"200.734,-35.0373 204.226,-41.8728 200.907,-38.533 201.08,-42.0287 201.08,-42.0287 201.08,-42.0287 200.907,-38.533 197.934,-42.1847 200.734,-35.0373 200.734,-35.0373\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"175.5\" y=\"-57.8\">b &amp; !c</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"178.766\" 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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"307pt\" height=\"179pt\"\n",
" viewBox=\"0.00 0.00 307.00 178.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 174.8)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-174.8 303,-174.8 303,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-140.6\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g id=\"node2\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-76C2.79388,-76 17.1543,-76 30.6317,-76\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-76 30.9419,-79.1501 34.4419,-76 30.9419,-76.0001 30.9419,-76.0001 30.9419,-76.0001 34.4419,-76 30.9418,-72.8501 37.9419,-76 37.9419,-76\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M49.6208,-93.0373C48.3189,-102.858 50.4453,-112 56,-112 60.166,-112 62.4036,-106.858 62.7128,-100.143\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"62.3792,-93.0373 65.8541,-99.8818 62.5434,-96.5335 62.7076,-100.03 62.7076,-100.03 62.7076,-100.03 62.5434,-96.5335 59.561,-100.177 62.3792,-93.0373 62.3792,-93.0373\"/>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-115.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"277\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"277\" cy=\"-76\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"277\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M74.071,-77.7575C79.7664,-78.2653 86.1506,-78.7498 92,-79 147.13,-81.3584 211.623,-79.169 247.752,-77.4948\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"255.018,-77.1472 248.176,-80.6282 251.545,-77.8139 248.049,-77.9813 248.026,-77.4818 248.002,-76.9824 251.498,-76.8151 247.875,-74.3354 255.018,-77.1472 255.018,-77.1472\"/>\n",
"<text text-anchor=\"start\" x=\"190.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M72.8671,-69.2332C97.0256,-58.9303 143.124,-39.2707 170.658,-27.5281\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"177.234,-24.7237 172.031,-30.3673 174.211,-26.5567 170.991,-27.9297 170.795,-27.4698 170.599,-27.0099 173.818,-25.6369 169.559,-24.5723 177.234,-24.7237 177.234,-24.7237\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M269.317,-96.9908C268.369,-107.087 270.93,-116 277,-116 281.553,-116 284.131,-110.987 284.736,-104.22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"284.683,-96.9908 287.884,-103.967 284.709,-100.491 284.734,-103.991 284.734,-103.991 284.734,-103.991 284.709,-100.491 281.585,-104.014 284.683,-96.9908 284.683,-96.9908\"/>\n",
"<text text-anchor=\"start\" x=\"272.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M209.109,-28.1028C221.166,-36.7361 238.75,-49.3269 252.863,-59.4329\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"258.673,-63.5931 251.148,-62.0789 255.536,-61.962 252.691,-59.9243 252.982,-59.5178 253.273,-59.1113 256.119,-61.1489 254.816,-56.9566 258.673,-63.5931 258.673,-63.5931\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M187.266,-35.0373C185.892,-44.8579 188.137,-54 194,-54 198.397,-54 200.759,-48.8576 201.086,-42.1433\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"200.734,-35.0373 204.226,-41.8728 200.907,-38.533 201.08,-42.0287 201.08,-42.0287 201.08,-42.0287 200.907,-38.533 197.934,-42.1847 200.734,-35.0373 200.734,-35.0373\"/>\n",
"<text text-anchor=\"start\" x=\"175.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">b &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e8c08c090> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"307pt\" height=\"179pt\"\n",
" viewBox=\"0.00 0.00 307.00 178.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 174.8)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-174.8 303,-174.8 303,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-140.6\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g id=\"node2\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-76C2.79388,-76 17.1543,-76 30.6317,-76\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-76 30.9419,-79.1501 34.4419,-76 30.9419,-76.0001 30.9419,-76.0001 30.9419,-76.0001 34.4419,-76 30.9418,-72.8501 37.9419,-76 37.9419,-76\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#ff7f00\" stroke-width=\"2\" d=\"M49.6208,-93.0373C48.3189,-102.858 50.4453,-112 56,-112 60.166,-112 62.4036,-106.858 62.7128,-100.143\"/>\n",
"<polygon fill=\"#ff7f00\" stroke=\"#ff7f00\" stroke-width=\"2\" points=\"62.3792,-93.0373 65.8541,-99.8818 63.0428,-96.51 63.207,-100.006 62.7076,-100.03 62.2081,-100.053 62.0439,-96.5569 59.561,-100.177 62.3792,-93.0373 62.3792,-93.0373\"/>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-115.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-76\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"277\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M74.071,-77.7575C79.7664,-78.2653 86.1506,-78.7498 92,-79 147.13,-81.3584 211.623,-79.169 247.752,-77.4948\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"255.018,-77.1472 248.176,-80.6282 251.545,-77.8139 248.049,-77.9813 248.026,-77.4818 248.002,-76.9824 251.498,-76.8151 247.875,-74.3354 255.018,-77.1472 255.018,-77.1472\"/>\n",
"<text text-anchor=\"start\" x=\"190.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\"><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\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M72.8671,-69.2332C97.0256,-58.9303 143.124,-39.2707 170.658,-27.5281\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"177.234,-24.7237 172.031,-30.3673 174.211,-26.5567 170.991,-27.9297 170.795,-27.4698 170.599,-27.0099 173.818,-25.6369 169.559,-24.5723 177.234,-24.7237 177.234,-24.7237\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M269.317,-96.9908C268.369,-107.087 270.93,-116 277,-116 281.553,-116 284.131,-110.987 284.736,-104.22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"284.683,-96.9908 287.884,-103.967 284.709,-100.491 284.734,-103.991 284.734,-103.991 284.734,-103.991 284.709,-100.491 281.585,-104.014 284.683,-96.9908 284.683,-96.9908\"/>\n",
"<text text-anchor=\"start\" x=\"272.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M209.109,-28.1028C221.166,-36.7361 238.75,-49.3269 252.863,-59.4329\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"258.673,-63.5931 251.148,-62.0789 255.536,-61.962 252.691,-59.9243 252.982,-59.5178 253.273,-59.1113 256.119,-61.1489 254.816,-56.9566 258.673,-63.5931 258.673,-63.5931\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M187.266,-35.0373C185.892,-44.8579 188.137,-54 194,-54 198.397,-54 200.759,-48.8576 201.086,-42.1433\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"200.734,-35.0373 204.226,-41.8728 200.907,-38.533 201.08,-42.0287 201.08,-42.0287 201.08,-42.0287 200.907,-38.533 197.934,-42.1847 200.734,-35.0373 200.734,-35.0373\"/>\n",
"<text text-anchor=\"start\" x=\"175.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">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 0x7f5e857897b0> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"307pt\" height=\"179pt\"\n",
" viewBox=\"0.00 0.00 307.00 178.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 174.8)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-174.8 303,-174.8 303,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"126.5\" y=\"-140.6\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 2 -->\n",
"<g id=\"node2\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"56\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- I&#45;&gt;2 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-76C2.79388,-76 17.1543,-76 30.6317,-76\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-76 30.9419,-79.1501 34.4419,-76 30.9419,-76.0001 30.9419,-76.0001 30.9419,-76.0001 34.4419,-76 30.9418,-72.8501 37.9419,-76 37.9419,-76\"/>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#ff7f00\" stroke-width=\"2\" d=\"M49.6208,-93.0373C48.3189,-102.858 50.4453,-112 56,-112 60.166,-112 62.4036,-106.858 62.7128,-100.143\"/>\n",
"<polygon fill=\"#ff7f00\" stroke=\"#ff7f00\" stroke-width=\"2\" points=\"62.3792,-93.0373 65.8541,-99.8818 63.0428,-96.51 63.207,-100.006 62.7076,-100.03 62.2081,-100.053 62.0439,-96.5569 59.561,-100.177 62.3792,-93.0373 62.3792,-93.0373\"/>\n",
"<text text-anchor=\"start\" x=\"38\" y=\"-115.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"277\" cy=\"-76\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"277\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M74.071,-77.7575C79.7664,-78.2653 86.1506,-78.7498 92,-79 147.13,-81.3584 211.623,-79.169 247.752,-77.4948\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"255.018,-77.1472 248.176,-80.6282 251.545,-77.8139 248.049,-77.9813 248.026,-77.4818 248.002,-76.9824 251.498,-76.8151 247.875,-74.3354 255.018,-77.1472 255.018,-77.1472\"/>\n",
"<text text-anchor=\"start\" x=\"190.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\"><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\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M72.8671,-69.2332C97.0256,-58.9303 143.124,-39.2707 170.658,-27.5281\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"177.234,-24.7237 172.031,-30.3673 174.211,-26.5567 170.991,-27.9297 170.795,-27.4698 170.599,-27.0099 173.818,-25.6369 169.559,-24.5723 177.234,-24.7237 177.234,-24.7237\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M269.317,-96.9908C268.369,-107.087 270.93,-116 277,-116 281.553,-116 284.131,-110.987 284.736,-104.22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"284.683,-96.9908 287.884,-103.967 284.709,-100.491 284.734,-103.991 284.734,-103.991 284.734,-103.991 284.709,-100.491 281.585,-104.014 284.683,-96.9908 284.683,-96.9908\"/>\n",
"<text text-anchor=\"start\" x=\"272.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M209.109,-28.1028C221.166,-36.7361 238.75,-49.3269 252.863,-59.4329\"/>\n",
"<polygon fill=\"#ff4da0\" stroke=\"#ff4da0\" stroke-width=\"2\" points=\"258.673,-63.5931 251.148,-62.0789 255.536,-61.962 252.691,-59.9243 252.982,-59.5178 253.273,-59.1113 256.119,-61.1489 254.816,-56.9566 258.673,-63.5931 258.673,-63.5931\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M187.266,-35.0373C185.892,-44.8579 188.137,-54 194,-54 198.397,-54 200.759,-48.8576 201.086,-42.1433\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"200.734,-35.0373 204.226,-41.8728 200.907,-38.533 201.08,-42.0287 201.08,-42.0287 201.08,-42.0287 200.907,-38.533 197.934,-42.1847 200.734,-35.0373 200.734,-35.0373\"/>\n",
"<text text-anchor=\"start\" x=\"175.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">b &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e8c08c090> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"386pt\" height=\"320pt\"\n",
" viewBox=\"0.00 0.00 386.00 320.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 316)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-316 382,-316 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-283.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-105C2.79388,-105 17.1543,-105 30.6317,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-105 30.9419,-108.15 34.4419,-105 30.9419,-105 30.9419,-105 30.9419,-105 34.4419,-105 30.9418,-101.85 37.9419,-105 37.9419,-105\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.1418,-105C85.1153,-105 99.5214,-105 111.67,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"118.892,-105 111.892,-108.15 115.392,-105 111.892,-105 111.892,-105 111.892,-105 115.392,-105 111.892,-101.85 118.892,-105 118.892,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M129.969,-121.664C128.406,-131.625 130.75,-141 137,-141 141.688,-141 144.178,-135.727 144.471,-128.888\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"144.031,-121.664 147.601,-128.46 144.244,-125.158 144.456,-128.651 144.456,-128.651 144.456,-128.651 144.244,-125.158 141.312,-128.842 144.031,-121.664 144.031,-121.664\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">a | b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"360\" cy=\"-177\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-173.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M145.493,-120.895C158.318,-145.976 187.11,-193.848 228,-213 265.175,-230.412 312.353,-207.508 338.749,-191.059\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"344.681,-187.252 340.492,-193.684 341.736,-189.142 338.79,-191.033 338.79,-191.033 338.79,-191.033 341.736,-189.142 337.089,-188.382 344.681,-187.252 344.681,-187.252\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-222.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M155.109,-105C173.324,-105 202.31,-105 222.956,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"230.149,-105 223.149,-108.15 226.649,-105 223.149,-105 223.149,-105 223.149,-105 226.649,-105 223.149,-101.85 230.149,-105 230.149,-105\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">4</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M151.868,-93.9814C171.203,-78.6193 206.342,-50.7007 228.218,-33.3198\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"233.744,-28.9291 230.223,-35.75 231.004,-31.1064 228.264,-33.2837 228.264,-33.2837 228.264,-33.2837 231.004,-31.1064 226.304,-30.8174 233.744,-28.9291 233.744,-28.9291\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M355.18,-194.41C354.28,-204.088 355.887,-213 360,-213 363.021,-213 364.69,-208.194 365.007,-201.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"364.82,-194.41 368.146,-201.328 364.908,-197.909 364.997,-201.408 364.997,-201.408 364.997,-201.408 364.908,-197.909 361.848,-201.487 364.82,-194.41 364.82,-194.41\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-231.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M352.733,-193.596C347.242,-214.863 349.664,-243 360,-243 369.246,-243 372.159,-220.485 368.741,-200.513\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"367.267,-193.596 371.807,-199.786 367.997,-197.019 368.726,-200.442 368.726,-200.442 368.726,-200.442 367.997,-197.019 365.645,-201.099 367.267,-193.596 367.267,-193.596\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-246.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M243.501,-122.41C242.568,-132.088 244.234,-141 248.5,-141 251.633,-141 253.363,-136.194 253.692,-129.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"253.499,-122.41 256.831,-129.325 253.59,-125.909 253.682,-129.408 253.682,-129.408 253.682,-129.408 253.59,-125.909 250.533,-129.49 253.499,-122.41 253.499,-122.41\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">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",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M240.963,-121.596C235.269,-142.863 237.781,-171 248.5,-171 258.088,-171 261.11,-148.485 257.564,-128.513\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"256.037,-121.596 260.622,-127.752 256.792,-125.014 257.546,-128.431 257.546,-128.431 257.546,-128.431 256.792,-125.014 254.471,-129.111 256.037,-121.596 256.037,-121.596\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-174.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\"><title>4&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M259.411,-32.3906C278.856,-60.6271 322.078,-123.387 344.648,-156.161\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"348.874,-162.297 342.309,-158.318 346.889,-159.414 344.904,-156.532 344.904,-156.532 344.904,-156.532 346.889,-159.414 347.498,-154.745 348.874,-162.297 348.874,-162.297\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-128.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M238.925,-33.5414C236.23,-43.9087 239.422,-54 248.5,-54 255.45,-54 258.95,-48.0847 258.999,-40.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"258.075,-33.5414 262.1,-40.0771 258.526,-37.0123 258.977,-40.4831 258.977,-40.4831 258.977,-40.4831 258.526,-37.0123 255.853,-40.889 258.075,-33.5414 258.075,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e85789bd0> >"
]
},
"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",
" 0\n",
" | 1\n",
" 1\n",
" | !a & !b\n",
"Cycle:\n",
" 2\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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"386pt\" height=\"320pt\"\n",
" viewBox=\"0.00 0.00 386.00 320.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 316)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-316 382,-316 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-283.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-105C2.79388,-105 17.1543,-105 30.6317,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-105 30.9419,-108.15 34.4419,-105 30.9419,-105 30.9419,-105 30.9419,-105 34.4419,-105 30.9418,-101.85 37.9419,-105 37.9419,-105\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.1418,-105C85.1153,-105 99.5214,-105 111.67,-105\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"118.892,-105 111.892,-108.15 115.392,-105.5 111.892,-105.5 111.892,-105 111.892,-104.5 115.392,-104.5 111.892,-101.85 118.892,-105 118.892,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M129.969,-121.664C128.406,-131.625 130.75,-141 137,-141 141.688,-141 144.178,-135.727 144.471,-128.888\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"144.031,-121.664 147.601,-128.46 144.244,-125.158 144.456,-128.651 144.456,-128.651 144.456,-128.651 144.244,-125.158 141.312,-128.842 144.031,-121.664 144.031,-121.664\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">a | b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"360\" cy=\"-177\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-173.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M145.493,-120.895C158.318,-145.976 187.11,-193.848 228,-213 265.175,-230.412 312.353,-207.508 338.749,-191.059\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"344.681,-187.252 340.492,-193.684 342.006,-189.563 339.06,-191.454 338.79,-191.033 338.52,-190.612 341.466,-188.722 337.089,-188.382 344.681,-187.252 344.681,-187.252\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-222.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M155.109,-105C173.324,-105 202.31,-105 222.956,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"230.149,-105 223.149,-108.15 226.649,-105 223.149,-105 223.149,-105 223.149,-105 226.649,-105 223.149,-101.85 230.149,-105 230.149,-105\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">4</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M151.868,-93.9814C171.203,-78.6193 206.342,-50.7007 228.218,-33.3198\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"233.744,-28.9291 230.223,-35.75 231.004,-31.1064 228.264,-33.2837 228.264,-33.2837 228.264,-33.2837 231.004,-31.1064 226.304,-30.8174 233.744,-28.9291 233.744,-28.9291\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M355.18,-194.41C354.28,-204.088 355.887,-213 360,-213 363.021,-213 364.69,-208.194 365.007,-201.807\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"364.82,-194.41 368.146,-201.328 365.408,-197.896 365.497,-201.395 364.997,-201.408 364.497,-201.42 364.409,-197.921 361.848,-201.487 364.82,-194.41 364.82,-194.41\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-231.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M352.733,-193.596C347.242,-214.863 349.664,-243 360,-243 369.246,-243 372.159,-220.485 368.741,-200.513\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"367.267,-193.596 371.807,-199.786 367.997,-197.019 368.726,-200.442 368.726,-200.442 368.726,-200.442 367.997,-197.019 365.645,-201.099 367.267,-193.596 367.267,-193.596\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-246.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M243.501,-122.41C242.568,-132.088 244.234,-141 248.5,-141 251.633,-141 253.363,-136.194 253.692,-129.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"253.499,-122.41 256.831,-129.325 253.59,-125.909 253.682,-129.408 253.682,-129.408 253.682,-129.408 253.59,-125.909 250.533,-129.49 253.499,-122.41 253.499,-122.41\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">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",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M240.963,-121.596C235.269,-142.863 237.781,-171 248.5,-171 258.088,-171 261.11,-148.485 257.564,-128.513\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"256.037,-121.596 260.622,-127.752 256.792,-125.014 257.546,-128.431 257.546,-128.431 257.546,-128.431 256.792,-125.014 254.471,-129.111 256.037,-121.596 256.037,-121.596\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-174.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\"><title>4&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M259.411,-32.3906C278.856,-60.6271 322.078,-123.387 344.648,-156.161\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"348.874,-162.297 342.309,-158.318 346.889,-159.414 344.904,-156.532 344.904,-156.532 344.904,-156.532 346.889,-159.414 347.498,-154.745 348.874,-162.297 348.874,-162.297\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-128.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M238.925,-33.5414C236.23,-43.9087 239.422,-54 248.5,-54 255.45,-54 258.95,-48.0847 258.999,-40.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"258.075,-33.5414 262.1,-40.0771 258.526,-37.0123 258.977,-40.4831 258.977,-40.4831 258.977,-40.4831 258.526,-37.0123 255.853,-40.889 258.075,-33.5414 258.075,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e85789bd0> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G 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",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" 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\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-22C2.79388,-22 17.1543,-22 30.6317,-22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-22 30.9419,-25.1501 34.4419,-22 30.9419,-22.0001 30.9419,-22.0001 30.9419,-22.0001 34.4419,-22 30.9418,-18.8501 37.9419,-22 37.9419,-22\"/>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" 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=\"black\" stroke=\"black\" 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\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"141\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.1977,-22C85.0734,-22 99.3874,-22 111.887,-22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"118.997,-22 111.997,-25.1501 115.497,-22 111.997,-22.0001 111.997,-22.0001 111.997,-22.0001 115.497,-22 111.997,-18.8501 118.997,-22 118.997,-22\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M132.994,-42.5808C131.886,-52.8447 134.555,-62 141,-62 145.834,-62 148.544,-56.8502 149.129,-49.9451\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"149.006,-42.5808 152.273,-49.5273 149.065,-46.0803 149.123,-49.5798 149.123,-49.5798 149.123,-49.5798 149.065,-46.0803 145.973,-49.6324 149.006,-42.5808 149.006,-42.5808\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e85799030> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G 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",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" 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\">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\">)</text>\n",
"<text text-anchor=\"start\" x=\"14\" y=\"-124.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-18C2.79388,-18 17.1543,-18 30.6317,-18\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-18 30.9419,-21.1501 34.4419,-18 30.9419,-18.0001 30.9419,-18.0001 30.9419,-18.0001 34.4419,-18 30.9418,-14.8501 37.9419,-18 37.9419,-18\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" 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=\"black\" stroke=\"black\" 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\">!a</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" 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=\"black\" stroke=\"black\" 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\">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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e85799720> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"227pt\" height=\"189pt\"\n",
" viewBox=\"0.00 0.00 227.00 188.54\" 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 184.543)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-184.543 223,-184.543 223,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"62.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"84.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"100.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\">)&amp;Inf(</text>\n",
"<text text-anchor=\"start\" x=\"136.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"152.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"65.5\" y=\"-152.343\" font-family=\"Lato\" font-size=\"14.00\">[gen. Büchi 2]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"65\" cy=\"-32.5429\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"55\" y=\"-28.8429\" font-family=\"Lato\" font-size=\"14.00\">1,0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.04566,-32.5429C1.94863,-32.5429 16.101,-32.5429 30.7579,-32.5429\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9378,-32.5429 30.9378,-35.693 34.4378,-32.543 30.9378,-32.543 30.9378,-32.543 30.9378,-32.543 34.4378,-32.543 30.9378,-29.393 37.9378,-32.5429 37.9378,-32.5429\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M57.1448,-49.9528C55.6785,-59.6308 58.2969,-68.5429 65,-68.5429 69.9226,-68.5429 72.6423,-63.7366 73.1591,-57.3502\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"72.8552,-49.9528 76.2899,-56.8176 72.9989,-53.4499 73.1426,-56.9469 73.1426,-56.9469 73.1426,-56.9469 72.9989,-53.4499 69.9953,-57.0762 72.8552,-49.9528 72.8552,-49.9528\"/>\n",
"<text text-anchor=\"start\" x=\"46.5\" y=\"-87.3429\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"57\" y=\"-72.3429\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"192\" cy=\"-32.5429\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"182\" y=\"-28.8429\" font-family=\"Lato\" font-size=\"14.00\">0,0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M91.5514,-35.9415C97.5895,-36.6072 104.013,-37.2038 110,-37.5429 126.418,-38.4728 130.582,-38.4728 147,-37.5429 150.648,-37.3363 154.459,-37.034 158.245,-36.6788\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"165.449,-35.9415 158.806,-39.788 161.967,-36.2979 158.485,-36.6543 158.485,-36.6543 158.485,-36.6543 161.967,-36.2979 158.164,-33.5207 165.449,-35.9415 165.449,-35.9415\"/>\n",
"<text text-anchor=\"start\" x=\"110\" y=\"-41.3429\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M82.3738,-18.439C90.1919,-12.6175 100.01,-6.539 110,-3.54293 125.751,1.18098 131.249,1.18098 147,-3.54293 154.649,-5.8368 162.196,-9.93752 168.823,-14.3464\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"174.626,-18.439 167.09,-16.9789 171.766,-16.4218 168.906,-14.4046 168.906,-14.4046 168.906,-14.4046 171.766,-16.4218 170.721,-11.8304 174.626,-18.439 174.626,-18.439\"/>\n",
"<text text-anchor=\"start\" x=\"111.5\" y=\"-22.3429\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"120.5\" y=\"-7.34293\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M186.427,-50.3247C185.48,-59.8579 187.338,-68.5429 192,-68.5429 195.424,-68.5429 197.335,-63.859 197.734,-57.595\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"197.573,-50.3247 200.877,-57.2532 197.65,-53.8238 197.728,-57.3229 197.728,-57.3229 197.728,-57.3229 197.65,-53.8238 194.579,-57.3927 197.573,-50.3247 197.573,-50.3247\"/>\n",
"<text text-anchor=\"start\" x=\"186.5\" y=\"-87.3429\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"<text text-anchor=\"start\" x=\"184\" y=\"-72.3429\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M183.466,-49.792C177.409,-70.9775 180.254,-98.5429 192,-98.5429 202.507,-98.5429 205.892,-76.4855 202.154,-56.6683\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"200.534,-49.792 205.205,-55.8835 201.337,-53.1988 202.139,-56.6056 202.139,-56.6056 202.139,-56.6056 201.337,-53.1988 199.073,-57.3277 200.534,-49.792 200.534,-49.792\"/>\n",
"<text text-anchor=\"start\" x=\"188.5\" y=\"-116.343\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"176\" y=\"-102.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"192\" y=\"-102.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9660> >"
]
},
"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}\n",
" 0,0\n",
" | a\t{0,1}"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"227pt\" height=\"189pt\"\n",
" viewBox=\"0.00 0.00 227.00 188.54\" 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 184.543)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-184.543 223,-184.543 223,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"62.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"84.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"100.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\">)&amp;Inf(</text>\n",
"<text text-anchor=\"start\" x=\"136.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"152.5\" y=\"-166.343\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"65.5\" y=\"-152.343\" font-family=\"Lato\" font-size=\"14.00\">[gen. Büchi 2]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"65\" cy=\"-32.5429\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"55\" y=\"-28.8429\" font-family=\"Lato\" font-size=\"14.00\">1,0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.04566,-32.5429C1.94863,-32.5429 16.101,-32.5429 30.7579,-32.5429\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9378,-32.5429 30.9378,-35.693 34.4378,-32.543 30.9378,-32.543 30.9378,-32.543 30.9378,-32.543 34.4378,-32.543 30.9378,-29.393 37.9378,-32.5429 37.9378,-32.5429\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M57.1448,-49.9528C55.6785,-59.6308 58.2969,-68.5429 65,-68.5429 69.9226,-68.5429 72.6423,-63.7366 73.1591,-57.3502\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"72.8552,-49.9528 76.2899,-56.8176 72.9989,-53.4499 73.1426,-56.9469 73.1426,-56.9469 73.1426,-56.9469 72.9989,-53.4499 69.9953,-57.0762 72.8552,-49.9528 72.8552,-49.9528\"/>\n",
"<text text-anchor=\"start\" x=\"46.5\" y=\"-87.3429\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"57\" y=\"-72.3429\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"192\" cy=\"-32.5429\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"182\" y=\"-28.8429\" font-family=\"Lato\" font-size=\"14.00\">0,0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M91.5514,-35.9415C97.5895,-36.6072 104.013,-37.2038 110,-37.5429 126.418,-38.4728 130.582,-38.4728 147,-37.5429 150.648,-37.3363 154.459,-37.034 158.245,-36.6788\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"165.449,-35.9415 158.806,-39.788 162.018,-36.7953 158.536,-37.1517 158.485,-36.6543 158.434,-36.1569 161.916,-35.8005 158.164,-33.5207 165.449,-35.9415 165.449,-35.9415\"/>\n",
"<text text-anchor=\"start\" x=\"110\" y=\"-41.3429\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M82.3738,-18.439C90.1919,-12.6175 100.01,-6.539 110,-3.54293 125.751,1.18098 131.249,1.18098 147,-3.54293 154.649,-5.8368 162.196,-9.93752 168.823,-14.3464\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"174.626,-18.439 167.09,-16.9789 171.766,-16.4218 168.906,-14.4046 168.906,-14.4046 168.906,-14.4046 171.766,-16.4218 170.721,-11.8304 174.626,-18.439 174.626,-18.439\"/>\n",
"<text text-anchor=\"start\" x=\"111.5\" y=\"-22.3429\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"120.5\" y=\"-7.34293\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M186.427,-50.3247C185.48,-59.8579 187.338,-68.5429 192,-68.5429 195.424,-68.5429 197.335,-63.859 197.734,-57.595\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"197.573,-50.3247 200.877,-57.2532 198.15,-53.8127 198.228,-57.3119 197.728,-57.3229 197.228,-57.334 197.15,-53.8349 194.579,-57.3927 197.573,-50.3247 197.573,-50.3247\"/>\n",
"<text text-anchor=\"start\" x=\"186.5\" y=\"-87.3429\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"<text text-anchor=\"start\" x=\"184\" y=\"-72.3429\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M183.466,-49.792C177.409,-70.9775 180.254,-98.5429 192,-98.5429 202.507,-98.5429 205.892,-76.4855 202.154,-56.6683\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"200.534,-49.792 205.205,-55.8835 201.823,-53.0842 202.626,-56.491 202.139,-56.6056 201.652,-56.7202 200.85,-53.3134 199.073,-57.3277 200.534,-49.792 200.534,-49.792\"/>\n",
"<text text-anchor=\"start\" x=\"188.5\" y=\"-116.343\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"176\" y=\"-102.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"192\" y=\"-102.343\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9660> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G 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",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" 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\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-22C2.79388,-22 17.1543,-22 30.6317,-22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-22 30.9419,-25.1501 34.4419,-22 30.9419,-22.0001 30.9419,-22.0001 30.9419,-22.0001 34.4419,-22 30.9418,-18.8501 37.9419,-22 37.9419,-22\"/>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" 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=\"black\" stroke=\"black\" 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\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"141\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.1977,-22C85.0734,-22 99.3874,-22 111.887,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"118.997,-22 111.997,-25.1501 115.497,-22.5 111.997,-22.5001 111.997,-22.0001 111.997,-21.5001 115.497,-21.5 111.997,-18.8501 118.997,-22 118.997,-22\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M132.994,-42.5808C131.886,-52.8447 134.555,-62 141,-62 145.834,-62 148.544,-56.8502 149.129,-49.9451\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"149.006,-42.5808 152.273,-49.5273 149.565,-46.072 149.623,-49.5715 149.123,-49.5798 148.623,-49.5882 148.565,-46.0887 145.973,-49.6324 149.006,-42.5808 149.006,-42.5808\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e85799030> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G 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",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" 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\">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\">)</text>\n",
"<text text-anchor=\"start\" x=\"14\" y=\"-124.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-18C2.79388,-18 17.1543,-18 30.6317,-18\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-18 30.9419,-21.1501 34.4419,-18 30.9419,-18.0001 30.9419,-18.0001 30.9419,-18.0001 34.4419,-18 30.9418,-14.8501 37.9419,-18 37.9419,-18\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><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\">!a</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><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\">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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e85799720> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G 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",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-258 682.567,-258 682.567,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"292.284\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"314.284\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"330.284\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\">)&amp;Inf(</text>\n",
"<text text-anchor=\"start\" x=\"366.284\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"382.284\" y=\"-239.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"295.284\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\">[gen. Büchi 2]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"68.5473\" cy=\"-168\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"53.0473\" y=\"-164.3\" font-family=\"Lato\" font-size=\"14.00\">0 * 3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.04823,-168C1.96146,-168 15.7044,-168 30.461,-168\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.7348,-168 30.7348,-171.15 34.2348,-168 30.7348,-168 30.7348,-168 30.7348,-168 34.2348,-168 30.7347,-164.85 37.7348,-168 37.7348,-168\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"202.642\" cy=\"-193\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"187.142\" y=\"-189.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M97.8849,-173.363C117.909,-177.153 144.887,-182.259 166.315,-186.314\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"173.351,-187.646 165.887,-189.439 169.912,-186.995 166.473,-186.344 166.473,-186.344 166.473,-186.344 169.912,-186.995 167.059,-183.249 173.351,-187.646 173.351,-187.646\"/>\n",
"<text text-anchor=\"start\" x=\"117.095\" y=\"-186.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"202.642\" cy=\"-139\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"187.142\" y=\"-135.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M97.5612,-161.85C117.701,-157.428 144.999,-151.435 166.585,-146.696\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"173.668,-145.141 167.507,-149.719 170.25,-145.892 166.831,-146.642 166.831,-146.642 166.831,-146.642 170.25,-145.892 166.156,-143.566 173.668,-145.141 173.668,-145.141\"/>\n",
"<text text-anchor=\"start\" x=\"129.095\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"315.736\" cy=\"-182\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"300.236\" y=\"-178.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M232.831,-190.11C246.753,-188.731 263.551,-187.068 278.302,-185.608\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"285.357,-184.909 278.701,-188.734 281.874,-185.254 278.391,-185.599 278.391,-185.599 278.391,-185.599 281.874,-185.254 278.081,-182.464 285.357,-184.909 285.357,-184.909\"/>\n",
"<text text-anchor=\"start\" x=\"255.689\" y=\"-206.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"251.189\" 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\"><title>2&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M228.574,-148.65C244.726,-154.902 265.901,-163.098 283.217,-169.8\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"289.888,-172.382 282.223,-172.793 286.624,-171.119 283.36,-169.855 283.36,-169.855 283.36,-169.855 286.624,-171.119 284.497,-166.918 289.888,-172.382 289.888,-172.382\"/>\n",
"<text text-anchor=\"start\" x=\"255.689\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"315.736\" cy=\"-117\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"300.236\" y=\"-113.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>2&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M225.749,-127.04C233.558,-123.415 242.551,-119.894 251.189,-118 259.864,-116.098 269.365,-115.293 278.316,-115.084\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"285.35,-115.034 278.372,-118.234 281.85,-115.059 278.35,-115.084 278.35,-115.084 278.35,-115.084 281.85,-115.059 278.327,-111.934 285.35,-115.034 285.35,-115.034\"/>\n",
"<text text-anchor=\"middle\" x=\"259.189\" y=\"-121.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node7\" class=\"node\"><title>5</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1 * 0</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>3&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M345.925,-179.11C359.848,-177.731 376.646,-176.068 391.396,-174.608\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"398.451,-173.909 391.796,-177.734 394.968,-174.254 391.486,-174.599 391.486,-174.599 391.486,-174.599 394.968,-174.254 391.175,-171.464 398.451,-173.909 398.451,-173.909\"/>\n",
"<text text-anchor=\"start\" x=\"368.784\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"364.284\" 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\"><title>4&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M339.755,-128.189C356.736,-136.443 379.98,-147.741 398.325,-156.658\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"404.842,-159.825 397.169,-159.598 401.694,-158.295 398.546,-156.765 398.546,-156.765 398.546,-156.765 401.694,-158.295 399.923,-153.932 404.842,-159.825 404.842,-159.825\"/>\n",
"<text text-anchor=\"start\" x=\"368.784\" y=\"-150.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g id=\"node8\" class=\"node\"><title>6</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">2 * 0</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;6 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>4&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M344.248,-110.281C350.777,-108.947 357.745,-107.732 364.284,-107 372.85,-106.041 382.107,-105.574 390.834,-105.388\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"398.013,-105.294 391.056,-108.536 394.514,-105.34 391.014,-105.386 391.014,-105.386 391.014,-105.386 394.514,-105.34 390.973,-102.236 398.013,-105.294 398.013,-105.294\"/>\n",
"<text text-anchor=\"middle\" x=\"372.284\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g id=\"node9\" class=\"node\"><title>7</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"648.02\" cy=\"-120\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"632.52\" y=\"-116.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 4</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;7 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>5&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M457.78,-164.437C497.284,-155.161 569.407,-138.225 612.298,-128.154\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"619.178,-126.538 613.084,-131.205 615.771,-127.338 612.364,-128.138 612.364,-128.138 612.364,-128.138 615.771,-127.338 611.644,-125.071 619.178,-126.538 619.178,-126.538\"/>\n",
"<text text-anchor=\"start\" x=\"517.926\" y=\"-171.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"526.926\" 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\"><title>6&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M459.575,-107.917C498.892,-110.452 568.127,-114.915 610.553,-117.649\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"617.636,-118.106 610.447,-120.799 614.143,-117.881 610.65,-117.655 610.65,-117.655 610.65,-117.655 614.143,-117.881 610.853,-114.512 617.636,-118.106 617.636,-118.106\"/>\n",
"<text text-anchor=\"start\" x=\"517.926\" y=\"-118.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 8 -->\n",
"<g id=\"node10\" class=\"node\"><title>8</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"534.926\" cy=\"-18\" rx=\"30.5947\" ry=\"18\"/>\n",
"<text text-anchor=\"start\" x=\"519.426\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 4</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;8 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>6&#45;&gt;8</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M447.02,-91.4686C464.499,-76.6922 491.685,-53.7096 510.992,-37.388\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"516.711,-32.553 513.399,-39.4778 514.038,-34.8126 511.365,-37.0722 511.365,-37.0722 511.365,-37.0722 514.038,-34.8126 509.332,-34.6666 516.711,-32.553 516.711,-32.553\"/>\n",
"<text text-anchor=\"start\" x=\"477.378\" y=\"-68.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;7 -->\n",
"<g id=\"edge13\" class=\"edge\"><title>7&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M638.097,-137.037C636.072,-146.858 639.38,-156 648.02,-156 654.501,-156 657.981,-150.858 658.462,-144.143\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"657.943,-137.037 661.595,-143.789 658.198,-140.528 658.453,-144.019 658.453,-144.019 658.453,-144.019 658.198,-140.528 655.312,-144.248 657.943,-137.037 657.943,-137.037\"/>\n",
"<text text-anchor=\"start\" x=\"644.52\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"632.02\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"648.02\" 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\"><title>8&#45;&gt;7</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M552.412,-32.9907C565.257,-44.6835 583.526,-61.3444 599.473,-76 607.951,-83.7912 617.252,-92.3875 625.362,-99.8991\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"630.761,-104.903 623.486,-102.455 628.194,-102.524 625.627,-100.145 625.627,-100.145 625.627,-100.145 628.194,-102.524 627.768,-97.8343 630.761,-104.903 630.761,-104.903\"/>\n",
"<text text-anchor=\"start\" x=\"587.973\" y=\"-94.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"583.473\" 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\"><title>8&#45;&gt;8</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M525.642,-35.4099C523.909,-45.0879 527.004,-54 534.926,-54 540.743,-54 543.957,-49.1936 544.568,-42.8073\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"544.209,-35.4099 547.695,-42.2489 544.379,-38.9058 544.549,-42.4017 544.549,-42.4017 544.549,-42.4017 544.379,-38.9058 541.402,-42.5544 544.209,-35.4099 544.209,-35.4099\"/>\n",
"<text text-anchor=\"start\" x=\"530.426\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"<text text-anchor=\"start\" x=\"526.926\" 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 0x7f5e857a9930> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"247pt\" height=\"186pt\"\n",
" viewBox=\"0.00 0.00 247.00 186.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 182)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-182 243,-182 243,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"98.5\" y=\"-163.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"120.5\" y=\"-163.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"136.5\" y=\"-163.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"96.5\" y=\"-149.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-76C2.79388,-76 17.1543,-76 30.6317,-76\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-76 30.9419,-79.1501 34.4419,-76 30.9419,-76.0001 30.9419,-76.0001 30.9419,-76.0001 34.4419,-76 30.9418,-72.8501 37.9419,-76 37.9419,-76\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"221\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"221\" y=\"-72.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.0904,-76.66C87.4132,-77.14 106.38,-77.7482 123,-78 139.443,-78.2491 143.558,-78.274 160,-78 171.769,-77.8039 184.832,-77.3916 195.756,-76.992\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"202.935,-76.7202 196.059,-80.1328 199.456,-77.3523 195.959,-77.4847 195.94,-76.9851 195.921,-76.4855 199.418,-76.353 195.82,-73.8374 202.935,-76.7202 202.935,-76.7202\"/>\n",
"<text text-anchor=\"start\" x=\"123\" y=\"-81.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M71.1646,-66.1611C84.5999,-56.8288 104.934,-42.7047 120.112,-32.1619\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"126.266,-27.8872 122.314,-34.4678 123.391,-29.8839 120.517,-31.8806 120.517,-31.8806 120.517,-31.8806 123.391,-29.8839 118.72,-29.2935 126.266,-27.8872 126.266,-27.8872\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-53.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M214.266,-93.0373C212.892,-102.858 215.137,-112 221,-112 225.397,-112 227.759,-106.858 228.086,-100.143\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"227.734,-93.0373 231.226,-99.8728 228.406,-96.5083 228.58,-100.004 228.08,-100.029 227.581,-100.053 227.408,-96.5578 224.934,-100.185 227.734,-93.0373 227.734,-93.0373\"/>\n",
"<text text-anchor=\"start\" x=\"217.5\" y=\"-130.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<text text-anchor=\"start\" x=\"213\" y=\"-115.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M156.355,-28.3692C168.513,-37.4677 186.34,-50.8092 200.036,-61.0593\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"206.003,-65.525 198.511,-63.8527 203.201,-63.4279 200.399,-61.3307 200.399,-61.3307 200.399,-61.3307 203.201,-63.4279 202.286,-58.8088 206.003,-65.525 206.003,-65.525\"/>\n",
"<text text-anchor=\"start\" x=\"178\" y=\"-51.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M134.469,-34.6641C132.906,-44.625 135.25,-54 141.5,-54 146.188,-54 148.678,-48.7266 148.971,-41.8876\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"148.531,-34.6641 152.101,-41.4598 148.744,-38.1576 148.956,-41.6511 148.956,-41.6511 148.956,-41.6511 148.744,-38.1576 145.812,-41.8425 148.531,-34.6641 148.531,-34.6641\"/>\n",
"<text text-anchor=\"middle\" x=\"141.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9a20> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G 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",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" 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\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 3 -->\n",
"<g id=\"node2\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">3</text>\n",
"</g>\n",
"<!-- I&#45;&gt;3 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-22C2.79388,-22 17.1543,-22 30.6317,-22\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-22 30.9419,-25.1501 34.4419,-22 30.9419,-22.0001 30.9419,-22.0001 30.9419,-22.0001 34.4419,-22 30.9418,-18.8501 37.9419,-22 37.9419,-22\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node6\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">2</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M74.1418,-22C85.1153,-22 99.5214,-22 111.67,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"118.892,-22 111.892,-25.1501 115.392,-22.5 111.892,-22.5001 111.892,-22.0001 111.892,-21.5001 115.392,-21.5 111.892,-18.8501 118.892,-22 118.892,-22\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node4\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"384\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" 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\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M317.198,-22C328.073,-22 342.387,-22 354.887,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"361.997,-22 354.997,-25.1501 358.497,-22.5 354.997,-22.5001 354.997,-22.0001 354.997,-21.5001 358.497,-21.5 354.997,-18.8501 361.997,-22 361.997,-22\"/>\n",
"<text text-anchor=\"start\" x=\"335\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M375.994,-42.5808C374.886,-52.8447 377.555,-62 384,-62 388.834,-62 391.544,-56.8502 392.129,-49.9451\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"392.006,-42.5808 395.273,-49.5273 392.565,-46.072 392.623,-49.5715 392.123,-49.5798 391.623,-49.5882 391.565,-46.0887 388.973,-49.6324 392.006,-42.5808 392.006,-42.5808\"/>\n",
"<text text-anchor=\"middle\" x=\"384\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M236.142,-22C247.115,-22 261.521,-22 273.67,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"280.892,-22 273.892,-25.1501 277.392,-22.5 273.892,-22.5001 273.892,-22.0001 273.892,-21.5001 277.392,-21.5 273.892,-18.8501 280.892,-22 280.892,-22\"/>\n",
"<text text-anchor=\"middle\" x=\"258.5\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M155.142,-22C166.115,-22 180.521,-22 192.67,-22\"/>\n",
"<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"199.892,-22 192.892,-25.1501 196.392,-22.5 192.892,-22.5001 192.892,-22.0001 192.892,-21.5001 196.392,-21.5 192.892,-18.8501 199.892,-22 199.892,-22\"/>\n",
"<text text-anchor=\"middle\" x=\"177.5\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9900> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"386pt\" height=\"320pt\"\n",
" viewBox=\"0.00 0.00 386.00 320.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 316)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-316 382,-316 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-283.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-105C2.79388,-105 17.1543,-105 30.6317,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-105 30.9419,-108.15 34.4419,-105 30.9419,-105 30.9419,-105 30.9419,-105 34.4419,-105 30.9418,-101.85 37.9419,-105 37.9419,-105\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</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\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.1418,-105C85.1153,-105 99.5214,-105 111.67,-105\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"118.892,-105 111.892,-108.15 115.392,-105 111.892,-105 111.892,-105 111.892,-105 115.392,-105 111.892,-101.85 118.892,-105 118.892,-105\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M129.969,-121.664C128.406,-131.625 130.75,-141 137,-141 141.688,-141 144.178,-135.727 144.471,-128.888\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"144.031,-121.664 147.601,-128.46 144.743,-125.127 144.955,-128.621 144.456,-128.651 143.957,-128.682 143.745,-125.188 141.312,-128.842 144.031,-121.664 144.031,-121.664\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">a | b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"360\" cy=\"-177\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-173.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M145.493,-120.895C158.318,-145.976 187.11,-193.848 228,-213 265.175,-230.412 312.353,-207.508 338.749,-191.059\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"344.681,-187.252 340.492,-193.684 341.736,-189.142 338.79,-191.033 338.79,-191.033 338.79,-191.033 341.736,-189.142 337.089,-188.382 344.681,-187.252 344.681,-187.252\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-222.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M155.109,-105C173.324,-105 202.31,-105 222.956,-105\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"230.149,-105 223.149,-108.15 226.649,-105.5 223.149,-105.5 223.149,-105 223.149,-104.5 226.649,-104.5 223.149,-101.85 230.149,-105 230.149,-105\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">4</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M151.868,-93.9814C171.203,-78.6193 206.342,-50.7007 228.218,-33.3198\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"233.744,-28.9291 230.223,-35.75 231.315,-31.4979 228.575,-33.6752 228.264,-33.2837 227.953,-32.8922 230.693,-30.7149 226.304,-30.8174 233.744,-28.9291 233.744,-28.9291\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M355.18,-194.41C354.28,-204.088 355.887,-213 360,-213 363.021,-213 364.69,-208.194 365.007,-201.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"364.82,-194.41 368.146,-201.328 364.908,-197.909 364.997,-201.408 364.997,-201.408 364.997,-201.408 364.908,-197.909 361.848,-201.487 364.82,-194.41 364.82,-194.41\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-231.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M352.733,-193.596C347.242,-214.863 349.664,-243 360,-243 369.246,-243 372.159,-220.485 368.741,-200.513\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"367.267,-193.596 371.807,-199.786 367.997,-197.019 368.726,-200.442 368.726,-200.442 368.726,-200.442 367.997,-197.019 365.645,-201.099 367.267,-193.596 367.267,-193.596\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-246.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M243.501,-122.41C242.568,-132.088 244.234,-141 248.5,-141 251.633,-141 253.363,-136.194 253.692,-129.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"253.499,-122.41 256.831,-129.325 253.59,-125.909 253.682,-129.408 253.682,-129.408 253.682,-129.408 253.59,-125.909 250.533,-129.49 253.499,-122.41 253.499,-122.41\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">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",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M240.963,-121.596C235.269,-142.863 237.781,-171 248.5,-171 258.088,-171 261.11,-148.485 257.564,-128.513\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"256.037,-121.596 260.622,-127.752 256.792,-125.014 257.546,-128.431 257.546,-128.431 257.546,-128.431 256.792,-125.014 254.471,-129.111 256.037,-121.596 256.037,-121.596\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-174.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\"><title>4&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M259.411,-32.3906C278.856,-60.6271 322.078,-123.387 344.648,-156.161\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"348.874,-162.297 342.309,-158.318 346.889,-159.414 344.904,-156.532 344.904,-156.532 344.904,-156.532 346.889,-159.414 347.498,-154.745 348.874,-162.297 348.874,-162.297\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-128.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M238.925,-33.5414C236.23,-43.9087 239.422,-54 248.5,-54 255.45,-54 258.95,-48.0847 258.999,-40.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"258.075,-33.5414 262.1,-40.0771 258.526,-37.0123 258.977,-40.4831 258.977,-40.4831 258.977,-40.4831 258.526,-37.0123 255.853,-40.889 258.075,-33.5414 258.075,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9a50> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"386pt\" height=\"354pt\"\n",
" viewBox=\"0.00 0.00 386.00 354.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 350)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-350 382,-350 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-331.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-331.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-331.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-317.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 4 -->\n",
"<g id=\"node2\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-153\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-149.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;4 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-153C2.79388,-153 17.1543,-153 30.6317,-153\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-153 30.9419,-156.15 34.4419,-153 30.9419,-153 30.9419,-153 30.9419,-153 34.4419,-153 30.9418,-149.85 37.9419,-153 37.9419,-153\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"137\" cy=\"-153\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-149.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;1 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>4&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.1418,-153C85.1153,-153 99.5214,-153 111.67,-153\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"118.892,-153 111.892,-156.15 115.392,-153 111.892,-153 111.892,-153 111.892,-153 115.392,-153 111.892,-149.85 118.892,-153 118.892,-153\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"360\" cy=\"-211\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-207.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M355.18,-228.41C354.28,-238.088 355.887,-247 360,-247 363.021,-247 364.69,-242.194 365.007,-235.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"364.82,-228.41 368.146,-235.328 364.908,-231.909 364.997,-235.408 364.997,-235.408 364.997,-235.408 364.908,-231.909 361.848,-235.487 364.82,-228.41 364.82,-228.41\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-250.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M352.328,-227.308C347.37,-244.96 349.928,-265 360,-265 368.735,-265 371.818,-249.93 369.25,-234.415\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"367.672,-227.308 372.264,-233.459 368.431,-230.725 369.189,-234.142 369.189,-234.142 369.189,-234.142 368.431,-230.725 366.114,-234.825 367.672,-227.308 367.672,-227.308\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-283.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-268.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M150.726,-165.117C167.085,-179.773 197.086,-203.64 228,-213 264.017,-223.905 308.195,-219.88 334.942,-215.667\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"342.003,-214.486 335.618,-218.748 338.551,-215.064 335.099,-215.641 335.099,-215.641 335.099,-215.641 338.551,-215.064 334.579,-212.534 342.003,-214.486 342.003,-214.486\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-222.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M129.969,-169.664C128.406,-179.625 130.75,-189 137,-189 141.688,-189 144.178,-183.727 144.471,-176.888\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"144.031,-169.664 147.601,-176.46 144.244,-173.158 144.456,-176.651 144.456,-176.651 144.456,-176.651 144.244,-173.158 141.312,-176.842 144.031,-169.664 144.031,-169.664\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-192.8\" font-family=\"Lato\" font-size=\"14.00\">a | b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"248.5\" cy=\"-153\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-149.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M155.109,-153C173.324,-153 202.31,-153 222.956,-153\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"230.149,-153 223.149,-156.15 226.649,-153 223.149,-153 223.149,-153 223.149,-153 226.649,-153 223.149,-149.85 230.149,-153 230.149,-153\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node6\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M149.102,-139.313C168.696,-115.156 209.453,-64.9068 231.876,-37.2621\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"236.369,-31.7237 234.405,-39.1445 234.164,-34.4419 231.959,-37.1602 231.959,-37.1602 231.959,-37.1602 234.164,-34.4419 229.513,-35.1759 236.369,-31.7237 236.369,-31.7237\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-113.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge11\" class=\"edge\"><title>3&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M264.726,-161.065C283.578,-171.05 315.818,-188.127 337.267,-199.489\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"343.551,-202.817 335.891,-202.324 340.458,-201.179 337.365,-199.54 337.365,-199.54 337.365,-199.54 340.458,-201.179 338.839,-196.757 343.551,-202.817 343.551,-202.817\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M238.925,-168.541C236.23,-178.909 239.422,-189 248.5,-189 255.45,-189 258.95,-183.085 258.999,-175.659\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"258.075,-168.541 262.1,-175.077 258.526,-172.012 258.977,-175.483 258.977,-175.483 258.977,-175.483 258.526,-172.012 255.853,-175.889 258.075,-168.541 258.075,-168.541\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-192.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M243.501,-35.4099C242.568,-45.0879 244.234,-54 248.5,-54 251.633,-54 253.363,-49.1936 253.692,-42.8073\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"253.499,-35.4099 256.831,-42.3252 253.59,-38.9087 253.682,-42.4075 253.682,-42.4075 253.682,-42.4075 253.59,-38.9087 250.533,-42.4899 253.499,-35.4099 253.499,-35.4099\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M240.544,-34.3083C235.403,-51.9604 238.055,-72 248.5,-72 257.558,-72 260.756,-56.9299 258.092,-41.4154\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"256.456,-34.3083 261.096,-40.4232 257.242,-37.7191 258.027,-41.1299 258.027,-41.1299 258.027,-41.1299 257.242,-37.7191 254.957,-41.8366 256.456,-34.3083 256.456,-34.3083\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9a50> >"
]
},
"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.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"386pt\" height=\"354pt\"\n",
" viewBox=\"0.00 0.00 386.00 354.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 350)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-350 382,-350 382,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"168\" y=\"-331.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"190\" y=\"-331.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-331.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
"<text text-anchor=\"start\" x=\"166\" y=\"-317.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 4 -->\n",
"<g id=\"node2\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-153\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-149.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;4 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-153C2.79388,-153 17.1543,-153 30.6317,-153\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-153 30.9419,-156.15 34.4419,-153 30.9419,-153 30.9419,-153 30.9419,-153 34.4419,-153 30.9418,-149.85 37.9419,-153 37.9419,-153\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node4\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"137\" cy=\"-153\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"137\" y=\"-149.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;1 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>4&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.1418,-153C85.1153,-153 99.5214,-153 111.67,-153\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"118.892,-153 111.892,-156.15 115.392,-153 111.892,-153 111.892,-153 111.892,-153 115.392,-153 111.892,-149.85 118.892,-153 118.892,-153\"/>\n",
"<text text-anchor=\"middle\" x=\"96.5\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"360\" cy=\"-211\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"360\" y=\"-207.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M355.18,-228.41C354.28,-238.088 355.887,-247 360,-247 363.021,-247 364.69,-242.194 365.007,-235.807\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"364.82,-228.41 368.146,-235.328 364.908,-231.909 364.997,-235.408 364.997,-235.408 364.997,-235.408 364.908,-231.909 361.848,-235.487 364.82,-228.41 364.82,-228.41\"/>\n",
"<text text-anchor=\"start\" x=\"355.5\" y=\"-250.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M352.328,-227.308C347.37,-244.96 349.928,-265 360,-265 368.735,-265 371.818,-249.93 369.25,-234.415\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"367.672,-227.308 372.264,-233.459 368.431,-230.725 369.189,-234.142 369.189,-234.142 369.189,-234.142 368.431,-230.725 366.114,-234.825 367.672,-227.308 367.672,-227.308\"/>\n",
"<text text-anchor=\"start\" x=\"353.5\" y=\"-283.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
"<text text-anchor=\"start\" x=\"352\" y=\"-268.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M150.726,-165.117C167.085,-179.773 197.086,-203.64 228,-213 264.017,-223.905 308.195,-219.88 334.942,-215.667\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"342.003,-214.486 335.618,-218.748 338.551,-215.064 335.099,-215.641 335.099,-215.641 335.099,-215.641 338.551,-215.064 334.579,-212.534 342.003,-214.486 342.003,-214.486\"/>\n",
"<text text-anchor=\"start\" x=\"228\" y=\"-222.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M129.969,-169.664C128.406,-179.625 130.75,-189 137,-189 141.688,-189 144.178,-183.727 144.471,-176.888\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"144.031,-169.664 147.601,-176.46 144.743,-173.127 144.955,-176.621 144.456,-176.651 143.957,-176.682 143.745,-173.188 141.312,-176.842 144.031,-169.664 144.031,-169.664\"/>\n",
"<text text-anchor=\"start\" x=\"123.5\" y=\"-192.8\" font-family=\"Lato\" font-size=\"14.00\">a | b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"248.5\" cy=\"-153\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248.5\" y=\"-149.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M155.109,-153C173.324,-153 202.31,-153 222.956,-153\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"230.149,-153 223.149,-156.15 226.649,-153.5 223.149,-153.5 223.149,-153 223.149,-152.5 226.649,-152.5 223.149,-149.85 230.149,-153 230.149,-153\"/>\n",
"<text text-anchor=\"start\" x=\"173\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node6\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" 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\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M149.102,-139.313C168.696,-115.156 209.453,-64.9068 231.876,-37.2621\"/>\n",
"<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"236.369,-31.7237 234.405,-39.1445 234.552,-34.7569 232.347,-37.4752 231.959,-37.1602 231.571,-36.8452 233.775,-34.127 229.513,-35.1759 236.369,-31.7237 236.369,-31.7237\"/>\n",
"<text text-anchor=\"start\" x=\"174.5\" y=\"-113.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge11\" class=\"edge\"><title>3&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M264.726,-161.065C283.578,-171.05 315.818,-188.127 337.267,-199.489\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"343.551,-202.817 335.891,-202.324 340.458,-201.179 337.365,-199.54 337.365,-199.54 337.365,-199.54 340.458,-201.179 338.839,-196.757 343.551,-202.817 343.551,-202.817\"/>\n",
"<text text-anchor=\"start\" x=\"287\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M238.925,-168.541C236.23,-178.909 239.422,-189 248.5,-189 255.45,-189 258.95,-183.085 258.999,-175.659\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"258.075,-168.541 262.1,-175.077 258.526,-172.012 258.977,-175.483 258.977,-175.483 258.977,-175.483 258.526,-172.012 255.853,-175.889 258.075,-168.541 258.075,-168.541\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-192.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M243.501,-35.4099C242.568,-45.0879 244.234,-54 248.5,-54 251.633,-54 253.363,-49.1936 253.692,-42.8073\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"253.499,-35.4099 256.831,-42.3252 253.59,-38.9087 253.682,-42.4075 253.682,-42.4075 253.682,-42.4075 253.59,-38.9087 250.533,-42.4899 253.499,-35.4099 253.499,-35.4099\"/>\n",
"<text text-anchor=\"start\" x=\"231.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M240.544,-34.3083C235.403,-51.9604 238.055,-72 248.5,-72 257.558,-72 260.756,-56.9299 258.092,-41.4154\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"256.456,-34.3083 261.096,-40.4232 257.242,-37.7191 258.027,-41.1299 258.027,-41.1299 258.027,-41.1299 257.242,-37.7191 254.957,-41.8366 256.456,-34.3083 256.456,-34.3083\"/>\n",
"<text text-anchor=\"start\" x=\"230\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"240.5\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f5e857a9a50> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/svg+xml": [
"<svg height=\"290pt\" viewBox=\"0.00 0.00 335.00 289.50\" width=\"335pt\" 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 285.5)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-285.5 331,-285.5 331,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"142.5\" y=\"-267.3\">Inf(</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"164.5\" y=\"-267.3\">⓿</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"180.5\" y=\"-267.3\">)</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"140.5\" y=\"-253.3\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-153\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"51.5\" y=\"-149.3\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;0</title>\n",
"<path d=\"M1.15491,-153C2.79388,-153 17.1543,-153 30.6317,-153\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"37.9419,-153 30.9419,-156.15 34.4419,-153 30.9419,-153 30.9419,-153 30.9419,-153 34.4419,-153 30.9418,-149.85 37.9419,-153 37.9419,-153\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\"><title>1</title>\n",
"<ellipse cx=\"137\" cy=\"-153\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"137\" y=\"-149.3\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;1</title>\n",
"<path d=\"M74.1418,-153C85.1153,-153 99.5214,-153 111.67,-153\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"118.892,-153 111.892,-156.15 115.392,-153 111.892,-153 111.892,-153 111.892,-153 115.392,-153 111.892,-149.85 118.892,-153 118.892,-153\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"96.5\" y=\"-156.8\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>1-&gt;1</title>\n",
"<path d=\"M129.969,-169.664C128.406,-179.625 130.75,-189 137,-189 141.688,-189 144.178,-183.727 144.471,-176.888\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"144.031,-169.664 147.601,-176.46 144.743,-173.127 144.955,-176.621 144.456,-176.651 143.957,-176.682 143.745,-173.188 141.312,-176.842 144.031,-169.664 144.031,-169.664\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"123.5\" y=\"-192.8\">a | b</text>\n",
"</g>\n",
"<!-- u1 -->\n",
"<g class=\"node\" id=\"node4\"><title>u1</title>\n",
"<polygon fill=\"#ffffaa\" points=\"259,-245.5 233,-245.5 233,-222.5 259,-222.5 259,-245.5\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"246\" y=\"-230.3\">...</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;u1 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>1-&gt;u1</title>\n",
"<path d=\"M151.988,-163.589C171.271,-178.187 206.026,-204.497 227.157,-220.493\" fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\"/>\n",
"<polygon fill=\"black\" points=\"232.989,-224.907 225.506,-223.194 230.198,-222.795 227.408,-220.682 227.408,-220.682 227.408,-220.682 230.198,-222.795 229.309,-218.171 232.989,-224.907 232.989,-224.907\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node5\"><title>2</title>\n",
"<ellipse cx=\"246\" cy=\"-153\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"246\" y=\"-149.3\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>1-&gt;2</title>\n",
"<path d=\"M155.191,-153C172.897,-153 200.648,-153 220.616,-153\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"227.851,-153 220.851,-156.15 224.351,-153.5 220.851,-153.5 220.851,-153 220.851,-152.5 224.351,-152.5 220.851,-149.85 227.851,-153 227.851,-153\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"173\" y=\"-156.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node6\"><title>3</title>\n",
"<ellipse cx=\"246\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"246\" y=\"-14.3\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge6\"><title>1-&gt;3</title>\n",
"<path d=\"M148.849,-139.313C167.995,-115.156 207.822,-64.9068 229.733,-37.2621\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"234.123,-31.7237 232.243,-39.1662 232.341,-34.7772 230.166,-37.5201 229.775,-37.2095 229.383,-36.899 231.557,-34.156 227.306,-35.2529 234.123,-31.7237 234.123,-31.7237\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"174.5\" y=\"-109.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge8\"><title>2-&gt;2</title>\n",
"<path d=\"M239.621,-170.037C238.319,-179.858 240.445,-189 246,-189 250.166,-189 252.404,-183.858 252.713,-177.143\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"252.379,-170.037 255.854,-176.882 252.543,-173.533 252.708,-177.03 252.708,-177.03 252.708,-177.03 252.543,-173.533 249.561,-177.177 252.379,-170.037 252.379,-170.037\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"229\" y=\"-192.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- u2 -->\n",
"<g class=\"node\" id=\"node7\"><title>u2</title>\n",
"<polygon fill=\"#ffffaa\" points=\"327,-164.5 301,-164.5 301,-141.5 327,-141.5 327,-164.5\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"314\" y=\"-149.3\">...</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;u2 -->\n",
"<g class=\"edge\" id=\"edge7\"><title>2-&gt;u2</title>\n",
"<path d=\"M264.341,-153C273.382,-153 284.464,-153 293.767,-153\" fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\"/>\n",
"<polygon fill=\"black\" points=\"300.774,-153 293.774,-156.15 297.274,-153 293.774,-153 293.774,-153 293.774,-153 297.274,-153 293.774,-149.85 300.774,-153 300.774,-153\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge9\"><title>3-&gt;3</title>\n",
"<path d=\"M242.764,-35.7817C242.214,-45.3149 243.293,-54 246,-54 247.988,-54 249.098,-49.3161 249.329,-43.0521\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"249.236,-35.7817 252.476,-42.7406 249.281,-39.2814 249.326,-42.7812 249.326,-42.7812 249.326,-42.7812 249.281,-39.2814 246.176,-42.8217 249.236,-35.7817 249.236,-35.7817\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"229\" y=\"-57.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge10\"><title>3-&gt;3</title>\n",
"<path d=\"M240.684,-35.4203C237.654,-52.791 239.426,-72 246,-72 251.701,-72 253.791,-57.5545 252.269,-42.3894\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"251.316,-35.4203 255.386,-41.9288 251.79,-38.888 252.265,-42.3557 252.265,-42.3557 252.265,-42.3557 251.79,-38.888 249.144,-42.7826 251.316,-35.4203 251.316,-35.4203\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"227.5\" y=\"-90.8\">a &amp; !b</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"238\" y=\"-75.8\">⓿</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",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-109 222,-109 222,4 -4,4\" stroke=\"none\"/>\n",
"<text 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 font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"126\" y=\"-90.8\">)</text>\n",
"<text 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\"><title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"51.5\" y=\"-14.3\">4</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;0</title>\n",
"<path d=\"M1.15491,-18C2.79388,-18 17.1543,-18 30.6317,-18\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"37.9419,-18 30.9419,-21.1501 34.4419,-18 30.9419,-18.0001 30.9419,-18.0001 30.9419,-18.0001 34.4419,-18 30.9418,-14.8501 37.9419,-18 37.9419,-18\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\"><title>1</title>\n",
"<ellipse cx=\"137\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"137\" y=\"-14.3\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;1</title>\n",
"<path d=\"M74.1418,-18C85.1153,-18 99.5214,-18 111.67,-18\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"118.892,-18 111.892,-21.1501 115.392,-18 111.892,-18.0001 111.892,-18.0001 111.892,-18.0001 115.392,-18 111.892,-14.8501 118.892,-18 118.892,-18\" stroke=\"black\"/>\n",
"<text 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\"><title>1-&gt;1</title>\n",
"<path d=\"M130.621,-35.0373C129.319,-44.8579 131.445,-54 137,-54 141.166,-54 143.404,-48.8576 143.713,-42.1433\" fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<polygon fill=\"#33a02c\" points=\"143.379,-35.0373 146.854,-41.8818 144.043,-38.51 144.207,-42.0062 143.708,-42.0296 143.208,-42.0531 143.044,-38.5569 140.561,-42.1774 143.379,-35.0373 143.379,-35.0373\" stroke=\"#33a02c\" stroke-width=\"2\"/>\n",
"<text 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\"><title>u1</title>\n",
"<polygon fill=\"#ffffaa\" points=\"218,-29.5 192,-29.5 192,-6.5 218,-6.5 218,-29.5\" stroke=\"none\"/>\n",
"<text 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\"><title>1-&gt;u1</title>\n",
"<path d=\"M155.341,-18C164.382,-18 175.464,-18 184.767,-18\" fill=\"none\" stroke=\"black\" stroke-dasharray=\"5,2\"/>\n",
"<polygon fill=\"black\" points=\"191.774,-18 184.774,-21.1501 188.274,-18 184.774,-18.0001 184.774,-18.0001 184.774,-18.0001 188.274,-18 184.774,-14.8501 191.774,-18 191.774,-18\" stroke=\"black\"/>\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=\"360pt\" viewBox=\"0.00 0.00 652.06 360.00\" width=\"652pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(0.882353 0.882353) rotate(0) translate(4 404)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-404 735,-404 735,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"313.5\" y=\"-385.8\">Fin(</text>\n",
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"338.5\" y=\"-385.8\">⓿</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"354.5\" y=\"-385.8\">) &amp; Inf(</text>\n",
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"397.5\" y=\"-385.8\">❶</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"413.5\" y=\"-385.8\">)</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"336.5\" y=\"-371.8\">[Rabin 1]</text>\n",
"<g class=\"cluster\" id=\"clust1\"><title>cluster_0</title>\n",
"<polygon fill=\"none\" points=\"470,-154 470,-356 723,-356 723,-154 470,-154\" stroke=\"green\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust2\"><title>cluster_1</title>\n",
"<polygon fill=\"none\" points=\"391,-152 391,-204 443,-204 443,-152 391,-152\" stroke=\"black\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust3\"><title>cluster_2</title>\n",
"<polygon fill=\"none\" points=\"139,-181 139,-283 327.5,-283 327.5,-181 139,-181\" stroke=\"green\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust4\"><title>cluster_3</title>\n",
"<polygon fill=\"none\" points=\"139,-8 139,-108 191,-108 191,-8 139,-8\" stroke=\"green\"/>\n",
"</g>\n",
"<g class=\"cluster\" id=\"clust5\"><title>cluster_4</title>\n",
"<polygon fill=\"none\" points=\"30,-102 30,-154 82,-154 82,-102 30,-102\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-128\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text 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\"><title>I-&gt;0</title>\n",
"<path d=\"M1.15491,-128C2.79388,-128 17.1543,-128 30.6317,-128\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"37.9419,-128 30.9419,-131.15 34.4419,-128 30.9419,-128 30.9419,-128 30.9419,-128 34.4419,-128 30.9418,-124.85 37.9419,-128 37.9419,-128\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node6\"><title>1</title>\n",
"<ellipse cx=\"417\" cy=\"-178\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"417\" y=\"-174.3\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;1</title>\n",
"<path d=\"M74.3153,-130.412C132.846,-138.564 323.456,-165.111 391.546,-174.594\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"398.858,-175.613 391.491,-177.767 395.392,-175.13 391.925,-174.647 391.925,-174.647 391.925,-174.647 395.392,-175.13 392.36,-171.527 398.858,-175.613 398.858,-175.613\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"211.5\" y=\"-160.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node7\"><title>2</title>\n",
"<ellipse cx=\"165\" cy=\"-207\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#1f78b4\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"165\" y=\"-203.3\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>0-&gt;2</title>\n",
"<path d=\"M70.9884,-138.328C89.7326,-152.167 123.097,-176.801 144.355,-192.496\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"150.008,-196.67 142.506,-195.046 147.192,-194.591 144.377,-192.512 144.377,-192.512 144.377,-192.512 147.192,-194.591 146.248,-189.978 150.008,-196.67 150.008,-196.67\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-183.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node9\"><title>3</title>\n",
"<ellipse cx=\"165\" cy=\"-34\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text 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\"><title>0-&gt;3</title>\n",
"<path d=\"M70.1203,-116.474C88.9719,-99.9126 123.815,-69.3025 145.341,-50.3916\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"150.772,-45.6205 147.592,-52.607 148.143,-47.9305 145.513,-50.2405 145.513,-50.2405 145.513,-50.2405 148.143,-47.9305 143.434,-47.874 150.772,-45.6205 150.772,-45.6205\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"107\" y=\"-98.8\">a</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node3\"><title>4</title>\n",
"<ellipse cx=\"496\" cy=\"-237\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#ff4da0\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"496\" y=\"-233.3\">4</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g class=\"node\" id=\"node4\"><title>6</title>\n",
"<ellipse cx=\"584\" cy=\"-231\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#ff4da0\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"584\" y=\"-227.3\">6</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge11\"><title>4-&gt;6</title>\n",
"<path d=\"M511.717,-227.458C517.75,-224.083 524.96,-220.704 532,-219 541.348,-216.737 551.674,-218.391 560.575,-221.111\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"567.363,-223.468 559.717,-224.148 564.057,-222.32 560.75,-221.172 560.75,-221.172 560.75,-221.172 564.057,-222.32 561.783,-218.196 567.363,-223.468 567.363,-223.468\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"534.5\" y=\"-222.8\">!c</text>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g class=\"node\" id=\"node5\"><title>7</title>\n",
"<ellipse cx=\"697\" cy=\"-236\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#ff4da0\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"697\" y=\"-232.3\">7</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge12\"><title>4-&gt;7</title>\n",
"<path d=\"M509.433,-224.76C522.338,-212.99 543.722,-195.987 566,-189 605.856,-176.501 651.607,-202.722 676.815,-220.791\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"682.468,-224.955 674.964,-223.34 679.65,-222.879 676.832,-220.804 676.832,-220.804 676.832,-220.804 679.65,-222.879 678.701,-218.267 682.468,-224.955 682.468,-224.955\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"580.5\" y=\"-192.8\">c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge16\"><title>6-&gt;4</title>\n",
"<path d=\"M565.917,-232.556C560.221,-233.051 553.839,-233.578 548,-234 539.242,-234.633 529.631,-235.225 521.136,-235.713\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"514.007,-236.114 520.82,-232.576 517.502,-235.917 520.996,-235.721 520.996,-235.721 520.996,-235.721 517.502,-235.917 521.173,-238.866 514.007,-236.114 514.007,-236.114\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"533.5\" y=\"-254.8\">!b</text>\n",
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"532\" y=\"-239.8\">❶</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge17\"><title>6-&gt;6</title>\n",
"<path d=\"M576.332,-247.29C574.483,-257.389 577.039,-267 584,-267 589.221,-267 591.964,-261.594 592.229,-254.63\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"591.668,-247.29 595.342,-254.03 591.935,-250.78 592.201,-254.27 592.201,-254.27 592.201,-254.27 591.935,-250.78 589.06,-254.51 591.668,-247.29 591.668,-247.29\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"565.5\" y=\"-270.8\">b &amp; !c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge18\"><title>6-&gt;7</title>\n",
"<path d=\"M600.694,-223.816C606.614,-221.471 613.493,-219.169 620,-218 637.935,-214.777 643.289,-213.713 661,-218 665.73,-219.145 670.537,-221.046 675.012,-223.194\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"681.283,-226.458 673.62,-226.02 678.178,-224.842 675.074,-223.226 675.074,-223.226 675.074,-223.226 678.178,-224.842 676.528,-220.432 681.283,-226.458 681.283,-226.458\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"623.5\" y=\"-221.8\">b &amp; c</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge19\"><title>7-&gt;4</title>\n",
"<path d=\"M682.418,-247.131C665.032,-260.589 633.389,-282.492 602,-291 570.65,-299.498 557.766,-289.777 532,-270 525.938,-265.347 519.738,-259.805 514.274,-254.603\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"509.086,-249.56 516.301,-252.181 511.596,-252 514.105,-254.439 514.105,-254.439 514.105,-254.439 511.596,-252 511.91,-256.698 509.086,-249.56 509.086,-249.56\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"579.5\" y=\"-313.8\">b</text>\n",
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"576\" y=\"-298.8\">❶</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge20\"><title>7-&gt;6</title>\n",
"<path d=\"M678.791,-235.407C663.385,-234.856 640.18,-233.975 620,-233 616.535,-232.833 612.878,-232.641 609.286,-232.443\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"602.087,-232.037 609.253,-229.287 605.581,-232.234 609.076,-232.431 609.076,-232.431 609.076,-232.431 605.581,-232.234 608.898,-235.576 602.087,-232.037 602.087,-232.037\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"620\" y=\"-238.8\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 7&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge21\"><title>7-&gt;7</title>\n",
"<path d=\"M687.425,-251.541C684.73,-261.909 687.922,-272 697,-272 703.95,-272 707.45,-266.085 707.499,-258.659\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"706.575,-251.541 710.6,-258.077 707.026,-255.012 707.477,-258.483 707.477,-258.483 707.477,-258.483 707.026,-255.012 704.353,-258.889 706.575,-251.541 706.575,-251.541\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"678.5\" y=\"-275.8\">!b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>1-&gt;4</title>\n",
"<path d=\"M432.184,-187.752C440.412,-193.503 450.912,-201.003 460,-208 465.419,-212.171 471.179,-216.842 476.429,-221.195\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"481.886,-225.756 474.495,-223.683 479.2,-223.511 476.515,-221.267 476.515,-221.267 476.515,-221.267 479.2,-223.511 478.535,-218.85 481.886,-225.756 481.886,-225.756\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"453\" y=\"-211.8\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge8\"><title>2-&gt;4</title>\n",
"<path d=\"M170.947,-224.143C176.004,-238.172 185.373,-257.1 201,-266 290.786,-317.133 421.325,-269.831 472.875,-247.352\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"479.33,-244.486 474.211,-250.206 476.132,-245.906 472.933,-247.327 472.933,-247.327 472.933,-247.327 476.132,-245.906 471.654,-244.448 479.33,-244.486 479.33,-244.486\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"357\" y=\"-289.8\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge6\"><title>2-&gt;1</title>\n",
"<path d=\"M182.665,-202.832C188.445,-201.482 194.984,-200.061 201,-199 269.386,-186.942 351.319,-181.341 391.429,-179.164\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"398.877,-178.774 392.052,-182.286 395.382,-178.957 391.887,-179.14 391.887,-179.14 391.887,-179.14 395.382,-178.957 391.722,-175.995 398.877,-178.774 398.877,-178.774\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"281\" y=\"-191.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge7\"><title>2-&gt;2</title>\n",
"<path d=\"M155.767,-222.541C153.169,-232.909 156.246,-243 165,-243 171.702,-243 175.077,-237.085 175.124,-229.659\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"174.233,-222.541 178.229,-229.095 174.668,-226.014 175.103,-229.487 175.103,-229.487 175.103,-229.487 174.668,-226.014 171.977,-229.879 174.233,-222.541 174.233,-222.541\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"132\" y=\"-246.8\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node8\"><title>5</title>\n",
"<ellipse cx=\"301.5\" cy=\"-231\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#1f78b4\" stroke-width=\"2\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"301.5\" y=\"-227.3\">5</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge9\"><title>2-&gt;5</title>\n",
"<path d=\"M182.867,-204.499C202.533,-202.189 235.811,-200.175 263,-208 269.119,-209.761 275.23,-212.815 280.689,-216.132\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"286.76,-220.086 279.175,-218.905 283.827,-218.176 280.894,-216.266 280.894,-216.266 280.894,-216.266 283.827,-218.176 282.613,-213.626 286.76,-220.086 286.76,-220.086\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"201\" y=\"-211.8\">!a &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge15\"><title>5-&gt;4</title>\n",
"<path d=\"M319.583,-231.532C353.83,-232.6 430.982,-235.005 470.564,-236.238\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"477.955,-236.469 470.86,-239.399 474.457,-236.36 470.959,-236.251 470.959,-236.251 470.959,-236.251 474.457,-236.36 471.057,-233.102 477.955,-236.469 477.955,-236.469\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"413.5\" y=\"-239.8\">a</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge13\"><title>5-&gt;1</title>\n",
"<path d=\"M316.767,-221.438C323.631,-217.051 332.074,-211.957 340,-208 357.279,-199.373 377.675,-191.437 392.986,-185.897\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"399.633,-183.526 394.098,-188.845 396.336,-184.702 393.039,-185.878 393.039,-185.878 393.039,-185.878 396.336,-184.702 391.981,-182.911 399.633,-183.526 399.633,-183.526\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"340\" y=\"-211.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge14\"><title>5-&gt;2</title>\n",
"<path d=\"M283.3,-231.412C263.223,-231.485 229.177,-230.33 201,-223 196.587,-221.852 192.039,-220.179 187.742,-218.342\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"181.252,-215.373 188.928,-215.421 184.435,-216.829 187.618,-218.285 187.618,-218.285 187.618,-218.285 184.435,-216.829 186.307,-221.15 181.252,-215.373 181.252,-215.373\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"213.5\" y=\"-250.8\">!a &amp; b</text>\n",
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"224\" y=\"-235.8\">❶</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge10\"><title>3-&gt;3</title>\n",
"<path d=\"M155.767,-49.5414C153.169,-59.9087 156.246,-70 165,-70 171.702,-70 175.077,-64.0847 175.124,-56.6591\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"174.233,-49.5414 178.229,-56.0955 174.668,-53.0143 175.103,-56.4871 175.103,-56.4871 175.103,-56.4871 174.668,-53.0143 171.977,-56.8788 174.233,-49.5414 174.233,-49.5414\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"160.5\" y=\"-88.8\">1</text>\n",
"<text fill=\"#ff4da0\" 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.4+"
}
},
"nbformat": 4,
"nbformat_minor": 2
}