* spot/twa/twagraph.cc, spot/twa/twagraph.hh (format_state): Honor the state-names and product-states properties. * tests/python/highlighting.ipynb: Adjust.
2388 lines
165 KiB
Text
2388 lines
165 KiB
Text
{
|
|
"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.5.3"
|
|
},
|
|
"name": ""
|
|
},
|
|
"nbformat": 3,
|
|
"nbformat_minor": 0,
|
|
"worksheets": [
|
|
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"import spot\n",
|
|
"spot.setup()\n",
|
|
"from IPython.display import display"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"prompt_number": 1
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"a = spot.translate('a U b U c')"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"prompt_number": 2
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The `#` option of `print_dot()` can be used to display the internal number of each transition "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"a.show('.#')"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 3,
|
|
"svg": [
|
|
"<svg height=\"139pt\" viewBox=\"0.00 0.00 307.00 139.00\" 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 135)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-135 303,-135 303,4 -4,4\" stroke=\"none\"/>\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->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->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->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->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 & !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->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>2->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->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->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 & b & !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->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->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->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>1->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->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->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 & !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": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 3
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"a.highlight_edges([2, 4, 5], 1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 4,
|
|
"svg": [
|
|
"<?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=\"139pt\"\n",
|
|
" viewBox=\"0.00 0.00 307.00 139.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 135)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-135 303,-135 303,4 -4,4\"/>\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->2 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>2->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 & !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->0 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f17cb0\" 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=\"#f17cb0\" stroke=\"#f17cb0\" 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->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f17cb0\" stroke-width=\"2\" d=\"M72.8671,-69.2332C97.0256,-58.9303 143.124,-39.2707 170.658,-27.5281\"/>\n",
|
|
"<polygon fill=\"#f17cb0\" stroke=\"#f17cb0\" 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 & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f17cb0\" stroke-width=\"2\" d=\"M209.109,-28.1028C221.166,-36.7361 238.75,-49.3269 252.863,-59.4329\"/>\n",
|
|
"<polygon fill=\"#f17cb0\" stroke=\"#f17cb0\" 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->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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 & !c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c67b690> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 4
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"a.highlight_edge(6, 2).highlight_states((0, 1), 0)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 5,
|
|
"svg": [
|
|
"<?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=\"139pt\"\n",
|
|
" viewBox=\"0.00 0.00 307.00 139.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 135)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-135 303,-135 303,4 -4,4\"/>\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->2 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#faa43a\" 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=\"#faa43a\" stroke=\"#faa43a\" 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 & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#5da5da\" stroke-width=\"2\" cx=\"277\" cy=\"-76\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<ellipse fill=\"none\" stroke=\"#5da5da\" 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->0 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f17cb0\" 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=\"#f17cb0\" stroke=\"#f17cb0\" 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=\"#5da5da\" 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->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f17cb0\" stroke-width=\"2\" d=\"M72.8671,-69.2332C97.0256,-58.9303 143.124,-39.2707 170.658,-27.5281\"/>\n",
|
|
"<polygon fill=\"#f17cb0\" stroke=\"#f17cb0\" 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 & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f17cb0\" stroke-width=\"2\" d=\"M209.109,-28.1028C221.166,-36.7361 238.75,-49.3269 252.863,-59.4329\"/>\n",
|
|
"<polygon fill=\"#f17cb0\" stroke=\"#f17cb0\" 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->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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 & !c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.twa; proxy of <Swig Object of type 'std::shared_ptr< spot::twa > *' at 0x7f304c60b2d0> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"print(a.to_str('HOA', '1'))\n",
|
|
"print()\n",
|
|
"print(a.to_str('HOA', '1.1'))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"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 0\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"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 6
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"b = spot.translate('X (F(Ga <-> b) & GF!b)'); b"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 7,
|
|
"svg": [
|
|
"<?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=\"284pt\"\n",
|
|
" viewBox=\"0.00 0.00 386.00 284.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 280)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-280 382,-280 382,4 -4,4\"/>\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->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->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->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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 & !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->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->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 & 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->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->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 & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>2->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=\"355.5\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\"><title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M352.328,-193.308C347.37,-210.96 349.928,-231 360,-231 368.735,-231 371.818,-215.93 369.25,-200.415\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"367.672,-193.308 372.264,-199.459 368.431,-196.725 369.189,-200.142 369.189,-200.142 369.189,-200.142 368.431,-196.725 366.114,-200.825 367.672,-193.308 367.672,-193.308\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"353.5\" y=\"-249.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"352\" y=\"-234.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\"><title>3->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=\"231.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\"><title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M240.544,-121.308C235.403,-138.96 238.055,-159 248.5,-159 257.558,-159 260.756,-143.93 258.092,-128.415\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"256.456,-121.308 261.096,-127.423 257.242,-124.719 258.027,-128.13 258.027,-128.13 258.027,-128.13 257.242,-124.719 254.957,-128.837 256.456,-121.308 256.456,-121.308\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-162.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\"><title>4->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\"><title>4->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 & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b150> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 7
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"r = b.accepting_run(); r"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 8,
|
|
"text": [
|
|
"Prefix:\n",
|
|
" 0\n",
|
|
" | 1\n",
|
|
" 1\n",
|
|
" | !a & !b\n",
|
|
"Cycle:\n",
|
|
" 2\n",
|
|
" | !b\t{0}"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 8
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"r.highlight(5) # the parameter is a color number"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"prompt_number": 9
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The call of `highlight(5)` on the accepting run `r` modified the original automaton `b`:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"b"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 10,
|
|
"svg": [
|
|
"<?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=\"284pt\"\n",
|
|
" viewBox=\"0.00 0.00 386.00 284.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 280)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-280 382,-280 382,4 -4,4\"/>\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->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M74.1418,-105C85.1153,-105 99.5214,-105 111.67,-105\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" 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->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->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->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" 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=\"#f15854\" stroke=\"#f15854\" 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 & !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->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->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 & 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->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->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 & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>2->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=\"355.5\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\"><title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M352.328,-193.308C347.37,-210.96 349.928,-231 360,-231 368.735,-231 371.818,-215.93 369.25,-200.415\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" stroke-width=\"2\" points=\"367.672,-193.308 372.264,-199.459 368.919,-196.617 369.677,-200.034 369.189,-200.142 368.701,-200.25 367.943,-196.833 366.114,-200.825 367.672,-193.308 367.672,-193.308\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"353.5\" y=\"-249.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"352\" y=\"-234.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\"><title>3->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=\"231.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\"><title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M240.544,-121.308C235.403,-138.96 238.055,-159 248.5,-159 257.558,-159 260.756,-143.93 258.092,-128.415\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"256.456,-121.308 261.096,-127.423 257.242,-124.719 258.027,-128.13 258.027,-128.13 258.027,-128.13 257.242,-124.719 254.957,-128.837 256.456,-121.308 256.456,-121.308\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-162.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\"><title>4->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\"><title>4->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 & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b150> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 10
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"left = spot.translate('a U b')\n",
|
|
"right = spot.translate('GFa')\n",
|
|
"display(left, right)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"85pt\"\n",
|
|
" viewBox=\"0.00 0.00 171.00 85.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 81)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-81 167,-81 167,4 -4,4\"/>\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->1 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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 & !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->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->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->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b870> >"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"125pt\"\n",
|
|
" viewBox=\"0.00 0.00 82.00 125.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 121)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-121 78,-121 78,4 -4,4\"/>\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->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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=\"52.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M50.9906,-35.5771C47.5451,-56.718 49.2148,-84 56,-84 62.043,-84 64.0285,-62.3596 61.9564,-42.6907\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"61.0094,-35.5771 65.0556,-42.1002 61.4713,-39.0465 61.9332,-42.5159 61.9332,-42.5159 61.9332,-42.5159 61.4713,-39.0465 58.8107,-42.9316 61.0094,-35.5771 61.0094,-35.5771\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"50.5\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b840> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 11
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"prod = spot.product(left, right); prod"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 12,
|
|
"svg": [
|
|
"<?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=\"141pt\"\n",
|
|
" viewBox=\"0.00 0.00 227.00 141.50\" 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 137.496)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-137.496 223,-137.496 223,4 -4,4\"/>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"65\" cy=\"-21.4964\" rx=\"27\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"65\" y=\"-17.7964\" font-family=\"Lato\" font-size=\"14.00\">1,0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.04566,-21.4964C1.94863,-21.4964 16.101,-21.4964 30.7579,-21.4964\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9378,-21.4964 30.9378,-24.6465 34.4378,-21.4964 30.9378,-21.4965 30.9378,-21.4965 30.9378,-21.4965 34.4378,-21.4964 30.9378,-18.3465 37.9378,-21.4964 37.9378,-21.4964\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M57.1448,-38.9063C55.6785,-48.5843 58.2969,-57.4964 65,-57.4964 69.9226,-57.4964 72.6423,-52.69 73.1591,-46.3036\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"72.8552,-38.9063 76.2899,-45.771 72.9989,-42.4033 73.1426,-45.9004 73.1426,-45.9004 73.1426,-45.9004 72.9989,-42.4033 69.9953,-46.0297 72.8552,-38.9063 72.8552,-38.9063\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"46.5\" y=\"-76.2964\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"57\" y=\"-61.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"192\" cy=\"-21.4964\" rx=\"27\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"192\" y=\"-17.7964\" font-family=\"Lato\" font-size=\"14.00\">0,0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M92.2041,-21.4964C111.288,-21.4964 137.281,-21.4964 157.815,-21.4964\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"164.83,-21.4964 157.83,-24.6465 161.33,-21.4964 157.83,-21.4965 157.83,-21.4965 157.83,-21.4965 161.33,-21.4964 157.83,-18.3465 164.83,-21.4964 164.83,-21.4964\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"111.5\" y=\"-40.2964\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"120.5\" y=\"-25.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.9111,-10.4028C94.0344,-7.18923 102.177,-4.11316 110,-2.49636 126.104,0.83212 130.896,0.83212 147,-2.49636 152.5,-3.63317 158.159,-5.49143 163.51,-7.61164\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"170.089,-10.4028 162.415,-10.5685 166.867,-9.03575 163.645,-7.66873 163.645,-7.66873 163.645,-7.66873 166.867,-9.03575 164.875,-4.76892 170.089,-10.4028 170.089,-10.4028\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"110\" y=\"-6.29636\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M186.427,-39.2781C185.48,-48.8113 187.338,-57.4964 192,-57.4964 195.424,-57.4964 197.335,-52.8125 197.734,-46.5485\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"197.573,-39.2781 200.877,-46.2066 197.65,-42.7772 197.728,-46.2764 197.728,-46.2764 197.728,-46.2764 197.65,-42.7772 194.579,-46.3462 197.573,-39.2781 197.573,-39.2781\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"188.5\" y=\"-75.2964\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"<text text-anchor=\"start\" x=\"176\" y=\"-61.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"<text text-anchor=\"start\" x=\"192\" y=\"-61.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M183.373,-38.7697C177.439,-59.3511 180.314,-85.4964 192,-85.4964 202.407,-85.4964 205.827,-64.7576 202.258,-45.6812\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"200.627,-38.7697 205.301,-44.8591 201.431,-42.1762 202.235,-45.5826 202.235,-45.5826 202.235,-45.5826 201.431,-42.1762 199.169,-46.3061 200.627,-38.7697 200.627,-38.7697\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"186.5\" y=\"-104.296\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"<text text-anchor=\"start\" x=\"184\" y=\"-89.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b8a0> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 12
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"run = prod.accepting_run(); run"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 13,
|
|
"text": [
|
|
"Prefix:\n",
|
|
" 1,0\n",
|
|
" | a & b\t{1}\n",
|
|
"Cycle:\n",
|
|
" 0,0\n",
|
|
" | a\t{0,1}"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 13
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"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)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"prompt_number": 14
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"display(prod, left, right)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"141pt\"\n",
|
|
" viewBox=\"0.00 0.00 227.00 141.50\" 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 137.496)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-137.496 223,-137.496 223,4 -4,4\"/>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"65\" cy=\"-21.4964\" rx=\"27\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"65\" y=\"-17.7964\" font-family=\"Lato\" font-size=\"14.00\">1,0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.04566,-21.4964C1.94863,-21.4964 16.101,-21.4964 30.7579,-21.4964\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9378,-21.4964 30.9378,-24.6465 34.4378,-21.4964 30.9378,-21.4965 30.9378,-21.4965 30.9378,-21.4965 34.4378,-21.4964 30.9378,-18.3465 37.9378,-21.4964 37.9378,-21.4964\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M57.1448,-38.9063C55.6785,-48.5843 58.2969,-57.4964 65,-57.4964 69.9226,-57.4964 72.6423,-52.69 73.1591,-46.3036\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"72.8552,-38.9063 76.2899,-45.771 72.9989,-42.4033 73.1426,-45.9004 73.1426,-45.9004 73.1426,-45.9004 72.9989,-42.4033 69.9953,-46.0297 72.8552,-38.9063 72.8552,-38.9063\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"46.5\" y=\"-76.2964\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"57\" y=\"-61.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"192\" cy=\"-21.4964\" rx=\"27\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"192\" y=\"-17.7964\" font-family=\"Lato\" font-size=\"14.00\">0,0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M92.2041,-21.4964C111.288,-21.4964 137.281,-21.4964 157.815,-21.4964\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" stroke-width=\"2\" points=\"164.83,-21.4964 157.83,-24.6465 161.33,-21.9964 157.83,-21.9965 157.83,-21.4965 157.83,-20.9965 161.33,-20.9964 157.83,-18.3465 164.83,-21.4964 164.83,-21.4964\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"111.5\" y=\"-40.2964\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"120.5\" y=\"-25.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.9111,-10.4028C94.0344,-7.18923 102.177,-4.11316 110,-2.49636 126.104,0.83212 130.896,0.83212 147,-2.49636 152.5,-3.63317 158.159,-5.49143 163.51,-7.61164\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"170.089,-10.4028 162.415,-10.5685 166.867,-9.03575 163.645,-7.66873 163.645,-7.66873 163.645,-7.66873 166.867,-9.03575 164.875,-4.76892 170.089,-10.4028 170.089,-10.4028\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"110\" y=\"-6.29636\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M186.427,-39.2781C185.48,-48.8113 187.338,-57.4964 192,-57.4964 195.424,-57.4964 197.335,-52.8125 197.734,-46.5485\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" stroke-width=\"2\" points=\"197.573,-39.2781 200.877,-46.2066 198.15,-42.7662 198.228,-46.2653 197.728,-46.2764 197.228,-46.2875 197.15,-42.7883 194.579,-46.3462 197.573,-39.2781 197.573,-39.2781\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"188.5\" y=\"-75.2964\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"<text text-anchor=\"start\" x=\"176\" y=\"-61.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"<text text-anchor=\"start\" x=\"192\" y=\"-61.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M183.373,-38.7697C177.439,-59.3511 180.314,-85.4964 192,-85.4964 202.407,-85.4964 205.827,-64.7576 202.258,-45.6812\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"200.627,-38.7697 205.301,-44.8591 201.431,-42.1762 202.235,-45.5826 202.235,-45.5826 202.235,-45.5826 201.431,-42.1762 199.169,-46.3061 200.627,-38.7697 200.627,-38.7697\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"186.5\" y=\"-104.296\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"<text text-anchor=\"start\" x=\"184\" y=\"-89.2964\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b8a0> >"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"85pt\"\n",
|
|
" viewBox=\"0.00 0.00 171.00 85.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 81)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-81 167,-81 167,4 -4,4\"/>\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->1 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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 & !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->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M74.1977,-22C85.0734,-22 99.3874,-22 111.887,-22\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" 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->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" 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=\"#f15854\" stroke=\"#f15854\" 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": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b870> >"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"125pt\"\n",
|
|
" viewBox=\"0.00 0.00 82.00 125.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 121)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-121 78,-121 78,4 -4,4\"/>\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->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" 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=\"#f15854\" stroke=\"#f15854\" 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=\"52.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M50.9906,-35.5771C47.5451,-56.718 49.2148,-84 56,-84 62.043,-84 64.0285,-62.3596 61.9564,-42.6907\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"61.0094,-35.5771 65.0556,-42.1002 61.4713,-39.0465 61.9332,-42.5159 61.9332,-42.5159 61.9332,-42.5159 61.4713,-39.0465 58.8107,-42.9316 61.0094,-35.5771 61.0094,-35.5771\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"50.5\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b840> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 15
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"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)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"text": [
|
|
"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",
|
|
"svg": [
|
|
"<?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=\"226pt\"\n",
|
|
" viewBox=\"0.00 0.00 686.57 226.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 222)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-222 682.567,-222 682.567,4 -4,4\"/>\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=\"middle\" x=\"68.5473\" y=\"-164.3\" font-family=\"Lato\" font-size=\"14.00\">0 * 3</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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=\"middle\" x=\"202.642\" y=\"-189.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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 & !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=\"middle\" x=\"202.642\" y=\"-135.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->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=\"middle\" x=\"315.736\" y=\"-178.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>2->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=\"middle\" x=\"315.736\" y=\"-113.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>2->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=\"middle\" x=\"428.831\" y=\"-167.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>3->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=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->5 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\"><title>4->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=\"middle\" x=\"428.831\" y=\"-102.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->6 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\"><title>4->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=\"middle\" x=\"648.02\" y=\"-116.3\" font-family=\"Lato\" font-size=\"14.00\">1 * 4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->7 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\"><title>5->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 & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"526.926\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->7 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\"><title>6->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 & 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=\"middle\" x=\"534.926\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">2 * 4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->8 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\"><title>6->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->7 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\"><title>7->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=\"#5da5da\">\u24ff</text>\n",
|
|
"<text text-anchor=\"start\" x=\"648.02\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 8->7 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\"><title>8->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=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 8->8 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\"><title>8->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=\"#f17cb0\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_product; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_product > *' at 0x7f304c60b6f0> >"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"150pt\"\n",
|
|
" viewBox=\"0.00 0.00 247.00 150.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 146)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-146 243,-146 243,4 -4,4\"/>\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->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" 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=\"#f15854\" stroke=\"#f15854\" 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 & !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->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->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->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" 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=\"#f15854\" stroke=\"#f15854\" 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=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>2->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->2 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>2->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": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b690> >"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"85pt\"\n",
|
|
" viewBox=\"0.00 0.00 414.00 85.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 81)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-81 410,-81 410,4 -4,4\"/>\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->3 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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->2 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M74.1418,-22C85.1153,-22 99.5214,-22 111.67,-22\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" 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->4 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M317.198,-22C328.073,-22 342.387,-22 354.887,-22\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" 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->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" 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=\"#f15854\" stroke=\"#f15854\" 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->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M236.142,-22C247.115,-22 261.521,-22 273.67,-22\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" 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->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#f15854\" stroke-width=\"2\" d=\"M155.142,-22C166.115,-22 180.521,-22 192.67,-22\"/>\n",
|
|
"<polygon fill=\"#f15854\" stroke=\"#f15854\" 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": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60b810> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 16
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"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"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 17,
|
|
"svg": [
|
|
"<?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=\"284pt\"\n",
|
|
" viewBox=\"0.00 0.00 386.00 284.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 280)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-280 382,-280 382,4 -4,4\"/>\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->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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=\"#f15854\" 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->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#60bd68\" 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=\"#60bd68\" stroke=\"#60bd68\" 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->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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 & !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->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#60bd68\" stroke-width=\"2\" d=\"M155.109,-105C173.324,-105 202.31,-105 222.956,-105\"/>\n",
|
|
"<polygon fill=\"#60bd68\" stroke=\"#60bd68\" 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 & 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->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#60bd68\" stroke-width=\"2\" d=\"M151.868,-93.9814C171.203,-78.6193 206.342,-50.7007 228.218,-33.3198\"/>\n",
|
|
"<polygon fill=\"#60bd68\" stroke=\"#60bd68\" 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 & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>2->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=\"355.5\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\"><title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M352.328,-193.308C347.37,-210.96 349.928,-231 360,-231 368.735,-231 371.818,-215.93 369.25,-200.415\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"367.672,-193.308 372.264,-199.459 368.431,-196.725 369.189,-200.142 369.189,-200.142 369.189,-200.142 368.431,-196.725 366.114,-200.825 367.672,-193.308 367.672,-193.308\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"353.5\" y=\"-249.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"352\" y=\"-234.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\"><title>3->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=\"231.5\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\"><title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M240.544,-121.308C235.403,-138.96 238.055,-159 248.5,-159 257.558,-159 260.756,-143.93 258.092,-128.415\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"256.456,-121.308 261.096,-127.423 257.242,-124.719 258.027,-128.13 258.027,-128.13 258.027,-128.13 257.242,-124.719 254.957,-128.837 256.456,-121.308 256.456,-121.308\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-162.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\"><title>4->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\"><title>4->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 & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60bab0> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 17
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"spot.randomize(b); b"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 18,
|
|
"svg": [
|
|
"<?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=\"318pt\"\n",
|
|
" viewBox=\"0.00 0.00 386.00 318.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 314)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-314 382,-314 382,4 -4,4\"/>\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->4 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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=\"#f15854\" 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->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\"><title>4->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->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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=\"353.5\" y=\"-265.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"352\" y=\"-250.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M352.733,-227.596C347.242,-248.863 349.664,-277 360,-277 369.246,-277 372.159,-254.485 368.741,-234.513\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"367.267,-227.596 371.807,-233.786 367.997,-231.019 368.726,-234.442 368.726,-234.442 368.726,-234.442 367.997,-231.019 365.645,-235.099 367.267,-227.596 367.267,-227.596\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"355.5\" y=\"-280.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>1->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 & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->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->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->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 & !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->2 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\"><title>3->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\"><title>3->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\"><title>2->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=\"230\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\"><title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M240.963,-34.5959C235.269,-55.8633 237.781,-84 248.5,-84 258.088,-84 261.11,-61.4854 257.564,-41.5132\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"256.037,-34.5959 260.622,-40.7517 256.792,-38.0135 257.546,-41.4311 257.546,-41.4311 257.546,-41.4311 256.792,-38.0135 254.471,-42.1106 256.037,-34.5959 256.037,-34.5959\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"231.5\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60bab0> >"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 18
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"spot.highlight_nondet_edges(b, 4) # let's get those highlighted edges back\n",
|
|
"display(b, b.show('.<4'), b.show('.<2'))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<?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=\"318pt\"\n",
|
|
" viewBox=\"0.00 0.00 386.00 318.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 314)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-314 382,-314 382,4 -4,4\"/>\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->4 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\"><title>I->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=\"#f15854\" 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->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\"><title>4->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->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\"><title>0->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=\"353.5\" y=\"-265.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"352\" y=\"-250.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\"><title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M352.733,-227.596C347.242,-248.863 349.664,-277 360,-277 369.246,-277 372.159,-254.485 368.741,-234.513\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"367.267,-227.596 371.807,-233.786 367.997,-231.019 368.726,-234.442 368.726,-234.442 368.726,-234.442 367.997,-231.019 365.645,-235.099 367.267,-227.596 367.267,-227.596\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"355.5\" y=\"-280.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\"><title>1->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 & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\"><title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#60bd68\" 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=\"#60bd68\" stroke=\"#60bd68\" 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->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\"><title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#60bd68\" stroke-width=\"2\" d=\"M155.109,-153C173.324,-153 202.31,-153 222.956,-153\"/>\n",
|
|
"<polygon fill=\"#60bd68\" stroke=\"#60bd68\" 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 & !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->2 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\"><title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#60bd68\" stroke-width=\"2\" d=\"M149.102,-139.313C168.696,-115.156 209.453,-64.9068 231.876,-37.2621\"/>\n",
|
|
"<polygon fill=\"#60bd68\" stroke=\"#60bd68\" 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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\"><title>3->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\"><title>3->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 & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\"><title>2->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=\"230\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\"><title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M240.963,-34.5959C235.269,-55.8633 237.781,-84 248.5,-84 258.088,-84 261.11,-61.4854 257.564,-41.5132\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"256.037,-34.5959 260.622,-40.7517 256.792,-38.0135 257.546,-41.4311 257.546,-41.4311 257.546,-41.4311 256.792,-38.0135 254.471,-42.1106 256.037,-34.5959 256.037,-34.5959\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"231.5\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text": [
|
|
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f304c60bab0> >"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<svg height=\"254pt\" viewBox=\"0.00 0.00 335.00 253.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 249.5)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-249.5 331,-249.5 331,4 -4,4\" stroke=\"none\"/>\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=\"middle\" x=\"56\" y=\"-149.3\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->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=\"#f15854\" 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->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->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->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->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=\"#60bd68\" stroke-width=\"2\"/>\n",
|
|
"<polygon fill=\"#60bd68\" 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=\"#60bd68\" 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->u1 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>1->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->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M155.191,-153C172.897,-153 200.648,-153 220.616,-153\" fill=\"none\" stroke=\"#60bd68\" stroke-width=\"2\"/>\n",
|
|
"<polygon fill=\"#60bd68\" 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=\"#60bd68\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"173\" y=\"-156.8\">a & !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->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M148.849,-139.313C167.995,-115.156 207.822,-64.9068 229.733,-37.2621\" fill=\"none\" stroke=\"#60bd68\" stroke-width=\"2\"/>\n",
|
|
"<polygon fill=\"#60bd68\" 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=\"#60bd68\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"174.5\" y=\"-109.8\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>2->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 & 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->u2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->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->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->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=\"227.5\" y=\"-72.8\">a & !b</text>\n",
|
|
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"238\" y=\"-57.8\">\u24ff</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge10\"><title>3->3</title>\n",
|
|
"<path d=\"M240.991,-35.5771C237.545,-56.718 239.215,-84 246,-84 252.043,-84 254.028,-62.3596 251.956,-42.6907\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"251.009,-35.5771 255.056,-42.1002 251.471,-39.0465 251.933,-42.5159 251.933,-42.5159 251.933,-42.5159 251.471,-39.0465 248.811,-42.9316 251.009,-35.5771 251.009,-35.5771\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"229\" y=\"-87.8\">a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "display_data",
|
|
"svg": [
|
|
"<svg height=\"77pt\" viewBox=\"0.00 0.00 226.00 77.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 73)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-73 222,-73 222,4 -4,4\" stroke=\"none\"/>\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=\"middle\" x=\"56\" y=\"-14.3\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->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=\"#f15854\" 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->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->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->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->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=\"#60bd68\" stroke-width=\"2\"/>\n",
|
|
"<polygon fill=\"#60bd68\" 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=\"#60bd68\" 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->u1 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>1->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": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 19
|
|
},
|
|
{
|
|
"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",
|
|
"collapsed": false,
|
|
"input": [
|
|
"aut = spot.translate('(b W Xa) & GF(c <-> Xb) | a', 'generic', 'det')\n",
|
|
"spot.highlight_languages(aut)\n",
|
|
"aut.show('.bas')"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 20,
|
|
"svg": [
|
|
"<svg height=\"283pt\" viewBox=\"0.00 0.00 734.00 283.07\" width=\"734pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(0.993234 0.993234) rotate(0) translate(4 281)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-281 735,-281 735,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"313.5\" y=\"-262.8\">Fin(</text>\n",
|
|
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"338.5\" y=\"-262.8\">\u24ff</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"354.5\" y=\"-262.8\">) & Inf(</text>\n",
|
|
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"397.5\" y=\"-262.8\">\u2776</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"413.5\" y=\"-262.8\">)</text>\n",
|
|
"<g class=\"cluster\" id=\"clust1\"><title>cluster_0</title>\n",
|
|
"<polygon fill=\"none\" points=\"139,-146 139,-246 191,-246 191,-146 139,-146\" stroke=\"green\"/>\n",
|
|
"</g>\n",
|
|
"<g class=\"cluster\" id=\"clust2\"><title>cluster_1</title>\n",
|
|
"<polygon fill=\"none\" points=\"470,-27 470,-229 723,-229 723,-27 470,-27\" stroke=\"green\"/>\n",
|
|
"</g>\n",
|
|
"<g class=\"cluster\" id=\"clust3\"><title>cluster_2</title>\n",
|
|
"<polygon fill=\"none\" points=\"391,-8 391,-60 443,-60 443,-8 391,-8\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<g class=\"cluster\" id=\"clust4\"><title>cluster_3</title>\n",
|
|
"<polygon fill=\"none\" points=\"139,-36 139,-138 327.5,-138 327.5,-36 139,-36\" stroke=\"green\"/>\n",
|
|
"</g>\n",
|
|
"<g class=\"cluster\" id=\"clust5\"><title>cluster_4</title>\n",
|
|
"<polygon fill=\"none\" points=\"30,-44 30,-96 82,-96 82,-44 30,-44\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>1</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-70\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-66.3\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->1</title>\n",
|
|
"<path d=\"M1.15491,-70C2.79388,-70 17.1543,-70 30.6317,-70\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-70 30.9419,-73.1501 34.4419,-70 30.9419,-70.0001 30.9419,-70.0001 30.9419,-70.0001 34.4419,-70 30.9418,-66.8501 37.9419,-70 37.9419,-70\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>0</title>\n",
|
|
"<ellipse cx=\"165\" cy=\"-172\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"165\" y=\"-168.3\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge19\"><title>1->0</title>\n",
|
|
"<path d=\"M69.6945,-82.1013C88.6787,-100.198 124.54,-134.384 146.153,-154.987\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"151.322,-159.914 144.082,-157.365 148.789,-157.499 146.255,-155.084 146.255,-155.084 146.255,-155.084 148.789,-157.499 148.429,-152.804 151.322,-159.914 151.322,-159.914\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"107\" y=\"-140.8\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node7\"><title>2</title>\n",
|
|
"<ellipse cx=\"417\" cy=\"-34\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"417\" y=\"-30.3\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge20\"><title>1->2</title>\n",
|
|
"<path d=\"M72.3408,-61.7789C88.538,-53.3659 115,-40.3728 139,-32 165.768,-22.6614 172.849,-20.3569 201,-17 270.302,-8.73591 352.668,-21.519 392.332,-29.0808\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"399.229,-30.4257 391.755,-32.1775 395.793,-29.7558 392.358,-29.0858 392.358,-29.0858 392.358,-29.0858 395.793,-29.7558 392.961,-25.994 399.229,-30.4257 399.229,-30.4257\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"211.5\" y=\"-20.8\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node8\"><title>3</title>\n",
|
|
"<ellipse cx=\"165\" cy=\"-70\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#5da5da\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"165\" y=\"-66.3\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge21\"><title>1->3</title>\n",
|
|
"<path d=\"M74.1914,-70C91.8968,-70 119.648,-70 139.616,-70\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"146.851,-70 139.851,-73.1501 143.351,-70 139.851,-70.0001 139.851,-70.0001 139.851,-70.0001 143.351,-70 139.851,-66.8501 146.851,-70 146.851,-70\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.8\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->0</title>\n",
|
|
"<path d=\"M155.767,-187.541C153.169,-197.909 156.246,-208 165,-208 171.702,-208 175.077,-202.085 175.124,-194.659\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"174.233,-187.541 178.229,-194.095 174.668,-191.014 175.103,-194.487 175.103,-194.487 175.103,-194.487 174.668,-191.014 171.977,-194.879 174.233,-187.541 174.233,-187.541\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"160.5\" y=\"-226.8\">1</text>\n",
|
|
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"157\" y=\"-211.8\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>4</title>\n",
|
|
"<ellipse cx=\"496\" cy=\"-92\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#f17cb0\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"496\" y=\"-88.3\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>6</title>\n",
|
|
"<ellipse cx=\"584\" cy=\"-104\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#f17cb0\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"584\" y=\"-100.3\">6</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>4->6</title>\n",
|
|
"<path d=\"M514.116,-90.6026C524.071,-90.1368 536.821,-90.1368 548,-92 552.14,-92.6901 556.447,-93.8097 560.566,-95.0946\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"567.258,-97.3664 559.617,-98.0987 563.943,-96.2412 560.629,-95.1159 560.629,-95.1159 560.629,-95.1159 563.943,-96.2412 561.642,-92.1331 567.258,-97.3664 567.258,-97.3664\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"534.5\" y=\"-95.8\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7 -->\n",
|
|
"<g class=\"node\" id=\"node6\"><title>7</title>\n",
|
|
"<ellipse cx=\"697\" cy=\"-109\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#f17cb0\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"697\" y=\"-105.3\">7</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>4->7</title>\n",
|
|
"<path d=\"M512.019,-83.315C525.609,-75.9906 546.433,-66.0696 566,-62 581.665,-58.7419 586.276,-59.0434 602,-62 629.66,-67.2007 636.12,-71.8443 661,-85 666.129,-87.7121 671.415,-91.0267 676.275,-94.3165\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"682.16,-98.4231 674.617,-97.0007 679.29,-96.4202 676.42,-94.4174 676.42,-94.4174 676.42,-94.4174 679.29,-96.4202 678.222,-91.8341 682.16,-98.4231 682.16,-98.4231\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"580.5\" y=\"-65.8\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>6->4</title>\n",
|
|
"<path d=\"M565.841,-107.212C555.871,-108.533 543.121,-109.283 532,-107 527.58,-106.093 523.029,-104.603 518.732,-102.906\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"512.241,-100.123 519.916,-99.9868 515.458,-101.502 518.675,-102.882 518.675,-102.882 518.675,-102.882 515.458,-101.502 517.433,-105.777 512.241,-100.123 512.241,-100.123\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"533.5\" y=\"-127.8\">!b</text>\n",
|
|
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"532\" y=\"-112.8\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>6->6</title>\n",
|
|
"<path d=\"M576.332,-120.29C574.483,-130.389 577.039,-140 584,-140 589.221,-140 591.964,-134.594 592.229,-127.63\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"591.668,-120.29 595.342,-127.03 591.935,-123.78 592.201,-127.27 592.201,-127.27 592.201,-127.27 591.935,-123.78 589.06,-127.51 591.668,-120.29 591.668,-120.29\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"565.5\" y=\"-143.8\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>6->7</title>\n",
|
|
"<path d=\"M600.694,-96.8164C606.614,-94.4708 613.493,-92.1695 620,-91 637.935,-87.7768 643.289,-86.7127 661,-91 665.73,-92.1449 670.537,-94.0459 675.012,-96.1937\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"681.283,-99.4577 673.62,-99.0202 678.178,-97.8418 675.074,-96.226 675.074,-96.226 675.074,-96.226 678.178,-97.8418 676.528,-93.4318 681.283,-99.4577 681.283,-99.4577\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"623.5\" y=\"-94.8\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>7->4</title>\n",
|
|
"<path d=\"M683.103,-120.93C660.18,-140.644 610.556,-176.651 566,-164 548.914,-159.149 544.858,-155.253 532,-143 523.072,-134.492 515.111,-123.354 509.045,-113.657\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"505.342,-107.536 511.661,-111.895 507.154,-110.531 508.966,-113.525 508.966,-113.525 508.966,-113.525 507.154,-110.531 506.27,-115.156 505.342,-107.536 505.342,-107.536\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"579.5\" y=\"-184.8\">b</text>\n",
|
|
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"576\" y=\"-169.8\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>7->6</title>\n",
|
|
"<path d=\"M678.791,-108.407C663.385,-107.856 640.18,-106.975 620,-106 616.535,-105.833 612.878,-105.641 609.286,-105.443\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"602.087,-105.037 609.253,-102.287 605.581,-105.234 609.076,-105.431 609.076,-105.431 609.076,-105.431 605.581,-105.234 608.898,-108.576 602.087,-105.037 602.087,-105.037\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"620\" y=\"-111.8\">!b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge10\"><title>7->7</title>\n",
|
|
"<path d=\"M687.425,-124.541C684.73,-134.909 687.922,-145 697,-145 703.95,-145 707.45,-139.085 707.499,-131.659\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"706.575,-124.541 710.6,-131.077 707.026,-128.012 707.477,-131.483 707.477,-131.483 707.477,-131.483 707.026,-128.012 704.353,-131.889 706.575,-124.541 706.575,-124.541\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"678.5\" y=\"-148.8\">!b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge11\"><title>2->4</title>\n",
|
|
"<path d=\"M432.606,-43.6256C440.786,-49.1295 451.099,-56.26 460,-63 465.452,-67.1281 471.223,-71.7844 476.473,-76.1383\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"481.925,-80.7047 474.536,-78.625 479.242,-78.4574 476.558,-76.21 476.558,-76.21 476.558,-76.21 479.242,-78.4574 478.581,-73.7951 481.925,-80.7047 481.925,-80.7047\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"453\" y=\"-66.8\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge14\"><title>3->4</title>\n",
|
|
"<path d=\"M172.788,-86.4554C178.475,-97.8739 187.8,-112.207 201,-119 292.409,-166.041 421.048,-122.799 472.473,-101.867\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"479.204,-99.0728 473.947,-104.666 475.972,-100.414 472.739,-101.756 472.739,-101.756 472.739,-101.756 475.972,-100.414 471.532,-98.8468 479.204,-99.0728 479.204,-99.0728\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"357\" y=\"-141.8\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge12\"><title>3->2</title>\n",
|
|
"<path d=\"M181.764,-62.7925C187.692,-60.3237 194.557,-57.7464 201,-56 268.503,-37.7027 351.689,-34.3871 391.933,-33.9368\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"398.934,-33.8831 391.959,-37.0868 395.435,-33.91 391.935,-33.9369 391.935,-33.9369 391.935,-33.9369 395.435,-33.91 391.91,-30.787 398.934,-33.8831 398.934,-33.8831\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"281\" y=\"-44.8\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge13\"><title>3->3</title>\n",
|
|
"<path d=\"M155.767,-85.5414C153.169,-95.9087 156.246,-106 165,-106 171.702,-106 175.077,-100.085 175.124,-92.6591\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"174.233,-85.5414 178.229,-92.0955 174.668,-89.0143 175.103,-92.4871 175.103,-92.4871 175.103,-92.4871 174.668,-89.0143 171.977,-92.8788 174.233,-85.5414 174.233,-85.5414\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"132\" y=\"-109.8\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g class=\"node\" id=\"node9\"><title>5</title>\n",
|
|
"<ellipse cx=\"301.5\" cy=\"-86\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#5da5da\" stroke-width=\"2\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"301.5\" y=\"-82.3\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g class=\"edge\" id=\"edge15\"><title>3->5</title>\n",
|
|
"<path d=\"M182.479,-65.4387C202.062,-60.7826 235.539,-55.2494 263,-63 269.128,-64.7296 275.242,-67.7722 280.702,-71.0891\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"286.771,-75.0467 279.187,-73.8619 283.839,-73.135 280.907,-71.2233 280.907,-71.2233 280.907,-71.2233 283.839,-73.135 282.628,-68.5846 286.771,-75.0467 286.771,-75.0467\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"201\" y=\"-66.8\">!a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge18\"><title>5->4</title>\n",
|
|
"<path d=\"M319.583,-86.5325C353.83,-87.5999 430.982,-90.0046 470.564,-91.2383\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"477.955,-91.4687 470.86,-94.399 474.457,-91.3596 470.959,-91.2506 470.959,-91.2506 470.959,-91.2506 474.457,-91.3596 471.057,-88.1021 477.955,-91.4687 477.955,-91.4687\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"413.5\" y=\"-94.8\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge16\"><title>5->2</title>\n",
|
|
"<path d=\"M316.747,-76.3975C323.606,-72.0012 332.051,-66.912 340,-63 357.251,-54.5098 377.649,-46.8478 392.967,-41.5345\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"399.618,-39.264 394.011,-44.5067 396.306,-40.3948 392.994,-41.5256 392.994,-41.5256 392.994,-41.5256 396.306,-40.3948 391.976,-38.5445 399.618,-39.264 399.618,-39.264\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"340\" y=\"-66.8\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge17\"><title>5->3</title>\n",
|
|
"<path d=\"M283.156,-85.3654C263.232,-84.4607 229.605,-82.3956 201,-78 197.321,-77.4347 193.454,-76.6977 189.686,-75.9\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"182.64,-74.3203 190.16,-72.7781 186.055,-75.086 189.471,-75.8518 189.471,-75.8518 189.471,-75.8518 186.055,-75.086 188.781,-78.9255 182.64,-74.3203 182.64,-74.3203\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"213.5\" y=\"-103.8\">!a & b</text>\n",
|
|
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"224\" y=\"-88.8\">\u2776</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 20
|
|
}
|
|
],
|
|
"metadata": {}
|
|
}
|
|
]
|
|
}
|