spot/tests/python/testingaut.ipynb
Alexandre Duret-Lutz 6cec43294d dot: name the digraph
* spot/twaalgos/dot.cc: Here.
* NEWS: Mention the change.
* tests/core/alternating.test, tests/core/det.test,
tests/core/dstar.test, tests/core/monitor.test,
tests/core/neverclaimread.test, tests/core/readsave.test,
tests/core/sccdot.test, tests/core/tgbagraph.test,
tests/python/_altscc.ipynb, tests/python/_autparserr.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb,
tests/python/atva16-fig2b.ipynb, tests/python/automata-io.ipynb,
tests/python/automata.ipynb, tests/python/decompose.ipynb,
tests/python/gen.ipynb, tests/python/highlighting.ipynb,
tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb,
tests/python/parity.ipynb, tests/python/product.ipynb,
tests/python/randaut.ipynb, tests/python/satmin.ipynb,
tests/python/stutter-inv.ipynb, tests/python/testingaut.ipynb,
tests/python/word.ipynb: Adjust test cases.
2018-04-07 18:58:58 +02:00

728 lines
53 KiB
Text

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import display, HTML\n",
"import spot\n",
"spot.setup()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To translate a formula into a Testing Automaton\n",
"\n",
"Start by building a Buchi automaton"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Pages: 1 -->\n",
"<svg width=\"171pt\" height=\"125pt\"\n",
" viewBox=\"0.00 0.00 171.00 124.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 120.8)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-120.8 167,-120.8 167,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"58.5\" y=\"-86.6\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-22C4.178,-22 17.9448,-22 30.9241,-22\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-22 30.9808,-25.1501 34.4807,-22 30.9807,-22.0001 30.9807,-22.0001 30.9807,-22.0001 34.4807,-22 30.9807,-18.8501 37.9807,-22 37.9807,-22\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-39.0373C48.3189,-48.8579 50.4453,-58 56,-58 60.166,-58 62.4036,-52.8576 62.7128,-46.1433\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-39.0373 65.8541,-45.8818 62.5434,-42.5335 62.7076,-46.0296 62.7076,-46.0296 62.7076,-46.0296 62.5434,-42.5335 59.561,-46.1774 62.3792,-39.0373 62.3792,-39.0373\"/>\n",
"<text text-anchor=\"start\" x=\"52.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"141\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"141\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"141\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.0263,-22C84.9439,-22 99.13,-22 111.634,-22\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"118.7644,-22 111.7645,-25.1501 115.2644,-22 111.7644,-22.0001 111.7644,-22.0001 111.7644,-22.0001 115.2644,-22 111.7644,-18.8501 118.7644,-22 118.7644,-22\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M132.9937,-42.5808C131.8859,-52.8447 134.5547,-62 141,-62 145.834,-62 148.5437,-56.8502 149.129,-49.9451\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"149.0063,-42.5808 152.2726,-49.5273 149.0647,-46.0803 149.123,-49.5798 149.123,-49.5798 149.123,-49.5798 149.0647,-46.0803 145.9735,-49.6324 149.0063,-42.5808 149.0063,-42.5808\"/>\n",
"<text text-anchor=\"start\" x=\"136.5\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f8d680c3bd0> >"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f = spot.formula('a U Gb')\n",
"a = f.translate('ba')\n",
"a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then, gather all the atomic proposition in the formula, and create an automaton with changesets"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg height=\"265pt\" viewBox=\"0.00 0.00 734.00 265.23\" 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(.7054 .7054) rotate(0) translate(4 372)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-372 1036.5483,-372 1036.5483,4 -4,4\" stroke=\"transparent\"/>\n",
"<!-- 0 -->\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>1</title>\n",
"<ellipse cx=\"118\" cy=\"-252\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"118\" y=\"-248.3\">init</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>0-&gt;1</title>\n",
"<path d=\"M54.303,-252C63.4811,-252 73.8419,-252 83.4994,-252\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"90.7163,-252 83.7163,-255.1501 87.2163,-252 83.7163,-252.0001 83.7163,-252.0001 83.7163,-252.0001 87.2163,-252 83.7162,-248.8501 90.7163,-252 90.7163,-252\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>2</title>\n",
"<ellipse cx=\"540.9691\" cy=\"-197\" fill=\"#ffffaa\" rx=\"37.4533\" ry=\"26.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"540.9691\" y=\"-200.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"540.9691\" y=\"-185.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>1-&gt;2</title>\n",
"<path d=\"M133.5354,-266.9299C168.8984,-299.0637 258.6983,-370.2928 340.7107,-350 412.9957,-332.1141 429.98,-313.6254 482.664,-261 491.6022,-252.0717 492.2837,-248.4539 500.664,-239 504.9963,-234.1127 509.7098,-229.0164 514.3359,-224.128\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"519.2993,-218.925 516.7468,-226.1644 516.8834,-221.4575 514.4676,-223.99 514.4676,-223.99 514.4676,-223.99 516.8834,-221.4575 512.1883,-221.8157 519.2993,-218.925 519.2993,-218.925\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"322.2107\" y=\"-356.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>3</title>\n",
"<ellipse cx=\"250.3553\" cy=\"-156\" fill=\"#ffffaa\" rx=\"35.2113\" ry=\"26.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"250.3553\" y=\"-159.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"250.3553\" y=\"-144.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>1-&gt;3</title>\n",
"<path d=\"M136.4034,-238.6516C157.5778,-223.2935 192.7241,-197.8011 218.3948,-179.1816\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"224.374,-174.8448 220.557,-181.5047 221.5407,-176.8998 218.7075,-178.9548 218.7075,-178.9548 218.7075,-178.9548 221.5407,-176.8998 216.858,-176.4049 224.374,-174.8448 224.374,-174.8448\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"180\" y=\"-221.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node5\">\n",
"<title>4</title>\n",
"<ellipse cx=\"396.1873\" cy=\"-197\" fill=\"#ffffaa\" rx=\"37.4533\" ry=\"26.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"396.1873\" y=\"-200.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"396.1873\" y=\"-185.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>1-&gt;4</title>\n",
"<path d=\"M144.539,-248.3342C177.6921,-243.6154 236.1001,-234.8431 285.7107,-225 310.3484,-220.1117 316.3617,-218.1677 340.7107,-212 345.0267,-210.9067 349.5237,-209.7388 354.0075,-208.5555\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"361.0147,-206.6919 355.0595,-211.5353 357.6323,-207.5915 354.2499,-208.4911 354.2499,-208.4911 354.2499,-208.4911 357.6323,-207.5915 353.4402,-205.447 361.0147,-206.6919 361.0147,-206.6919\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"250.3553\" y=\"-240.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node6\">\n",
"<title>5</title>\n",
"<ellipse cx=\"687.6295\" cy=\"-147\" fill=\"#ffffaa\" rx=\"35.2259\" ry=\"26.7574\" stroke=\"#000000\"/>\n",
"<ellipse cx=\"687.6295\" cy=\"-147\" fill=\"none\" rx=\"39.2112\" ry=\"30.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"687.6295\" y=\"-150.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"687.6295\" y=\"-135.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge5\">\n",
"<title>2-&gt;5</title>\n",
"<path d=\"M574.9846,-185.4033C595.7665,-178.3183 622.5296,-169.1941 644.7541,-161.6172\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"651.494,-159.3195 645.8849,-164.5598 648.1812,-160.4489 644.8684,-161.5783 644.8684,-161.5783 644.8684,-161.5783 648.1812,-160.4489 643.8519,-158.5968 651.494,-159.3195 651.494,-159.3195\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"614.7742\" y=\"-179.8\">{a}</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g class=\"node\" id=\"node7\">\n",
"<title>6</title>\n",
"<ellipse cx=\"835.4615\" cy=\"-148\" fill=\"#ffffaa\" rx=\"37.4556\" ry=\"26.7574\" stroke=\"#000000\"/>\n",
"<ellipse cx=\"835.4615\" cy=\"-148\" fill=\"none\" rx=\"41.4533\" ry=\"30.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"835.4615\" y=\"-151.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"835.4615\" y=\"-136.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge6\">\n",
"<title>2-&gt;6</title>\n",
"<path d=\"M574.6008,-209.3139C612.4084,-221.2984 675.2698,-235.6008 726.9848,-220 755.2712,-211.4669 782.9521,-192.8771 803.2716,-176.7249\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"808.802,-172.2442 805.3461,-179.0984 806.0825,-174.4475 803.3631,-176.6509 803.3631,-176.6509 803.3631,-176.6509 806.0825,-174.4475 801.38,-174.2034 808.802,-172.2442 808.802,-172.2442\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"687.6295\" y=\"-229.8\">{}</text>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g class=\"node\" id=\"node8\">\n",
"<title>7</title>\n",
"<ellipse cx=\"988.2433\" cy=\"-61\" fill=\"#ffffaa\" rx=\"37.4556\" ry=\"26.7574\" stroke=\"#000000\"/>\n",
"<ellipse cx=\"988.2433\" cy=\"-61\" fill=\"none\" rx=\"41.4533\" ry=\"30.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"988.2433\" y=\"-64.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"988.2433\" y=\"-49.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge7\">\n",
"<title>2-&gt;7</title>\n",
"<path d=\"M561.8988,-174.5523C582.1469,-154.1116 614.6347,-124.5248 648.2742,-107 742.5596,-57.8812 870.6426,-54.8953 939.5549,-57.5895\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"946.8476,-57.9047 939.7181,-60.7494 943.3509,-57.7535 939.8541,-57.6023 939.8541,-57.6023 939.8541,-57.6023 943.3509,-57.7535 939.9902,-54.4553 946.8476,-57.9047 946.8476,-57.9047\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"760.4848\" y=\"-76.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 8 -->\n",
"<g class=\"node\" id=\"node9\">\n",
"<title>8</title>\n",
"<ellipse cx=\"988.2433\" cy=\"-269\" fill=\"#ffffaa\" rx=\"40.1285\" ry=\"26.7574\" stroke=\"#000000\"/>\n",
"<ellipse cx=\"988.2433\" cy=\"-269\" fill=\"none\" rx=\"44.111\" ry=\"30.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"988.2433\" y=\"-272.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"988.2433\" y=\"-257.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;8 -->\n",
"<g class=\"edge\" id=\"edge8\">\n",
"<title>2-&gt;8</title>\n",
"<path d=\"M567.8944,-216.0651C577.4562,-222.1646 588.5208,-228.4959 599.2742,-233 619.9546,-241.6622 626.2778,-240.6552 648.2742,-245 712.527,-257.6913 728.7543,-261.1278 793.9848,-267 838.692,-271.0246 850.0552,-269.3333 894.9382,-270 908.3318,-270.199 922.8076,-270.1651 936.269,-270.028\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"943.6299,-269.942 936.6672,-273.1736 940.1302,-269.9829 936.6304,-270.0239 936.6304,-270.0239 936.6304,-270.0239 940.1302,-269.9829 936.5936,-266.8741 943.6299,-269.942 943.6299,-269.942\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"760.4848\" y=\"-268.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge10\">\n",
"<title>3-&gt;2</title>\n",
"<path d=\"M284.6069,-148.5979C321.7859,-141.838 382.6752,-134.4994 433.664,-146 459.3748,-151.7991 486.1534,-164.5155 506.5281,-175.7988\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"512.6374,-179.2453 504.9929,-178.5494 509.589,-177.5256 506.5406,-175.8059 506.5406,-175.8059 506.5406,-175.8059 509.589,-177.5256 508.0884,-173.0623 512.6374,-179.2453 512.6374,-179.2453\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"396.1873\" y=\"-149.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge9\">\n",
"<title>3-&gt;3</title>\n",
"<path d=\"M237.3457,-181.37C236.4485,-191.9238 240.785,-200.8701 250.3553,-200.8701 257.6826,-200.8701 261.9419,-195.6259 263.1333,-188.4312\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"263.365,-181.37 266.2837,-188.4696 263.2502,-184.8681 263.1354,-188.3662 263.1354,-188.3662 263.1354,-188.3662 263.2502,-184.8681 259.9871,-188.2629 263.365,-181.37 263.365,-181.37\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"250.3553\" y=\"-204.6701\">{}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge11\">\n",
"<title>3-&gt;4</title>\n",
"<path d=\"M277.0942,-173.7422C285.324,-178.4457 294.6179,-183.0341 303.7107,-186 318.7696,-190.912 335.846,-193.6754 351.1905,-195.2153\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"358.5677,-195.8771 351.3142,-198.389 355.0817,-195.5643 351.5957,-195.2516 351.5957,-195.2516 351.5957,-195.2516 355.0817,-195.5643 351.8771,-192.1142 358.5677,-195.8771 358.5677,-195.8771\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"322.2107\" y=\"-196.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge13\">\n",
"<title>3-&gt;5</title>\n",
"<path d=\"M281.8433,-143.7301C288.9363,-141.4312 296.501,-139.3339 303.7107,-138 423.977,-115.7483 569.0261,-130.0094 641.5805,-139.8797\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"648.7954,-140.8795 641.4292,-143.0388 645.3285,-140.399 641.8616,-139.9186 641.8616,-139.9186 641.8616,-139.9186 645.3285,-140.399 642.294,-136.7984 648.7954,-140.8795 648.7954,-140.8795\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"467.164\" y=\"-130.8\">{}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge14\">\n",
"<title>3-&gt;6</title>\n",
"<path d=\"M267.102,-132.0313C291.5104,-100.2136 340.1084,-48 396.1873,-48 396.1873,-48 396.1873,-48 614.7742,-48 685.7369,-48 759.0106,-91.4276 800.7319,-121.0456\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"806.6546,-125.3085 799.133,-123.7758 803.8138,-123.2638 800.9731,-121.2192 800.9731,-121.2192 800.9731,-121.2192 803.8138,-123.2638 802.8133,-118.6626 806.6546,-125.3085 806.6546,-125.3085\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"540.9691\" y=\"-51.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge15\">\n",
"<title>3-&gt;7</title>\n",
"<path d=\"M260.5421,-129.8891C279.779,-85.4797 325.9314,0 396.1873,0 396.1873,0 396.1873,0 835.4615,0 877.1907,0 921.0539,-19.8698 951.0225,-36.9288\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"957.2009,-40.5182 949.5658,-39.7255 954.1745,-38.76 951.1482,-37.0018 951.1482,-37.0018 951.1482,-37.0018 954.1745,-38.76 952.7306,-34.278 957.2009,-40.5182 957.2009,-40.5182\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"614.7742\" y=\"-3.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;8 -->\n",
"<g class=\"edge\" id=\"edge16\">\n",
"<title>3-&gt;8</title>\n",
"<path d=\"M264.0204,-180.9661C270.6079,-193.0415 278.6036,-207.7566 285.7107,-221 319.2245,-283.4504 325.3126,-336 396.1873,-336 396.1873,-336 396.1873,-336 835.4615,-336 877.7786,-336 921.5587,-314.1757 951.3476,-295.4388\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"957.4863,-291.4964 953.2985,-297.9296 954.5413,-293.3878 951.5963,-295.2791 951.5963,-295.2791 951.5963,-295.2791 954.5413,-293.3878 949.8941,-292.6286 957.4863,-291.4964 957.4863,-291.4964\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"614.7742\" y=\"-339.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 9 -->\n",
"<g class=\"node\" id=\"node10\">\n",
"<title>9</title>\n",
"<ellipse cx=\"540.9691\" cy=\"-275\" fill=\"#ffffaa\" rx=\"40.1111\" ry=\"26.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"540.9691\" y=\"-278.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"540.9691\" y=\"-263.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;9 -->\n",
"<g class=\"edge\" id=\"edge12\">\n",
"<title>3-&gt;9</title>\n",
"<path d=\"M266.002,-180.6084C284.4902,-207.1967 317.9496,-248.149 358.7107,-266 401.6961,-284.8252 455.9566,-284.8785 494.0531,-281.5807\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"501.4487,-280.881 494.7765,-284.6764 497.9643,-281.2107 494.4798,-281.5404 494.4798,-281.5404 494.4798,-281.5404 497.9643,-281.2107 494.1831,-278.4044 501.4487,-280.881 501.4487,-280.881\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"396.1873\" y=\"-285.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge18\">\n",
"<title>4-&gt;2</title>\n",
"<path d=\"M433.8491,-197C452.8776,-197 476.1016,-197 496.0552,-197\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"503.2447,-197 496.2447,-200.1501 499.7447,-197 496.2447,-197.0001 496.2447,-197.0001 496.2447,-197.0001 499.7447,-197 496.2446,-193.8501 503.2447,-197 503.2447,-197\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"467.164\" y=\"-200.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge17\">\n",
"<title>4-&gt;3</title>\n",
"<path d=\"M368.0179,-179.1334C359.53,-174.4856 349.9958,-169.9583 340.7107,-167 325.5716,-162.1766 308.3862,-159.4452 293.0974,-157.9066\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"285.7616,-157.2431 293.0169,-154.7365 289.2474,-157.5584 292.7331,-157.8737 292.7331,-157.8737 292.7331,-157.8737 289.2474,-157.5584 292.4494,-161.0109 285.7616,-157.2431 285.7616,-157.2431\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"322.2107\" y=\"-170.8\">{b}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge19\">\n",
"<title>4-&gt;4</title>\n",
"<path d=\"M383.1777,-222.37C382.2805,-232.9238 386.617,-241.8701 396.1873,-241.8701 403.5146,-241.8701 407.7739,-236.6259 408.9653,-229.4312\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"409.197,-222.37 412.1157,-229.4696 409.0822,-225.8681 408.9674,-229.3662 408.9674,-229.3662 408.9674,-229.3662 409.0822,-225.8681 405.8191,-229.2629 409.197,-222.37 409.197,-222.37\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"396.1873\" y=\"-245.6701\">{}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;9 -->\n",
"<g class=\"edge\" id=\"edge20\">\n",
"<title>4-&gt;9</title>\n",
"<path d=\"M426.1862,-213.1617C448.5398,-225.2045 479.22,-241.7332 503.2377,-254.6725\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"509.5062,-258.0496 501.8496,-257.5027 506.4249,-256.3896 503.3436,-254.7295 503.3436,-254.7295 503.3436,-254.7295 506.4249,-256.3896 504.8377,-251.9564 509.5062,-258.0496 509.5062,-258.0496\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"467.164\" y=\"-245.8\">{a}</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge21\">\n",
"<title>5-&gt;5</title>\n",
"<path d=\"M674.1592,-176.0993C673.7175,-186.9436 678.2076,-195.8701 687.6295,-195.8701 694.8431,-195.8701 699.1658,-190.6375 700.5977,-183.3179\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"701.0998,-176.0993 703.7564,-183.301 700.8569,-179.5908 700.6139,-183.0824 700.6139,-183.0824 700.6139,-183.0824 700.8569,-179.5908 697.4715,-182.8637 701.0998,-176.0993 701.0998,-176.0993\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"687.6295\" y=\"-199.6701\">{}</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge22\">\n",
"<title>5-&gt;6</title>\n",
"<path d=\"M726.0974,-140.1215C732.39,-139.2392 738.855,-138.478 744.9848,-138 758.7209,-136.9288 762.2548,-136.8538 775.9848,-138 779.9956,-138.3348 784.1428,-138.7945 788.295,-139.3341\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"795.2645,-140.3096 787.8954,-142.4588 791.7983,-139.8244 788.3321,-139.3392 788.3321,-139.3392 788.3321,-139.3392 791.7983,-139.8244 788.7687,-136.2196 795.2645,-140.3096 795.2645,-140.3096\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"760.4848\" y=\"-141.8\">{a}</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge23\">\n",
"<title>5-&gt;7</title>\n",
"<path d=\"M719.1038,-127.7822C739.7107,-116.028 767.6145,-101.6376 793.9848,-93 842.1461,-77.2247 899.6839,-68.9884 939.5807,-64.8502\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"946.8188,-64.1242 940.1681,-67.9571 943.3363,-64.4736 939.8537,-64.8229 939.8537,-64.8229 939.8537,-64.8229 943.3363,-64.4736 939.5394,-61.6886 946.8188,-64.1242 946.8188,-64.1242\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"835.4615\" y=\"-96.8\">{b}</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;8 -->\n",
"<g class=\"edge\" id=\"edge24\">\n",
"<title>5-&gt;8</title>\n",
"<path d=\"M714.3735,-169.7723C734.929,-186.1996 764.6806,-207.7351 793.9848,-221 840.3144,-241.9716 897.1792,-254.6543 937.3813,-261.6703\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"944.6877,-262.9151 937.258,-264.8446 941.2374,-262.3273 937.7871,-261.7394 937.7871,-261.7394 937.7871,-261.7394 941.2374,-262.3273 938.3162,-258.6341 944.6877,-262.9151 944.6877,-262.9151\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"835.4615\" y=\"-251.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge25\">\n",
"<title>6-&gt;5</title>\n",
"<path d=\"M794.026,-152.1587C778.6278,-153.2119 761.0094,-153.8359 744.9848,-153 741.3902,-152.8125 737.6739,-152.5593 733.9411,-152.2626\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"726.7699,-151.6442 734.0147,-149.1073 730.257,-151.9449 733.744,-152.2457 733.744,-152.2457 733.744,-152.2457 730.257,-151.9449 733.4733,-155.384 726.7699,-151.6442 726.7699,-151.6442\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"760.4848\" y=\"-156.8\">{a}</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge26\">\n",
"<title>6-&gt;6</title>\n",
"<path d=\"M821.6001,-177.5835C821.302,-188.208 825.9224,-196.8701 835.4615,-196.8701 842.7649,-196.8701 847.185,-191.7925 848.722,-184.6442\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"849.323,-177.5835 851.8679,-184.8255 849.0261,-181.0709 848.7292,-184.5583 848.7292,-184.5583 848.7292,-184.5583 849.0261,-181.0709 845.5906,-184.2911 849.323,-177.5835 849.323,-177.5835\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"835.4615\" y=\"-200.6701\">{}</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge27\">\n",
"<title>6-&gt;7</title>\n",
"<path d=\"M869.1148,-129.7254C886.2048,-120.3634 907.2527,-108.7078 925.9382,-98 933.5276,-93.6508 941.5907,-88.9346 949.3101,-84.3717\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"955.6957,-80.5863 951.2806,-86.8656 952.685,-82.3711 949.6742,-84.1559 949.6742,-84.1559 949.6742,-84.1559 952.685,-82.3711 948.0679,-81.4462 955.6957,-80.5863 955.6957,-80.5863\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"910.4382\" y=\"-118.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;8 -->\n",
"<g class=\"edge\" id=\"edge28\">\n",
"<title>6-&gt;8</title>\n",
"<path d=\"M864.455,-170.6225C882.2377,-184.5298 905.4493,-202.7405 925.9382,-219 934.9349,-226.1396 944.6309,-233.8923 953.6321,-241.1143\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"959.1345,-245.5321 951.704,-243.6058 956.4053,-243.3409 953.6761,-241.1496 953.6761,-241.1496 953.6761,-241.1496 956.4053,-243.3409 955.6483,-238.6933 959.1345,-245.5321 959.1345,-245.5321\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"910.4382\" y=\"-222.8\">{b}</text>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"propset = spot.atomic_prop_collect_as_bdd(f, a)\n",
"ta = spot.tgba_to_ta(a, propset, True, True, False, False, True)\n",
"ta.show('.A')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then, remove dead states, and remove stuttering transitions (i.e., transitions labeled by `{}`), marking as *livelock accepting* (rectangles) any states from which there exists a an accepting path labeled by `{}`."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg height=\"135pt\" viewBox=\"0.00 0.00 734.00 134.67\" 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(.9484 .9484) rotate(0) translate(4 138)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-138 769.9533,-138 769.9533,4 -4,4\" stroke=\"transparent\"/>\n",
"<!-- 0 -->\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>1</title>\n",
"<ellipse cx=\"118\" cy=\"-61\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"118\" y=\"-57.3\">init</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>0-&gt;1</title>\n",
"<path d=\"M54.303,-61C63.4811,-61 73.8419,-61 83.4994,-61\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"90.7163,-61 83.7163,-64.1501 87.2163,-61 83.7163,-61.0001 83.7163,-61.0001 83.7163,-61.0001 87.2163,-61 83.7162,-57.8501 90.7163,-61 90.7163,-61\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>2</title>\n",
"<polygon fill=\"#ffffaa\" points=\"537.9533,-131 483.9533,-131 483.9533,-93 537.9533,-93 537.9533,-131\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"510.9533\" y=\"-115.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"510.9533\" y=\"-100.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>1-&gt;2</title>\n",
"<path d=\"M140.6088,-71.4262C147.6839,-74.4492 155.582,-77.5829 163,-80 240.6956,-105.3164 260.8258,-112.6044 342,-122 375.0917,-125.8302 383.6425,-122.3399 416.9533,-122 438.7345,-121.7778 444.3,-123.3674 465.9533,-121 469.5248,-120.6095 473.2342,-120.0774 476.9223,-119.4655\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"483.9465,-118.2071 477.6117,-122.5423 480.5013,-118.8244 477.0562,-119.4416 477.0562,-119.4416 477.0562,-119.4416 480.5013,-118.8244 476.5006,-116.341 483.9465,-118.2071 483.9465,-118.2071\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"305.5\" y=\"-122.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>3</title>\n",
"<polygon fill=\"#ffffaa\" points=\"269,-80 215,-80 215,-42 269,-42 269,-80\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"242\" y=\"-64.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"242\" y=\"-49.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>1-&gt;3</title>\n",
"<path d=\"M145.2123,-61C163.6257,-61 188.0917,-61 207.818,-61\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"214.8512,-61 207.8512,-64.1501 211.3512,-61 207.8512,-61.0001 207.8512,-61.0001 207.8512,-61.0001 211.3512,-61 207.8511,-57.8501 214.8512,-61 214.8512,-61\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"180\" y=\"-64.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node5\">\n",
"<title>4</title>\n",
"<ellipse cx=\"379.4767\" cy=\"-55\" fill=\"#ffffaa\" rx=\"37.4533\" ry=\"26.7407\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"379.4767\" y=\"-58.8\">0</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"379.4767\" y=\"-43.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>1-&gt;4</title>\n",
"<path d=\"M138.3381,-48.9634C157.3996,-38.4299 187.0669,-23.9138 215,-18 258.4402,-8.8031 308.1565,-23.5006 341.4546,-37.0022\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"348.3027,-39.8561 340.6296,-40.0709 345.072,-38.5097 341.8413,-37.1633 341.8413,-37.1633 341.8413,-37.1633 345.072,-38.5097 343.0531,-34.2557 348.3027,-39.8561 348.3027,-39.8561\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"242\" y=\"-21.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node6\">\n",
"<title>5</title>\n",
"<polygon fill=\"#ffffaa\" points=\"647.9533,-102 593.9533,-102 593.9533,-64 647.9533,-64 647.9533,-102\" stroke=\"#000000\"/>\n",
"<polygon fill=\"none\" points=\"651.9533,-106 589.9533,-106 589.9533,-60 651.9533,-60 651.9533,-106\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"620.9533\" y=\"-86.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"620.9533\" y=\"-71.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge5\">\n",
"<title>2-&gt;5</title>\n",
"<path d=\"M538.1443,-104.8315C551.5943,-101.2856 568.0552,-96.9459 582.7475,-93.0724\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"589.7971,-91.2139 583.8314,-96.0444 586.4128,-92.1062 583.0284,-92.9985 583.0284,-92.9985 583.0284,-92.9985 586.4128,-92.1062 582.2253,-89.9525 589.7971,-91.2139 589.7971,-91.2139\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"563.9533\" y=\"-103.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge6\">\n",
"<title>3-&gt;2</title>\n",
"<path d=\"M269.4116,-71.9981C275.1743,-74.1285 281.2496,-76.2423 287,-78 352.3724,-97.9826 432.2202,-106.5042 476.7468,-109.9161\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"483.8463,-110.4395 476.6336,-113.0662 480.3557,-110.1821 476.8652,-109.9247 476.8652,-109.9247 476.8652,-109.9247 480.3557,-110.1821 477.0968,-106.7832 483.8463,-110.4395 483.8463,-110.4395\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"379.4767\" y=\"-106.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge7\">\n",
"<title>3-&gt;4</title>\n",
"<path d=\"M269.1038,-48.2461C274.8887,-46.0707 281.051,-44.1457 287,-43 303.2676,-39.8672 321.3057,-41.1561 337.0998,-43.8325\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"344.1842,-45.1489 336.7265,-46.967 340.7431,-44.5095 337.3021,-43.87 337.3021,-43.87 337.3021,-43.87 340.7431,-44.5095 337.8776,-40.773 344.1842,-45.1489 344.1842,-45.1489\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"305.5\" y=\"-46.8\">{b}</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g class=\"node\" id=\"node7\">\n",
"<title>6</title>\n",
"<polygon fill=\"#ffffaa\" points=\"761.9533,-64 707.9533,-64 707.9533,-26 761.9533,-26 761.9533,-64\" stroke=\"#000000\"/>\n",
"<polygon fill=\"none\" points=\"765.9533,-68 703.9533,-68 703.9533,-22 765.9533,-22 765.9533,-68\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"734.9533\" y=\"-48.8\">1</text>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"734.9533\" y=\"-33.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge8\">\n",
"<title>3-&gt;6</title>\n",
"<path d=\"M267.8732,-41.6992C294.441,-23.8281 337.6983,0 379.4767,0 379.4767,0 379.4767,0 620.9533,0 647.8722,0 676.0263,-10.9899 697.6206,-22.1076\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"703.8163,-25.3933 696.1562,-24.8965 700.7242,-23.7534 697.6321,-22.1136 697.6321,-22.1136 697.6321,-22.1136 700.7242,-23.7534 699.1079,-19.3307 703.8163,-25.3933 703.8163,-25.3933\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"510.9533\" y=\"-3.8\">{a}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge10\">\n",
"<title>4-&gt;2</title>\n",
"<path d=\"M413.0566,-67.325C429.205,-73.4741 448.7467,-81.2426 465.9533,-89 469.6426,-90.6633 473.4633,-92.4739 477.2483,-94.3246\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"483.555,-97.4585 475.8845,-97.1644 480.4206,-95.9009 477.2862,-94.3434 477.2862,-94.3434 477.2862,-94.3434 480.4206,-95.9009 478.688,-91.5225 483.555,-97.4585 483.555,-97.4585\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"450.4533\" y=\"-92.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge9\">\n",
"<title>4-&gt;3</title>\n",
"<path d=\"M341.8805,-57.122C335.9001,-57.4339 329.7813,-57.7379 324,-58 308.4882,-58.7031 291.3199,-59.3514 276.7179,-59.864\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"269.3382,-60.1193 276.2251,-56.729 272.8361,-59.9982 276.334,-59.8772 276.334,-59.8772 276.334,-59.8772 272.8361,-59.9982 276.443,-63.0253 269.3382,-60.1193 269.3382,-60.1193\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"305.5\" y=\"-62.8\">{b}</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge11\">\n",
"<title>5-&gt;6</title>\n",
"<path d=\"M645.3557,-59.8566C652.7145,-54.2534 661.1829,-49.0146 669.9533,-46 678.3751,-43.1052 687.7805,-41.9 696.7631,-41.6177\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"703.8494,-41.5746 696.8688,-44.7672 700.3495,-41.5959 696.8495,-41.6173 696.8495,-41.6173 696.8495,-41.6173 700.3495,-41.5959 696.8303,-38.4673 703.8494,-41.5746 703.8494,-41.5746\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"677.9533\" y=\"-49.8\">{a}</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge12\">\n",
"<title>6-&gt;5</title>\n",
"<path d=\"M703.84,-55.3711C690.0211,-59.9774 673.6249,-65.4428 659.0777,-70.2919\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"652.1043,-72.6163 657.749,-67.4143 655.4247,-71.5095 658.7451,-70.4027 658.7451,-70.4027 658.7451,-70.4027 655.4247,-71.5095 659.7413,-73.391 652.1043,-72.6163 652.1043,-72.6163\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"677.9533\" y=\"-69.8\">{a}</text>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ta = spot.tgba_to_ta(a, propset, True, True, False, False, False)\n",
"ta.show('.A')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, use bisimulation to minimize the number of states."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<svg height=\"187pt\" viewBox=\"0.00 0.00 639.00 187.00\" width=\"639pt\" 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 183)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-183 635,-183 635,4 -4,4\" stroke=\"transparent\"/>\n",
"<!-- 0 -->\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>1</title>\n",
"<ellipse cx=\"118\" cy=\"-153\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"118\" y=\"-149.3\">init</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>0-&gt;1</title>\n",
"<path d=\"M54.303,-153C63.4811,-153 73.8419,-153 83.4994,-153\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"90.7163,-153 83.7163,-156.1501 87.2163,-153 83.7163,-153.0001 83.7163,-153.0001 83.7163,-153.0001 87.2163,-153 83.7162,-149.8501 90.7163,-153 90.7163,-153\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>2</title>\n",
"<polygon fill=\"#ffffaa\" points=\"517,-105 463,-105 463,-69 517,-69 517,-105\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"490\" y=\"-83.3\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>1-&gt;2</title>\n",
"<path d=\"M144.0789,-158.3499C150.2564,-159.4188 156.8401,-160.397 163,-161 266.4419,-171.1264 295.7434,-168.4113 396,-141 418.5307,-134.8398 424.6775,-133.5141 445,-122 451.3293,-118.414 457.7336,-114.0021 463.6482,-109.534\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"469.3785,-105.0758 465.7879,-111.8604 466.6161,-107.225 463.8536,-109.3742 463.8536,-109.3742 463.8536,-109.3742 466.6161,-107.225 461.9193,-106.888 469.3785,-105.0758 469.3785,-105.0758\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"305.5\" y=\"-167.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node4\">\n",
"<title>3</title>\n",
"<polygon fill=\"#ffffaa\" points=\"269,-103 215,-103 215,-67 269,-67 269,-103\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"242\" y=\"-81.3\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge3\">\n",
"<title>1-&gt;3</title>\n",
"<path d=\"M136.9738,-140.091C144.8931,-134.8831 154.2667,-128.9485 163,-124 177.6561,-115.6955 194.3231,-107.3183 208.5582,-100.4679\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"214.9115,-97.4336 209.9525,-103.2928 211.7532,-98.942 208.5949,-100.4504 208.5949,-100.4504 208.5949,-100.4504 211.7532,-98.942 207.2374,-97.6079 214.9115,-97.4336 214.9115,-97.4336\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"180\" y=\"-127.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node5\">\n",
"<title>4</title>\n",
"<ellipse cx=\"369\" cy=\"-114\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"369\" y=\"-110.3\">1</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge4\">\n",
"<title>1-&gt;4</title>\n",
"<path d=\"M144.8849,-150.9514C184.425,-147.6359 260.4518,-140.1064 324,-127 328.3903,-126.0945 332.9765,-124.9762 337.4705,-123.7787\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"344.4154,-121.851 338.513,-126.7586 341.0429,-122.7872 337.6704,-123.7233 337.6704,-123.7233 337.6704,-123.7233 341.0429,-122.7872 336.8279,-120.6881 344.4154,-121.851 344.4154,-121.851\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"242\" y=\"-146.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node6\">\n",
"<title>5</title>\n",
"<polygon fill=\"#ffffaa\" points=\"627,-40 573,-40 573,-4 627,-4 627,-40\" stroke=\"#000000\"/>\n",
"<polygon fill=\"none\" points=\"631,-44 569,-44 569,0 631,0 631,-44\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"600\" y=\"-18.3\">4</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge5\">\n",
"<title>2-&gt;5</title>\n",
"<path d=\"M517.191,-70.9326C530.8855,-62.8404 547.7015,-52.9037 562.5938,-44.1036\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"568.8438,-40.4105 564.4198,-46.6836 565.8305,-42.1911 562.8173,-43.9716 562.8173,-43.9716 562.8173,-43.9716 565.8305,-42.1911 561.2148,-41.2597 568.8438,-40.4105 568.8438,-40.4105\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"543\" y=\"-64.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge6\">\n",
"<title>3-&gt;2</title>\n",
"<path d=\"M269.0986,-80.5797C274.9927,-79.6756 281.1997,-78.7671 287,-78 335.099,-71.6388 347.634,-68.1653 396,-72 415.8926,-73.5772 437.9326,-77.0038 455.6685,-80.1842\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"462.9873,-81.526 455.534,-83.3619 459.5447,-80.8948 456.1021,-80.2636 456.1021,-80.2636 456.1021,-80.2636 459.5447,-80.8948 456.6702,-77.1652 462.9873,-81.526 462.9873,-81.526\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"369\" y=\"-75.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge7\">\n",
"<title>3-&gt;4</title>\n",
"<path d=\"M269.1286,-81.7143C285.3671,-80.6302 306.2351,-80.807 324,-86 331.5733,-88.2138 339.122,-92.0861 345.8129,-96.2575\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"351.6925,-100.1334 344.1144,-98.9106 348.7703,-98.207 345.8481,-96.2806 345.8481,-96.2806 345.8481,-96.2806 348.7703,-98.207 347.5818,-93.6507 351.6925,-100.1334 351.6925,-100.1334\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"305.5\" y=\"-89.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge8\">\n",
"<title>3-&gt;5</title>\n",
"<path d=\"M269.3911,-75.0493C275.1553,-73.1874 281.2364,-71.3919 287,-70 384.3702,-46.4854 501.695,-32.1277 561.2432,-25.8042\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"568.5606,-25.0368 561.9274,-28.8998 565.0797,-25.4019 561.5988,-25.767 561.5988,-25.767 561.5988,-25.767 565.0797,-25.4019 561.2702,-22.6342 568.5606,-25.0368 568.5606,-25.0368\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"429.5\" y=\"-49.8\">{a}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge10\">\n",
"<title>4-&gt;2</title>\n",
"<path d=\"M394.661,-108.274C412.4549,-104.3035 436.3481,-98.9719 455.7635,-94.6395\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"462.6944,-93.093 456.5484,-97.692 459.2784,-93.8553 455.8624,-94.6176 455.8624,-94.6176 455.8624,-94.6176 459.2784,-93.8553 455.1763,-91.5432 462.6944,-93.093 462.6944,-93.093\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"429.5\" y=\"-106.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge9\">\n",
"<title>4-&gt;3</title>\n",
"<path d=\"M342.1573,-111.0138C326.0201,-108.9055 305.1582,-105.6254 287,-101 283.4746,-100.102 279.8358,-99.0418 276.2261,-97.9015\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"269.3576,-95.6312 276.9925,-94.8372 272.6807,-96.7296 276.0039,-97.8281 276.0039,-97.8281 276.0039,-97.8281 272.6807,-96.7296 275.0153,-100.8189 269.3576,-95.6312 269.3576,-95.6312\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"305.5\" y=\"-111.8\">{b}</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge11\">\n",
"<title>5-&gt;5</title>\n",
"<path d=\"M589.6256,-44.2124C588.7762,-53.7952 592.2344,-62 600,-62 605.7029,-62 609.0827,-57.5751 610.1395,-51.4291\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"610.3744,-44.2124 613.2949,-51.3112 610.2605,-47.7105 610.1465,-51.2086 610.1465,-51.2086 610.1465,-51.2086 610.2605,-47.7105 606.9982,-51.1061 610.3744,-44.2124 610.3744,-44.2124\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"600\" y=\"-65.8\">{a}</text>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.SVG object>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.minimize_ta(ta).show('.A')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}