* NEWS: Mention the change. * python/spot/__init__.py: Add _repr_latex_ for twa_word, and remove __repr__ and __str__ for atomic_prop_set. * python/spot/impl.i: Implement __repr__ and __str__ for atomic_prop_set. Fix __repr__ for trival, acc_code, acc_cond, mark_t. Remove __repr__ for twa_run and twa_word. * tests/python/acc_cond.ipynb, tests/python/accparse.ipynb, tests/python/atva16-fig2a.ipynb, tests/python/automata.ipynb, tests/python/bdditer.py, tests/python/contains.ipynb, tests/python/gen.ipynb, tests/python/highlighting.ipynb, tests/python/ltlsimple.py, tests/python/ltsmin-dve.ipynb, tests/python/product.ipynb, tests/python/relabel.py, tests/python/satmin.ipynb tests/python/stutter-inv.ipynb, tests/python/word.ipynb: Adjust test cases. * tests/python/formulas.ipynb: Add test for atomic_prop_set.
4566 lines
321 KiB
Text
4566 lines
321 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# SAT-based minimization of deterministic ω-automata\n",
|
|
"\n",
|
|
"The `spot.sat_minimize()` Python function is the main entry point for minimizing any **deterministic** ω-automaton. This notebook demonstrates how to use that function.\n",
|
|
"\n",
|
|
"**Warning:** while the automata used in this notebook are quite small, working with large automata can require a lot of RAM and take huge amount of time. In its most straightforward variant, `sat_minimize()` takes a input automaton (called *reference*) and then makes a loop to ask a SAT-solver for an equivalent automaton (called *candidate*) with 1 fewer state at each iteration. If the reference has size ($n_i$, $s_i$), i.e. $n_i$ states, $s_i$ acceptance sets, and the candidate has size $(n_o, s_o)$, the SAT encoding uses $\\mathrm{O}(n_i^2\\times n_o^2\\times 2^{s_i+s_o})$ variables and $\\mathrm{O}(n_i^2 \\times n_o^3\\times 2^{s_i+2s_o}\\times |\\Sigma|)$ clauses. Reducing the number of acceptance set the therefore the most important way to simplify a problem."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import spot\n",
|
|
"spot.setup(show_default='.b')\n",
|
|
"from IPython.display import display"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Minimizing DBA\n",
|
|
"\n",
|
|
"Let's take a simple formula and translate it into a DBA:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/latex": [
|
|
"$\\mathsf{G} \\mathsf{F} (a \\leftrightarrow \\mathsf{X} \\mathsf{X} b)$"
|
|
],
|
|
"text/plain": [
|
|
"spot.formula(\"GF(a <-> XXb)\")"
|
|
]
|
|
},
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"f = spot.formula('GF(a <-> XXb)'); f"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"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=\"595pt\" height=\"336pt\"\n",
|
|
" viewBox=\"0.00 0.00 594.74 336.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 332)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-332 590.7401,-332 590.7401,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"272.3701\" y=\"-313.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"294.3701\" y=\"-313.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"310.3701\" y=\"-313.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"270.3701\" y=\"-299.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 6 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>6</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-132\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-135.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">6</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-120.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->6 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-132C4.3751,-132 17.3629,-132 30.7917,-132\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-132 30.8046,-135.1501 34.3045,-132 30.8045,-132.0001 30.8045,-132.0001 30.8045,-132.0001 34.3045,-132 30.8045,-128.8501 37.8045,-132 37.8045,-132\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"152.7401\" cy=\"-206\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"152.7401\" y=\"-202.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->0 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>6->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M85.694,-149.537C100.0819,-161.6537 119.0923,-177.6634 133.195,-189.54\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"138.9107,-194.3535 131.5273,-192.2538 136.2336,-192.099 133.5565,-189.8444 133.5565,-189.8444 133.5565,-189.8444 136.2336,-192.099 135.5856,-187.435 138.9107,-194.3535 138.9107,-194.3535\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-178.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"348.7401\" cy=\"-63\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"348.7401\" y=\"-59.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->1 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>6->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M83.9244,-112.6889C91.399,-106.1359 100.4162,-99.3736 109.7401,-95 181.7239,-61.2343 278.4478,-59.9569 323.5812,-61.5468\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"330.6261,-61.8338 323.5036,-64.6961 327.129,-61.6913 323.6319,-61.5487 323.6319,-61.5487 323.6319,-61.5487 327.129,-61.6913 323.7602,-58.4014 330.6261,-61.8338 330.6261,-61.8338\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"188.7401\" y=\"-74.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"235.7401\" cy=\"-160\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"235.7401\" y=\"-156.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M168.7434,-197.1307C181.4888,-190.067 199.4727,-180.1 213.5994,-172.2707\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"219.786,-168.842 215.1904,-174.9905 216.7247,-170.5387 213.6634,-172.2353 213.6634,-172.2353 213.6634,-172.2353 216.7247,-170.5387 212.1364,-169.4802 219.786,-168.842 219.786,-168.842\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"190.7401\" y=\"-188.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"348.7401\" cy=\"-246\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"348.7401\" y=\"-242.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->5 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M170.4161,-210.3354C193.599,-215.9467 235.5784,-225.8508 271.7401,-233 288.9987,-236.412 308.5454,-239.7052 323.626,-242.1234\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"330.6408,-243.2369 323.2335,-245.2505 327.1841,-242.6881 323.7274,-242.1394 323.7274,-242.1394 323.7274,-242.1394 327.1841,-242.6881 324.2212,-239.0284 330.6408,-243.2369 330.6408,-243.2369\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230.2401\" y=\"-232.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->6 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M217.6158,-157.03C189.4249,-152.4105 134.606,-143.4274 98.8847,-137.5739\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.5685,-136.375 98.9858,-134.3985 95.0224,-136.941 98.4764,-137.5071 98.4764,-137.5071 98.4764,-137.5071 95.0224,-136.941 97.9669,-140.6156 91.5685,-136.375 91.5685,-136.375\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"148.2401\" y=\"-152.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M228.7089,-176.6641C227.1464,-186.625 229.4901,-196 235.7401,-196 240.4276,-196 242.9178,-190.7266 243.2108,-183.8876\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"242.7714,-176.6641 246.3407,-183.4598 242.9839,-180.1576 243.1965,-183.6511 243.1965,-183.6511 243.1965,-183.6511 242.9839,-180.1576 240.0523,-183.8425 242.7714,-176.6641 242.7714,-176.6641\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"217.2401\" y=\"-199.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->5 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>4->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M249.5076,-171.9994C256.1123,-177.6185 264.2098,-184.3115 271.7401,-190 289.3472,-203.3006 294.9115,-204.9979 312.7401,-218 317.982,-221.8228 323.5563,-226.0669 328.7132,-230.071\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"334.5304,-234.6216 327.0761,-232.7896 331.7737,-232.4651 329.017,-230.3086 329.017,-230.3086 329.017,-230.3086 331.7737,-232.4651 330.9578,-227.8275 334.5304,-234.6216 334.5304,-234.6216\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271.7401\" y=\"-221.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->6 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>5->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M331.1922,-250.2555C292.2593,-258.6433 197.1684,-273.2086 134.7401,-233 108.9627,-216.3974 90.0982,-186.577 78.5141,-163.6276\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.2968,-157.0516 81.2026,-161.955 76.8349,-160.1955 78.3731,-163.3394 78.3731,-163.3394 78.3731,-163.3394 76.8349,-160.1955 75.5436,-164.7237 75.2968,-157.0516 75.2968,-157.0516\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"189.7401\" y=\"-259.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"568.7401\" cy=\"-156\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"568.7401\" y=\"-152.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M366.7486,-243.6874C401.2396,-238.6048 478.0463,-224.0842 532.7401,-190 539.416,-185.8397 545.9187,-180.3099 551.5191,-174.921\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"556.7918,-169.635 554.0785,-176.8156 554.3201,-172.113 551.8483,-174.591 551.8483,-174.591 551.8483,-174.591 554.3201,-172.113 549.6181,-172.3664 556.7918,-169.635 556.7918,-169.635\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"443.7401\" y=\"-230.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node8\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"462.2401\" cy=\"-97\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"462.2401\" y=\"-93.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M361.8961,-233.5552C368.4974,-227.6066 376.7688,-220.584 384.7401,-215 401.8527,-203.0124 412.0704,-207.8014 425.7401,-192 443.1121,-171.919 452.6664,-142.6765 457.595,-121.9488\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"459.1506,-115.0013 460.695,-122.5205 458.3859,-118.4167 457.6211,-121.8322 457.6211,-121.8322 457.6211,-121.8322 458.3859,-118.4167 454.5472,-121.1439 459.1506,-115.0013 459.1506,-115.0013\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"384.7401\" y=\"-218.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M365.8881,-57.1106C391.9652,-49.1945 442.5859,-37.9639 480.7401,-55 516.2192,-70.8416 542.8698,-109.0232 557.1043,-133.6386\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"560.6203,-139.887 554.4423,-135.3313 558.9039,-136.8368 557.1875,-133.7866 557.1875,-133.7866 557.1875,-133.7866 558.9039,-136.8368 559.9327,-132.2418 560.6203,-139.887 560.6203,-139.887\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"458.7401\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M366.7807,-65.8321C382.5811,-68.5829 406.0312,-73.3243 425.7401,-80 430.3665,-81.567 435.1866,-83.5451 439.7501,-85.5932\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"446.1999,-88.6041 438.5246,-88.4973 443.0285,-87.1236 439.857,-85.643 439.857,-85.643 439.857,-85.643 443.0285,-87.1236 441.1895,-82.7887 446.1999,-88.6041 446.1999,-88.6041\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"399.7401\" y=\"-83.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->6 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M565.3654,-138.1048C556.4948,-97.1287 528.4817,0 462.2401,0 152.7401,0 152.7401,0 152.7401,0 105.4419,0 82.0524,-59.453 71.7836,-98.5589\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"70.0161,-105.6051 68.664,-98.049 70.8677,-102.2103 71.7193,-98.8154 71.7193,-98.8154 71.7193,-98.8154 70.8677,-102.2103 74.7746,-99.5819 70.0161,-105.6051 70.0161,-105.6051\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"285.7401\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M550.4191,-156.2201C494.5492,-156.8912 326.2102,-158.9133 261.4833,-159.6908\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"254.118,-159.7792 261.0796,-156.5453 257.6177,-159.7372 261.1175,-159.6951 261.1175,-159.6951 261.1175,-159.6951 257.6177,-159.7372 261.1553,-162.8448 254.118,-159.7792 254.118,-159.7792\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"388.2401\" y=\"-161.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M564.8294,-174.0024C558.718,-200.36 546.2015,-247.4729 532.7401,-258 485.7359,-294.7582 409.6321,-271.6259 371.7242,-256.3302\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"365.1061,-253.5816 372.779,-253.3574 368.3385,-254.924 371.5708,-256.2665 371.5708,-256.2665 371.5708,-256.2665 368.3385,-254.924 370.3625,-259.1756 365.1061,-253.5816 365.1061,-253.5816\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"443.7401\" y=\"-280.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->6 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M444.2174,-100.0903C421.8823,-103.6458 382.6232,-109 348.7401,-109 152.7401,-109 152.7401,-109 152.7401,-109 133.6989,-109 113.0709,-114.1171 96.5893,-119.524\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"89.7964,-121.8449 95.402,-116.6008 93.1084,-120.7133 96.4204,-119.5816 96.4204,-119.5816 96.4204,-119.5816 93.1084,-120.7133 97.4389,-122.5625 89.7964,-121.8449 89.7964,-121.8449\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"229.2401\" y=\"-112.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M478.4152,-105.9608C496.5826,-116.0254 526.1799,-132.4221 546.5122,-143.6859\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"552.7618,-147.1482 545.1121,-146.5114 549.7002,-145.452 546.6386,-143.7559 546.6386,-143.7559 546.6386,-143.7559 549.7002,-145.452 548.1651,-141.0005 552.7618,-147.1482 552.7618,-147.1482\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"498.7401\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M453.2614,-112.916C450.9191,-123.1504 453.912,-133 462.2401,-133 468.6163,-133 471.8652,-127.2263 471.9866,-119.9268\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"471.2189,-112.916 475.1122,-119.5315 471.5999,-116.3952 471.9809,-119.8744 471.9809,-119.8744 471.9809,-119.8744 471.5999,-116.3952 468.8497,-120.2174 471.2189,-112.916 471.2189,-112.916\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"443.7401\" y=\"-136.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f787b3690> >"
|
|
]
|
|
},
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut = f.translate('det', 'BA'); aut"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The above automaton is not minimal and is easily reduced by `sat_minimize()`:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"423pt\" height=\"320pt\"\n",
|
|
" viewBox=\"0.00 0.00 422.50 320.23\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 316.232)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-316.232 418.5,-316.232 418.5,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"186.25\" y=\"-298.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"208.25\" y=\"-298.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"224.25\" y=\"-298.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"184.25\" y=\"-284.032\" 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=\"-115.232\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-111.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-115.232C4.178,-115.232 17.9448,-115.232 30.9241,-115.232\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-115.232 30.9808,-118.3821 34.4807,-115.232 30.9807,-115.2321 30.9807,-115.2321 30.9807,-115.2321 34.4807,-115.232 30.9807,-112.0821 37.9807,-115.232 37.9807,-115.232\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"171.5\" cy=\"-105.232\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"171.5\" y=\"-101.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M71.5228,-105.4963C77.6596,-102.1854 84.9272,-98.9017 92,-97.232 110.1468,-92.9481 131.1543,-95.3682 147.0156,-98.6334\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"153.9124,-100.1721 146.3944,-101.7222 150.4963,-99.4099 147.0803,-98.6478 147.0803,-98.6478 147.0803,-98.6478 150.4963,-99.4099 147.7662,-95.5734 153.9124,-100.1721 153.9124,-100.1721\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-101.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.1005,-115.245C89.7384,-115.085 112.9197,-114.4375 133,-112.232 137.4317,-111.7452 142.1212,-111.048 146.6452,-110.2803\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"153.5573,-109.0358 147.2262,-113.3764 150.1127,-109.656 146.668,-110.2763 146.668,-110.2763 146.668,-110.2763 150.1127,-109.656 146.1098,-107.1761 153.5573,-109.0358 153.5573,-109.0358\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"94\" y=\"-133.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"104.5\" y=\"-118.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"396\" cy=\"-80.232\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"396\" y=\"-76.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M59.6172,-132.8704C65.7164,-161.0523 78.689,-214.467 92,-228.232 123.5696,-260.8783 147.083,-255.9313 192,-249.232 274.7641,-236.8878 305.3108,-227.5673 360,-164.232 374.8299,-147.0576 384.3257,-122.8563 389.8188,-104.8394\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"391.7979,-98.0223 392.8713,-105.623 390.822,-101.3836 389.8462,-104.7448 389.8462,-104.7448 389.8462,-104.7448 390.822,-101.3836 386.8211,-103.8665 391.7979,-98.0223 391.7979,-98.0223\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"213.5\" y=\"-265.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"222.5\" y=\"-250.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"287\" cy=\"-126.232\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"287\" y=\"-122.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M58.5062,-133.1241C62.2785,-153.5161 71.3199,-186.5586 92,-206.232 112.0605,-225.3159 123.681,-221.7275 151,-226.232 195.7208,-233.6057 217.4494,-236.7062 251,-206.232 266.9808,-191.7165 276.3016,-168.7481 281.4381,-151.1382\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"283.3905,-143.9594 284.593,-151.5407 282.472,-147.3367 281.5534,-150.714 281.5534,-150.714 281.5534,-150.714 282.472,-147.3367 278.5138,-149.8873 283.3905,-143.9594 283.3905,-143.9594\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"153\" y=\"-234.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M161.687,-120.3986C158.7134,-130.8961 161.9844,-141.232 171.5,-141.232 178.7854,-141.232 182.4103,-135.1733 182.3747,-127.622\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"181.313,-120.3986 185.4476,-126.8661 181.822,-123.8614 182.331,-127.3242 182.331,-127.3242 182.331,-127.3242 181.822,-123.8614 179.2145,-127.7823 181.313,-120.3986 181.313,-120.3986\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"153\" y=\"-145.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M186.0663,-115.9503C192.9555,-120.3704 201.5179,-124.9794 210,-127.232 226.8785,-131.7143 246.58,-131.362 261.8291,-129.9419\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"268.9255,-129.1754 262.3043,-133.059 265.4458,-129.5513 261.966,-129.9272 261.966,-129.9272 261.966,-129.9272 265.4458,-129.5513 261.6277,-126.7954 268.9255,-129.1754 268.9255,-129.1754\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"213.5\" y=\"-134.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M188.183,-97.9037C204.6576,-91.7639 230.3158,-85.1862 251,-93.232 258.5018,-96.1501 265.3905,-101.4423 271.0893,-106.9464\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"275.9717,-111.9988 268.8421,-109.154 273.5395,-109.4819 271.1073,-106.9651 271.1073,-106.9651 271.1073,-106.9651 273.5395,-109.4819 273.3725,-104.7761 275.9717,-111.9988 275.9717,-111.9988\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"224\" y=\"-112.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"222.5\" y=\"-97.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M385.451,-65.5181C379.0566,-57.9068 370.1766,-49.3636 360,-45.232 298.2244,-20.1519 276.4789,-42.1542 210,-47.232 157.2294,-51.2627 137.119,-35.5686 92,-63.232 80.9148,-70.0286 72.3818,-81.6644 66.4119,-92.2079\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"63.0261,-98.5786 63.5297,-90.919 64.6687,-95.488 66.3113,-92.3974 66.3113,-92.3974 66.3113,-92.3974 64.6687,-95.488 69.0929,-93.8757 63.0261,-98.5786 63.0261,-98.5786\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"210\" y=\"-51.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M388.2528,-63.772C382.1379,-52.593 372.5477,-38.4057 360,-30.232 303.4869,6.5812 276.7079,2.7174 210,-7.232 155.769,-15.3205 133.8792,-7.8406 92,-43.232 77.4671,-55.5135 68.2099,-75.0963 62.7274,-90.7407\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"60.4686,-97.6111 59.6625,-89.9774 61.5618,-94.2861 62.655,-90.9612 62.655,-90.9612 62.655,-90.9612 61.5618,-94.2861 65.6474,-91.9451 60.4686,-97.6111 60.4686,-97.6111\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"212\" y=\"-26.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"222.5\" y=\"-11.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M386.7674,-95.7734C384.1685,-106.1407 387.2461,-116.232 396,-116.232 402.7022,-116.232 406.077,-110.3167 406.1245,-102.8911\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"405.2326,-95.7734 409.2286,-102.3274 405.6678,-99.2463 406.103,-102.7191 406.103,-102.7191 406.103,-102.7191 405.6678,-99.2463 402.9775,-103.1108 405.2326,-95.7734 405.2326,-95.7734\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"377.5\" y=\"-120.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M387.2399,-96.2957C381.02,-105.9588 371.7052,-117.4702 360,-123.232 345.2697,-130.4829 326.7729,-131.1684 312.0841,-130.074\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"304.7901,-129.3648 312.0622,-126.9071 308.2737,-129.7035 311.7573,-130.0423 311.7573,-130.0423 311.7573,-130.0423 308.2737,-129.7035 311.4524,-133.1775 304.7901,-129.3648 304.7901,-129.3648\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"324.5\" y=\"-149.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"333.5\" y=\"-134.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M272.5077,-136.92C266.1562,-141.2193 258.4603,-145.9302 251,-149.232 209.8412,-167.4483 195.5677,-171.5248 151,-165.232 123.979,-161.4167 115.7998,-161.5834 92,-148.232 85.345,-144.4986 78.9198,-139.3116 73.3854,-134.1544\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"68.1724,-129.0622 75.381,-131.7003 70.6761,-131.5079 73.1798,-133.9536 73.1798,-133.9536 73.1798,-133.9536 70.6761,-131.5079 70.9787,-136.207 68.1724,-129.0622 68.1724,-129.0622\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"151\" y=\"-186.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"163.5\" y=\"-171.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M276.79,-111.292C270.2635,-102.6851 261.1385,-92.2215 251,-85.232 227.9589,-69.3475 219.5414,-68.1998 192,-63.232 146.6951,-55.0601 131.9947,-67.4343 92,-90.232 86.8871,-93.1465 81.5776,-96.5819 76.657,-99.9574\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"70.6763,-104.1573 74.5946,-97.5565 73.5406,-102.1458 76.4049,-100.1343 76.4049,-100.1343 76.4049,-100.1343 73.5406,-102.1458 78.2152,-102.7122 70.6763,-104.1573 70.6763,-104.1573\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"153\" y=\"-67.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M290.5238,-108.3295C294.9228,-91.3357 304.2751,-66.7321 323,-55.232 337.0127,-46.626 344.3071,-50.3175 360,-55.232 365.9499,-57.0953 371.779,-60.3269 376.9551,-63.8601\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"382.6996,-68.0823 375.1937,-66.4748 379.8794,-66.0094 377.0593,-63.9366 377.0593,-63.9366 377.0593,-63.9366 379.8794,-66.0094 378.9248,-61.3984 382.6996,-68.0823 382.6996,-68.0823\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"323\" y=\"-74.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"333.5\" y=\"-59.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M301.9849,-116.0037C308.2906,-111.9862 315.8197,-107.5519 323,-104.232 338.7136,-96.9665 357.2538,-90.9001 371.7175,-86.6839\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"378.4601,-84.7656 372.5893,-89.7109 375.0937,-85.7234 371.7273,-86.6812 371.7273,-86.6812 371.7273,-86.6812 375.0937,-85.7234 370.8653,-83.6514 378.4601,-84.7656 378.4601,-84.7656\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"324.5\" y=\"-108.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78fcd840> >"
|
|
]
|
|
},
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(aut)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Note that by default SAT-minimize produces a transition-based automaton with the same acceptance condition. State-based acceptance can be requested with the `state_based` option:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"603pt\" height=\"360pt\"\n",
|
|
" viewBox=\"0.00 0.00 602.83 360.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.9207 .9207) rotate(0) translate(4 387)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-387 650.7401,-387 650.7401,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"302.3701\" y=\"-368.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"324.3701\" y=\"-368.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"340.3701\" y=\"-368.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"300.3701\" y=\"-354.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-188\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-184.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-188C4.178,-188 17.9448,-188 30.9241,-188\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-188 30.9808,-191.1501 34.4807,-188 30.9807,-188.0001 30.9807,-188.0001 30.9807,-188.0001 34.4807,-188 30.9807,-184.8501 37.9807,-188 37.9807,-188\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-205.0373C48.3189,-214.8579 50.4453,-224 56,-224 60.166,-224 62.4036,-218.8576 62.7128,-212.1433\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-205.0373 65.8541,-211.8818 62.5434,-208.5335 62.7076,-212.0296 62.7076,-212.0296 62.7076,-212.0296 62.5434,-208.5335 59.561,-212.1774 62.3792,-205.0373 62.3792,-205.0373\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"37.5\" y=\"-227.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"167.8701\" cy=\"-188\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"163.3701\" y=\"-191.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"159.8701\" y=\"-176.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.4731,-188C90.5415,-188 114.2434,-188 133.7488,-188\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"140.9943,-188 133.9944,-191.1501 137.4943,-188 133.9943,-188.0001 133.9943,-188.0001 133.9943,-188.0001 137.4943,-188 133.9943,-184.8501 140.9943,-188 140.9943,-188\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-191.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M156.7546,-212.9167C155.8446,-223.6664 159.5497,-232.8701 167.8701,-232.8701 174.2403,-232.8701 177.9052,-227.475 178.8648,-220.1217\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"178.9855,-212.9167 182.0177,-219.9686 178.9268,-216.4162 178.8681,-219.9158 178.8681,-219.9158 178.8681,-219.9158 178.9268,-216.4162 175.7186,-219.863 178.9855,-212.9167 178.9855,-212.9167\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"150.8701\" y=\"-236.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"288.2401\" cy=\"-275\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"288.2401\" y=\"-271.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M179.4514,-212.4769C187.1144,-226.2252 198.3958,-242.6492 212.7401,-253 227.4875,-263.6416 247.3287,-269.1653 262.9702,-272.0159\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"270.2707,-273.2112 262.8536,-275.1887 266.8167,-272.6457 263.3627,-272.0801 263.3627,-272.0801 263.3627,-272.0801 266.8167,-272.6457 263.8717,-268.9714 270.2707,-273.2112 270.2707,-273.2112\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"212.7401\" y=\"-272.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"406.2401\" cy=\"-224\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"406.2401\" y=\"-220.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->5 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M194.6111,-184.8533C223.1402,-182.1814 269.5286,-179.81 308.7401,-187 335.343,-191.878 364.0989,-203.6623 383.4362,-212.6315\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"389.8643,-215.6707 382.1895,-215.5264 386.7001,-214.1747 383.536,-212.6786 383.536,-212.6786 383.536,-212.6786 386.7001,-214.1747 384.8824,-209.8309 389.8643,-215.6707 389.8643,-215.6707\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"282.7401\" y=\"-190.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M271.2966,-282.0488C264.6915,-284.4421 256.9801,-286.8107 249.7401,-288 233.5132,-290.6657 228.8438,-291.3305 212.7401,-288 155.7851,-276.2208 101.3567,-231.4836 74.1134,-206.0182\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"68.7215,-200.8955 75.966,-203.4333 71.2589,-203.3062 73.7963,-205.717 73.7963,-205.717 73.7963,-205.717 71.2589,-203.3062 71.6266,-208.0006 68.7215,-200.8955 68.7215,-200.8955\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"149.3701\" y=\"-285.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M276.8096,-260.5311C269.6486,-252.0912 259.8789,-241.6377 249.7401,-234 234.9749,-222.8772 228.8912,-223.9929 212.7401,-215 207.7135,-212.2012 202.4303,-209.1363 197.3244,-206.1078\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"190.9845,-202.314 198.6087,-203.2054 193.9878,-204.1113 196.9912,-205.9085 196.9912,-205.9085 196.9912,-205.9085 193.9878,-204.1113 195.3737,-208.6115 190.9845,-202.314 190.9845,-202.314\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"214.2401\" y=\"-237.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M278.6655,-290.5414C275.9705,-300.9087 279.162,-311 288.2401,-311 295.1906,-311 298.6904,-305.0847 298.7396,-297.6591\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"297.8147,-290.5414 301.8405,-297.0771 298.2658,-294.0123 298.7168,-297.4831 298.7168,-297.4831 298.7168,-297.4831 298.2658,-294.0123 295.5931,-297.889 297.8147,-290.5414 297.8147,-290.5414\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"269.7401\" y=\"-314.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M304.7084,-267.6778C311.5199,-264.6624 319.5029,-261.1453 326.7401,-258 345.4842,-249.8539 366.777,-240.7558 382.6059,-234.0224\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"389.4653,-231.107 384.2552,-236.7441 386.2442,-232.476 383.0231,-233.8451 383.0231,-233.8451 383.0231,-233.8451 386.2442,-232.476 381.7909,-230.9461 389.4653,-231.107 389.4653,-231.107\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"326.7401\" y=\"-261.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->0 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>5->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M396.0901,-239.3538C388.6718,-250.2168 378.1318,-264.9367 367.7401,-277 343.7412,-304.8595 342.7718,-321.0737 308.7401,-335 291.8753,-341.9013 285.8061,-337.3811 267.7401,-335 209.9196,-327.3791 190.9216,-331.1518 141,-301 105.55,-279.5887 79.9093,-237.3241 66.5445,-210.9892\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"63.4126,-204.6594 69.3403,-209.5365 64.9648,-207.7964 66.517,-210.9335 66.517,-210.9335 66.517,-210.9335 64.9648,-207.7964 63.6937,-212.3304 63.4126,-204.6594 63.4126,-204.6594\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"212.7401\" y=\"-335.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->1 -->\n",
|
|
"<g id=\"edge20\" class=\"edge\">\n",
|
|
"<title>5->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M388.2374,-221.2811C348.5368,-215.2853 252.9358,-200.8471 201.6787,-193.106\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"194.7508,-192.0597 202.1427,-189.9904 198.2115,-192.5824 201.6723,-193.1051 201.6723,-193.1051 201.6723,-193.1051 198.2115,-192.5824 201.2018,-196.2198 194.7508,-192.0597 194.7508,-192.0597\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271.2401\" y=\"-211.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"628.7401\" cy=\"-161\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"628.7401\" y=\"-157.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge21\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M423.6993,-219.0565C463.1802,-207.8776 559.3941,-180.635 604.5668,-167.8446\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"611.362,-165.9205 605.485,-170.8585 607.9944,-166.8741 604.6268,-167.8277 604.6268,-167.8277 604.6268,-167.8277 607.9944,-166.8741 603.7686,-164.7968 611.362,-165.9205 611.362,-165.9205\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"503.7401\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"522.2401\" cy=\"-51\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"522.2401\" y=\"-47.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge22\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M415.9225,-208.6264C423.632,-196.4549 434.7494,-179.0569 444.7401,-164 466.2599,-131.5677 491.9295,-94.4333 507.6539,-71.8555\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"511.8135,-65.8894 510.394,-73.4331 509.8118,-68.7604 507.81,-71.6315 507.81,-71.6315 507.81,-71.6315 509.8118,-68.7604 505.226,-69.8299 511.8135,-65.8894 511.8135,-65.8894\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"444.7401\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M625.6838,-143.155C617.3768,-101.2367 590.2722,0 522.2401,0 167.8701,0 167.8701,0 167.8701,0 92.936,0 67.0571,-111.6653 59.1288,-162.8771\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"58.0856,-169.9738 55.9872,-162.59 58.5947,-166.511 59.1037,-163.0482 59.1037,-163.0482 59.1037,-163.0482 58.5947,-166.511 62.2202,-163.5064 58.0856,-169.9738 58.0856,-169.9738\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"328.7401\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M610.7421,-158.1666C583.6934,-154.066 530.9131,-146.6757 485.7401,-144 381.2066,-137.8083 258.8166,-164.4284 201.1435,-179.0158\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"194.1052,-180.818 200.105,-176.03 197.4958,-179.9498 200.8864,-179.0816 200.8864,-179.0816 200.8864,-179.0816 197.4958,-179.9498 201.6678,-182.1331 194.1052,-180.818 194.1052,-180.818\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"385.7401\" y=\"-150.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M623.0784,-178.2944C617.4686,-193.0114 607.555,-213.8049 592.7401,-227 574.1277,-243.5774 564.8033,-241.5041 540.7401,-248 465.7374,-268.2471 445.1516,-266.4561 367.7401,-273 349.6513,-274.5291 329.1719,-275.0151 313.5294,-275.1261\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"306.2705,-275.1534 313.2586,-271.977 309.7705,-275.1402 313.2705,-275.127 313.2705,-275.127 313.2705,-275.127 309.7705,-275.1402 313.2824,-278.2769 306.2705,-275.1534 306.2705,-275.1534\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"448.2401\" y=\"-269.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M620.3981,-177.4776C614.2392,-187.8039 604.8349,-200.3721 592.7401,-207 540.8835,-235.4173 468.5762,-232.0371 431.0506,-227.697\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"424.0256,-226.8254 431.3602,-224.5614 427.499,-227.2564 430.9723,-227.6874 430.9723,-227.6874 430.9723,-227.6874 427.499,-227.2564 430.5844,-230.8134 424.0256,-226.8254 424.0256,-226.8254\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"503.7401\" y=\"-232.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->0 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>4->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M504.1671,-49.7383C481.3573,-48.2571 440.9112,-46 406.2401,-46 167.8701,-46 167.8701,-46 167.8701,-46 108.6569,-46 75.9596,-123.1299 62.8565,-163.7003\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"60.7068,-170.588 59.7855,-162.9674 61.7496,-167.247 62.7924,-163.9059 62.7924,-163.9059 62.7924,-163.9059 61.7496,-167.247 65.7994,-164.8445 60.7068,-170.588 60.7068,-170.588\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"267.7401\" y=\"-49.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->1 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>4->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M504.4596,-55.5733C498.5216,-57.05 491.859,-58.6525 485.7401,-60 365.0335,-86.5812 313.9268,-42.0219 212.7401,-113 197.7407,-123.5214 186.9084,-140.8035 179.6492,-156.1277\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"176.7551,-162.5499 176.7592,-154.8737 178.1931,-159.3589 179.6311,-156.1679 179.6311,-156.1679 179.6311,-156.1679 178.1931,-159.3589 182.5029,-157.4621 176.7551,-162.5499 176.7551,-162.5499\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"328.7401\" y=\"-74.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->3 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>4->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M538.2413,-59.7253C553.55,-68.6375 576.6288,-83.6071 592.7401,-101 602.9095,-111.9783 611.6278,-126.2843 617.9368,-138.1734\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"621.1878,-144.4933 615.1846,-139.7096 619.5868,-141.381 617.9857,-138.2686 617.9857,-138.2686 617.9857,-138.2686 619.5868,-141.381 620.7868,-136.8277 621.1878,-144.4933 621.1878,-144.4933\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"558.7401\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M513.2614,-66.916C510.9191,-77.1504 513.912,-87 522.2401,-87 528.6163,-87 531.8652,-81.2263 531.9866,-73.9268\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"531.2189,-66.916 535.1122,-73.5315 531.5999,-70.3952 531.9809,-73.8744 531.9809,-73.8744 531.9809,-73.8744 531.5999,-70.3952 528.8497,-74.2174 531.2189,-66.916 531.2189,-66.916\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"503.7401\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78761300> >"
|
|
]
|
|
},
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(aut, state_based=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Minimizing deterministic ω-automata with arbitrary acceptance condition\n",
|
|
"\n",
|
|
"Now let's look at examples with more complicated acceptance conditions. \n",
|
|
"The following Rabin automaton was produced using ltl2dstar 0.5.4 and spot 2.5.2 with\n",
|
|
"```\n",
|
|
"ltlfilt --lbt -f '(FGa | Fb) & FGc' | ltl2dstar -H --ltl2nba=spin:ltl2tgba@-Ds - -\n",
|
|
"```\n",
|
|
"however we hardcode it so that the notebook can be used even with `ltl2dstar` installed."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Title: & | F G a F b F G c Pages: 1 -->\n",
|
|
"<svg width=\"734pt\" height=\"262pt\"\n",
|
|
" viewBox=\"0.00 0.00 734.00 261.56\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.7976 .7976) rotate(0) translate(4 323.9411)\">\n",
|
|
"<title>& | F G a F b F G c</title>\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-323.9411 916.2935,-323.9411 916.2935,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"339.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"367.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"383.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"426.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"442.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"489.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"505.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"548.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"564.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"427.1468\" y=\"-291.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"71.9411\" cy=\"-203.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"67.4411\" y=\"-207.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
|
|
"<text text-anchor=\"start\" x=\"55.9411\" y=\"-193.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"71.9411\" y=\"-193.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->5 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.3023,-203.9411C4.5397,-203.9411 17.1247,-203.9411 30.795,-203.9411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.999,-203.9411 30.999,-207.0912 34.499,-203.9412 30.999,-203.9412 30.999,-203.9412 30.999,-203.9412 34.499,-203.9412 30.9989,-200.7912 37.999,-203.9411 37.999,-203.9411\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5->5 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>5->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M62.1917,-236.6575C62.2421,-247.3601 65.4919,-255.8823 71.9411,-255.8823 76.8788,-255.8823 79.9411,-250.8867 81.1279,-243.7418\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.6905,-236.6575 84.2763,-243.885 81.4134,-240.1466 81.1362,-243.6356 81.1362,-243.6356 81.1362,-243.6356 81.4134,-240.1466 77.9961,-243.3861 81.6905,-236.6575 81.6905,-236.6575\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"18.4411\" y=\"-259.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"763.4701\" cy=\"-173.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"758.9701\" y=\"-177.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
|
|
"<text text-anchor=\"start\" x=\"747.4701\" y=\"-163.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"763.4701\" y=\"-163.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M105.4303,-209.6067C146.9318,-216.1251 219.8779,-225.9411 282.8234,-225.9411 282.8234,-225.9411 282.8234,-225.9411 648.5879,-225.9411 678.0047,-225.9411 708.1904,-211.6156 730.2337,-198.0027\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"736.2278,-194.1946 732.0085,-200.6072 733.2735,-196.0715 730.3193,-197.9484 730.3193,-197.9484 730.3193,-197.9484 733.2735,-196.0715 728.6301,-195.2896 736.2278,-194.1946 736.2278,-194.1946\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"426.2056\" y=\"-229.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"878.3524\" cy=\"-211.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"873.8524\" y=\"-215.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"862.3524\" y=\"-201.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"878.3524\" y=\"-201.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M101.24,-221.4818C108.4683,-225.3159 116.3125,-229.0783 123.8823,-231.9411 191.7221,-257.5976 210.2941,-268.9411 282.8234,-268.9411 282.8234,-268.9411 282.8234,-268.9411 763.4701,-268.9411 793.5903,-268.9411 823.958,-253.0238 845.9004,-238.0119\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"851.8587,-233.8158 847.9493,-240.4218 848.9971,-235.8311 846.1355,-237.8464 846.1355,-237.8464 846.1355,-237.8464 848.9971,-235.8311 844.3217,-235.271 851.8587,-233.8158 851.8587,-233.8158\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"529.6468\" y=\"-272.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"282.8234\" cy=\"-130.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"278.3234\" y=\"-134.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"266.8234\" y=\"-120.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"282.8234\" y=\"-120.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M105.6811,-199.85C138.6856,-194.9908 189.8317,-185.1451 230.8823,-166.9411 237.4267,-164.039 244.0094,-160.2775 250.1856,-156.2833\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.2099,-152.2347 252.1571,-158.7537 253.305,-154.187 250.4,-156.1392 250.4,-156.1392 250.4,-156.1392 253.305,-154.187 248.643,-153.5248 256.2099,-152.2347 256.2099,-152.2347\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"146.3823\" y=\"-199.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"444.7056\" cy=\"-84.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"440.2056\" y=\"-88.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7056\" y=\"-74.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"444.7056\" y=\"-74.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M429.7505,-115.6106C429.1737,-127.2527 434.1588,-136.8823 444.7056,-136.8823 452.9454,-136.8823 457.7904,-131.0048 459.2409,-122.8821\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"459.6608,-115.6106 462.4019,-122.7806 459.4589,-119.1048 459.2571,-122.599 459.2571,-122.599 459.2571,-122.599 459.4589,-119.1048 456.1124,-122.4174 459.6608,-115.6106 459.6608,-115.6106\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7056\" y=\"-140.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"648.5879\" cy=\"-33.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"644.0879\" y=\"-37.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"632.5879\" y=\"-23.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"648.5879\" y=\"-23.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M477.9166,-76.6336C513.6083,-67.7055 570.3403,-53.5143 608.4927,-43.9707\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"615.3911,-42.2451 609.3648,-46.9997 611.9957,-43.0945 608.6004,-43.9439 608.6004,-43.9439 608.6004,-43.9439 611.9957,-43.0945 607.8359,-40.888 615.3911,-42.2451 615.3911,-42.2451\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"528.6468\" y=\"-75.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M477.8108,-94.0592C523.7733,-106.7342 609.5106,-130.4351 682.529,-150.9411 696.0628,-154.7419 710.8584,-158.935 724.0551,-162.6885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"730.7952,-164.6069 723.2002,-165.7202 727.4289,-163.6487 724.0626,-162.6906 724.0626,-162.6906 724.0626,-162.6906 727.4289,-163.6487 724.9249,-159.6609 730.7952,-164.6069 730.7952,-164.6069\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"643.0879\" y=\"-154.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M638.0879,-66.4043C638.0879,-77.2254 641.5879,-85.8823 648.5879,-85.8823 653.9473,-85.8823 657.255,-80.8078 658.5111,-73.5727\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"659.0879,-66.4043 661.6662,-73.6345 658.8071,-69.8931 658.5264,-73.3818 658.5264,-73.3818 658.5264,-73.3818 658.8071,-69.8931 655.3865,-73.1291 659.0879,-66.4043 659.0879,-66.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"645.0879\" y=\"-89.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M670.9695,-59.7652C683.1037,-73.888 698.2848,-91.7556 711.529,-107.9411 720.2551,-118.6051 729.6166,-130.3896 737.9554,-141.0141\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"742.4723,-146.7829 735.6766,-143.2133 740.3145,-144.0271 738.1568,-141.2713 738.1568,-141.2713 738.1568,-141.2713 740.3145,-144.0271 740.637,-139.3294 742.4723,-146.7829 742.4723,-146.7829\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"700.529\" y=\"-111.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M752.9701,-206.4043C752.9701,-217.2254 756.4701,-225.8823 763.4701,-225.8823 768.8295,-225.8823 772.1372,-220.8078 773.3933,-213.5727\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"773.9701,-206.4043 776.5485,-213.6345 773.6894,-209.8931 773.4086,-213.3818 773.4086,-213.3818 773.4086,-213.3818 773.6894,-209.8931 770.2688,-213.1291 773.9701,-206.4043 773.9701,-206.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"757.9701\" y=\"-229.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>4->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M795.777,-184.6274C809.2368,-189.0795 824.9901,-194.2903 839.108,-198.9601\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"845.89,-201.2034 838.2549,-201.9957 842.5671,-200.1043 839.2441,-199.0051 839.2441,-199.0051 839.2441,-199.0051 842.5671,-200.1043 840.2334,-196.0144 845.89,-201.2034 845.89,-201.2034\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"817.4113\" y=\"-197.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M852.8311,-189.1741C844.9028,-183.4257 835.7727,-178.0167 826.4113,-174.9411 819.5587,-172.6898 812.0559,-171.5329 804.6937,-171.0557\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"797.4077,-170.7897 804.518,-167.8972 800.9054,-170.9174 804.403,-171.0451 804.403,-171.0451 804.403,-171.0451 800.9054,-170.9174 804.2881,-174.193 797.4077,-170.7897 797.4077,-170.7897\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"815.4113\" y=\"-178.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M867.8524,-244.4043C867.8524,-255.2254 871.3524,-263.8823 878.3524,-263.8823 883.7118,-263.8823 887.0195,-258.8078 888.2756,-251.5727\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"888.8524,-244.4043 891.4307,-251.6345 888.5716,-247.8931 888.2909,-251.3818 888.2909,-251.3818 888.2909,-251.3818 888.5716,-247.8931 885.151,-251.1291 888.8524,-244.4043 888.8524,-244.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"874.8524\" y=\"-267.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M248.7498,-129.2618C215.2662,-128.9915 163.5639,-132.3469 123.8823,-151.9411 114.2145,-156.7149 105.2699,-164.0028 97.6243,-171.6249\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"92.5459,-176.9283 95.1121,-169.6938 94.9666,-174.4004 97.3873,-171.8724 97.3873,-171.8724 97.3873,-171.8724 94.9666,-174.4004 99.6624,-174.0511 92.5459,-176.9283 92.5459,-176.9283\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"123.8823\" y=\"-155.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M315.5827,-121.6323C341.4743,-114.275 377.7078,-103.979 405.2043,-96.1657\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"411.9951,-94.2361 406.1227,-99.1795 408.6283,-95.1928 405.2616,-96.1495 405.2616,-96.1495 405.2616,-96.1495 408.6283,-95.1928 404.4006,-93.1194 411.9951,-94.2361 411.9951,-94.2361\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"334.7645\" y=\"-120.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M315.6329,-140.4855C341.2871,-147.4959 377.9782,-156.5352 410.7645,-160.9411 522.4531,-175.95 655.7003,-176.1033 721.887,-174.9996\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"729.2355,-174.8671 722.2934,-178.1428 725.7361,-174.9302 722.2366,-174.9934 722.2366,-174.9934 722.2366,-174.9934 725.7361,-174.9302 722.1798,-171.8439 729.2355,-174.8671 729.2355,-174.8671\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"496.6468\" y=\"-178.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M267.8682,-161.6106C267.2915,-173.2527 272.2765,-182.8823 282.8234,-182.8823 291.0631,-182.8823 295.9082,-177.0048 297.3586,-168.8821\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"297.7785,-161.6106 300.5196,-168.7806 297.5767,-165.1048 297.3749,-168.599 297.3749,-168.599 297.3749,-168.599 297.5767,-165.1048 294.2301,-168.4174 297.7785,-161.6106 297.7785,-161.6106\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"251.8234\" y=\"-186.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78761db0> >"
|
|
]
|
|
},
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"large = spot.automaton('''\n",
|
|
"HOA: v1 States: 6 properties: implicit-labels trans-labels no-univ-branch\n",
|
|
"deterministic complete stutter-invariant tool: \"ltl2dstar\" \"0.5.4\"\n",
|
|
"name: \"& | F G a F b F G c\" comment: \"Safra[NBA=4]\" acc-name: Rabin 2\n",
|
|
"Acceptance: 4 (Fin(0)&Inf(1))|(Fin(2)&Inf(3)) Start: 5 AP: 3 \"a\" \"b\"\n",
|
|
"\"c\" --BODY-- State: 0 {1 3} 4 4 4 4 1 0 1 0 State: 1 {0 3} 4 4 4 4 1 1\n",
|
|
"1 1 State: 2 {1 2} 4 4 4 4 2 2 2 2 State: 3 {1 2} 5 5 4 4 5 3 4 0 State:\n",
|
|
"4 {0 2} 4 4 4 4 2 2 2 2 State: 5 {0 2} 5 5 4 4 5 3 2 2 --END--''')\n",
|
|
"large.merge_edges()\n",
|
|
"large"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"It can be minimized as a 2-state transition-based Rabin automaton:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"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=\"257pt\" height=\"236pt\"\n",
|
|
" viewBox=\"0.00 0.00 257.00 236.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 232.0026)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-232.0026 253,-232.0026 253,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"8\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"36\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"52\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"95\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"111\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"158\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"174\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"217\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"233\" y=\"-213.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"95.5\" y=\"-199.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"88.75\" cy=\"-32.0026\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"88.75\" y=\"-28.3026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M33.8733,-32.0026C36.928,-32.0026 50.6948,-32.0026 63.6741,-32.0026\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"70.7307,-32.0026 63.7308,-35.1527 67.2307,-32.0027 63.7307,-32.0027 63.7307,-32.0027 63.7307,-32.0027 67.2307,-32.0027 63.7307,-28.8527 70.7307,-32.0026 70.7307,-32.0026\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M86.5791,-50.1553C86.2451,-59.5417 86.9688,-68.0026 88.75,-68.0026 90.0581,-68.0026 90.7958,-63.4396 90.9632,-57.298\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"90.9209,-50.1553 94.1124,-57.1365 90.9417,-53.6553 90.9624,-57.1552 90.9624,-57.1552 90.9624,-57.1552 90.9417,-53.6553 87.8125,-57.1739 90.9209,-50.1553 90.9209,-50.1553\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"55.75\" y=\"-86.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"80.75\" y=\"-71.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M85.375,-49.9089C83.125,-71.0026 84.25,-98.0026 88.75,-98.0026 92.7578,-98.0026 94.0885,-76.5859 92.7422,-56.9992\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"92.125,-49.9089 95.8702,-56.6093 92.4285,-53.3957 92.7321,-56.8825 92.7321,-56.8825 92.7321,-56.8825 92.4285,-53.3957 89.594,-57.1557 92.125,-49.9089 92.125,-49.9089\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"57.75\" y=\"-116.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"80.75\" y=\"-101.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.6367,-49.7741C80.0664,-80.4714 81.4375,-128.0026 88.75,-128.0026 95.5198,-128.0026 97.1973,-87.265 93.7827,-56.8609\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"92.8633,-49.7741 96.8878,-56.3106 93.3136,-53.245 93.764,-56.7159 93.764,-56.7159 93.764,-56.7159 93.3136,-53.245 90.6402,-57.1212 92.8633,-49.7741 92.8633,-49.7741\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"68.25\" y=\"-145.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b & !c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"72.75\" y=\"-131.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"88.75\" y=\"-131.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"197.75\" cy=\"-32.0026\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"197.75\" y=\"-28.3026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M106.6627,-34.388C112.4264,-35.0496 118.8479,-35.6757 124.75,-36.0026 141.1693,-36.912 145.3307,-36.912 161.75,-36.0026 165.3466,-35.8034 169.1361,-35.4931 172.852,-35.1314\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"179.8373,-34.388 173.21,-38.2611 176.357,-34.7584 172.8766,-35.1288 172.8766,-35.1288 172.8766,-35.1288 176.357,-34.7584 172.5433,-31.9965 179.8373,-34.388 179.8373,-34.388\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"124.75\" y=\"-53.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"127.25\" y=\"-39.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"143.25\" y=\"-39.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M101.4792,-18.714C107.8563,-13.0119 116.0624,-6.9834 124.75,-4.0026 140.3044,1.3342 146.1956,1.3342 161.75,-4.0026 168.13,-6.1916 174.2502,-10.0243 179.5772,-14.1643\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"185.0208,-18.714 177.6297,-16.6419 182.3353,-16.4695 179.6497,-14.2249 179.6497,-14.2249 179.6497,-14.2249 182.3353,-16.4695 181.6698,-11.808 185.0208,-18.714 185.0208,-18.714\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"126.25\" y=\"-21.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"127.25\" y=\"-7.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"143.25\" y=\"-7.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M194.5143,-49.7843C193.9644,-59.3176 195.043,-68.0026 197.75,-68.0026 199.738,-68.0026 200.8477,-63.3187 201.0792,-57.0547\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"200.9857,-49.7843 204.2256,-56.7432 201.0308,-53.2841 201.0758,-56.7838 201.0758,-56.7838 201.0758,-56.7838 201.0308,-53.2841 197.9261,-56.8243 200.9857,-49.7843 200.9857,-49.7843\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"179.25\" y=\"-86.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"189.75\" y=\"-71.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M192.7406,-49.5798C189.2951,-70.7206 190.9648,-98.0026 197.75,-98.0026 203.793,-98.0026 205.7785,-76.3622 203.7064,-56.6933\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"202.7594,-49.5798 206.8056,-56.1028 203.2213,-53.0492 203.6832,-56.5185 203.6832,-56.5185 203.6832,-56.5185 203.2213,-53.0492 200.5607,-56.9343 202.7594,-49.5798 202.7594,-49.5798\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"192.25\" y=\"-115.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"181.75\" y=\"-101.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"197.75\" y=\"-101.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M191.6796,-49.155C184.705,-79.3463 186.7285,-126.0026 197.75,-126.0026 207.9535,-126.0026 210.445,-86.0148 205.2247,-56.1236\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"203.8204,-49.155 208.2912,-55.3948 204.5119,-52.5861 205.2033,-56.0171 205.2033,-56.0171 205.2033,-56.0171 204.5119,-52.5861 202.1153,-56.6394 203.8204,-49.155 203.8204,-49.155\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"180.75\" y=\"-143.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"181.75\" y=\"-129.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"197.75\" y=\"-129.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78761ba0> >"
|
|
]
|
|
},
|
|
"execution_count": 7,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"small = spot.sat_minimize(large); small"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Or as a 4-state state-based Rabin automaton:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"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=\"590pt\" height=\"224pt\"\n",
|
|
" viewBox=\"0.00 0.00 590.24 223.87\" 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 219.8701)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-219.8701 586.2447,-219.8701 586.2447,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"174.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"202.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"218.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"261.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"277.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"324.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"340.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"383.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"399.6224\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"262.1224\" y=\"-187.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"71.9411\" cy=\"-100.8701\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"67.4411\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"55.9411\" y=\"-90.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"71.9411\" y=\"-90.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.3023,-100.8701C4.5397,-100.8701 17.1247,-100.8701 30.795,-100.8701\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.999,-100.8701 30.999,-104.0202 34.499,-100.8701 30.999,-100.8702 30.999,-100.8702 30.999,-100.8702 34.499,-100.8701 30.9989,-97.7202 37.999,-100.8701 37.999,-100.8701\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M62.1917,-133.5865C62.2421,-144.2891 65.4919,-152.8112 71.9411,-152.8112 76.8788,-152.8112 79.9411,-147.8157 81.1279,-140.6708\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.6905,-133.5865 84.2763,-140.814 81.4134,-137.0755 81.1362,-140.5645 81.1362,-140.5645 81.1362,-140.5645 81.4134,-137.0755 77.9961,-140.3151 81.6905,-133.5865 81.6905,-133.5865\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"18.4411\" y=\"-156.6112\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"402.4924\" cy=\"-81.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"397.9924\" y=\"-85.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"394.4924\" y=\"-70.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M105.6998,-105.3398C111.7438,-105.9772 117.9916,-106.531 123.8823,-106.8701 171.3592,-109.6031 183.451,-110.3068 230.8823,-106.8701 279.1026,-103.3762 334.3502,-94.4291 368.8369,-88.2446\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"375.8708,-86.9698 369.5448,-91.3177 372.427,-87.594 368.9831,-88.2182 368.9831,-88.2182 368.9831,-88.2182 372.427,-87.594 368.4213,-85.1187 375.8708,-86.9698 375.8708,-86.9698\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"258.7523\" y=\"-108.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"548.3036\" cy=\"-86.8701\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"543.8036\" y=\"-90.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"532.3036\" y=\"-76.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"548.3036\" y=\"-76.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M103.0722,-115.0339C109.8214,-117.6563 117.0015,-120.1171 123.8823,-121.8701 256.0404,-155.5384 297.1163,-184.1909 429.3625,-150.8701 460.2547,-143.0864 491.8569,-125.5392 514.7148,-110.7836\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"520.6265,-106.9037 516.5027,-113.3781 517.7004,-108.8242 514.7743,-110.7447 514.7743,-110.7447 514.7743,-110.7447 517.7004,-108.8242 513.0459,-108.1112 520.6265,-106.9037 520.6265,-106.9037\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"320.6224\" y=\"-168.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"275.7523\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271.2523\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"267.7523\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M105.305,-93.1967C138.0272,-85.1176 188.9675,-71.0492 230.8823,-52.8701 236.1092,-50.6031 241.4937,-47.8681 246.6386,-45.0351\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"252.9973,-41.422 248.4674,-47.619 249.9543,-43.1511 246.9112,-44.8803 246.9112,-44.8803 246.9112,-44.8803 249.9543,-43.1511 245.355,-42.1415 252.9973,-41.422 252.9973,-41.422\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"146.3823\" y=\"-91.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M391.0491,-106.3317C389.9592,-117.2753 393.7737,-126.7401 402.4924,-126.7401 409.1677,-126.7401 412.9682,-121.192 413.8939,-113.6799\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"413.9358,-106.3317 417.0457,-113.3496 413.9158,-109.8316 413.8958,-113.3316 413.8958,-113.3316 413.8958,-113.3316 413.9158,-109.8316 410.7458,-113.3136 413.9358,-106.3317 413.9358,-106.3317\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"369.4924\" y=\"-130.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M428.3203,-73.0446C434.4872,-71.3132 441.0992,-69.7591 447.3625,-68.8701 468.9241,-65.8095 474.8869,-65.2544 496.3625,-68.8701 500.7475,-69.6083 505.257,-70.6741 509.7003,-71.9238\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"516.6008,-74.0182 508.9877,-74.9993 513.2517,-73.0017 509.9026,-71.9851 509.9026,-71.9851 509.9026,-71.9851 513.2517,-73.0017 510.8175,-68.9709 516.6008,-74.0182 516.6008,-74.0182\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"447.3625\" y=\"-72.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | !b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M514.1913,-85.9821C494.6294,-85.4413 469.6131,-84.6965 447.3625,-83.8701 443.9387,-83.7429 440.3685,-83.6004 436.8029,-83.4517\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"429.5389,-83.1406 436.6674,-80.2931 433.0357,-83.2904 436.5325,-83.4402 436.5325,-83.4402 436.5325,-83.4402 433.0357,-83.2904 436.3977,-86.5874 429.5389,-83.1406 429.5389,-83.1406\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"466.3625\" y=\"-88.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M534.0849,-117.798C533.6187,-129.3237 538.3583,-138.8112 548.3036,-138.8112 556.0734,-138.8112 560.6658,-133.0205 562.0809,-124.9912\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"562.5223,-117.798 565.2376,-124.9778 562.3079,-121.2914 562.0935,-124.7848 562.0935,-124.7848 562.0935,-124.7848 562.3079,-121.2914 558.9494,-124.5918 562.5223,-117.798 562.5223,-117.798\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"544.8036\" y=\"-142.6112\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M249.3341,-21.7117C217.6123,-16.8967 163.709,-13.2017 123.8823,-33.8701 110.6349,-40.7448 99.7326,-52.6861 91.396,-64.6013\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"87.5106,-70.4262 88.7745,-62.8548 89.4528,-67.5145 91.3951,-64.6028 91.3951,-64.6028 91.3951,-64.6028 89.4528,-67.5145 94.0156,-66.3508 87.5106,-70.4262 87.5106,-70.4262\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"123.8823\" y=\"-37.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M300.4899,-37.6052C320.7283,-46.3878 349.4675,-58.8594 371.2854,-68.3275\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"377.8172,-71.162 370.1417,-71.265 374.6065,-69.7687 371.3957,-68.3753 371.3957,-68.3753 371.3957,-68.3753 374.6065,-69.7687 372.6498,-65.4857 377.8172,-71.162 377.8172,-71.162\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"320.6224\" y=\"-64.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M302.5334,-24.326C333.5174,-22.1234 385.8513,-20.6963 429.3625,-30.8701 461.3115,-38.3404 466.6905,-47.8659 496.3625,-61.8701 501.0913,-64.1019 506.0535,-66.4641 510.9569,-68.8106\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"517.5794,-71.9867 509.9055,-71.7998 514.4236,-70.4731 511.2677,-68.9596 511.2677,-68.9596 511.2677,-68.9596 514.4236,-70.4731 512.6299,-66.1193 517.5794,-71.9867 517.5794,-71.9867\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"385.4924\" y=\"-34.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M264.3089,-51.3317C263.2191,-62.2753 267.0336,-71.7401 275.7523,-71.7401 282.4276,-71.7401 286.2281,-66.192 287.1538,-58.6799\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"287.1957,-51.3317 290.3056,-58.3496 287.1757,-54.8316 287.1557,-58.3316 287.1557,-58.3316 287.1557,-58.3316 287.1757,-54.8316 284.0057,-58.3136 287.1957,-51.3317 287.1957,-51.3317\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"244.7523\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78761b70> >"
|
|
]
|
|
},
|
|
"execution_count": 9,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, state_based=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"But do we really need 2 rabin pairs? Let's ask if we can get an equivalent with only one pair. (Note that reducing the number of pairs might require more state, but the `sat_minimize()` function will never attempt to add state unless explicitely instructed to do so. In this case we are therefore looking for a state-based Rabin-1 automaton with at most 4 states.)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"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=\"633pt\" height=\"214pt\"\n",
|
|
" viewBox=\"0.00 0.00 633.35 213.87\" 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 209.8701)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-209.8701 629.3503,-209.8701 629.3503,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"260.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"285.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"301.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"344.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"360.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"283.6751\" y=\"-177.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 1]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-86.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-90.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-75.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-86.8701C4.3751,-86.8701 17.3629,-86.8701 30.7917,-86.8701\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-86.8701 30.8046,-90.0202 34.3045,-86.8701 30.8045,-86.8702 30.8045,-86.8702 30.8045,-86.8702 34.3045,-86.8701 30.8045,-83.7202 37.8045,-86.8701 37.8045,-86.8701\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"280.7401\" cy=\"-81.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"276.2401\" y=\"-85.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"272.7401\" y=\"-70.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.5126,-75.0359C95.9501,-72.4907 102.9824,-70.175 109.7401,-68.8701 156.4331,-59.8536 169.4231,-64.113 216.7401,-68.8701 226.8165,-69.8831 237.6525,-71.7718 247.4915,-73.8018\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"254.4544,-75.2944 246.9497,-76.9071 251.0322,-74.5607 247.6099,-73.8271 247.6099,-73.8271 247.6099,-73.8271 251.0322,-74.5607 248.2702,-70.7471 254.4544,-75.2944 254.4544,-75.2944\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"156.7401\" y=\"-72.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"590.3503\" cy=\"-100.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"585.8503\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"582.3503\" y=\"-89.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M88.8196,-99.1319C121.0004,-114.8414 180.4438,-141.1967 234.7401,-150.8701 353.2375,-171.9815 495.2525,-132.8147 557.9215,-112.2794\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"564.8078,-109.9927 559.1572,-115.1883 561.4861,-111.0958 558.1645,-112.1988 558.1645,-112.1988 558.1645,-112.1988 561.4861,-111.0958 557.1717,-109.2093 564.8078,-109.9927 564.8078,-109.9927\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"344.7401\" y=\"-158.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"455.6102\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"451.1102\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"447.6102\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M86.8971,-71.0654C93.9307,-66.5926 101.924,-62.075 109.7401,-58.8701 216.9205,-14.922 357.9972,-18.9111 421.7505,-23.6411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.7707,-24.1886 421.5469,-26.7847 425.2813,-23.9164 421.7918,-23.6442 421.7918,-23.6442 421.7918,-23.6442 425.2813,-23.9164 422.0368,-20.5038 428.7707,-24.1886 428.7707,-24.1886\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M253.6495,-82.7855C242.2538,-83.1527 228.8532,-83.5612 216.7401,-83.8701 176.2257,-84.9032 129.6238,-85.7771 98.8436,-86.3105\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.7571,-86.4322 98.7019,-83.1624 95.2566,-86.3721 98.7561,-86.312 98.7561,-86.312 98.7561,-86.312 95.2566,-86.3721 98.8102,-89.4615 91.7571,-86.4322 91.7571,-86.4322\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-89.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M263.7289,-103.1052C260.2572,-115.3455 265.9276,-126.7401 280.7401,-126.7401 292.6595,-126.7401 298.6593,-119.3619 298.7393,-110.1019\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"297.7513,-103.1052 301.8492,-109.596 298.2407,-106.5708 298.7301,-110.0364 298.7301,-110.0364 298.7301,-110.0364 298.2407,-106.5708 295.6111,-110.4769 297.7513,-103.1052 297.7513,-103.1052\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"249.7401\" y=\"-130.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M307.7063,-84.9388C337.34,-88.1901 386.3673,-93.2131 428.7401,-95.8701 472.7576,-98.6301 523.6192,-99.8856 556.3436,-100.4438\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"563.4464,-100.5588 556.3963,-103.5949 559.9469,-100.5021 556.4473,-100.4453 556.4473,-100.4453 556.4473,-100.4453 559.9469,-100.5021 556.4984,-97.2958 563.4464,-100.5588 563.4464,-100.5588\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"437.1102\" y=\"-101.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M306.5428,-73.7546C337.4093,-64.0465 389.1259,-47.7806 422.8031,-37.1885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"429.7016,-35.0188 423.9692,-40.1239 426.3629,-36.0689 423.0241,-37.1191 423.0241,-37.1191 423.0241,-37.1191 426.3629,-36.0689 422.079,-34.1142 429.7016,-35.0188 429.7016,-35.0188\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"360.7401\" y=\"-64.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M578.22,-124.8749C576.8967,-136.0106 580.9401,-145.7401 590.3503,-145.7401 597.702,-145.7401 601.7781,-139.8017 602.5786,-131.8937\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"602.4806,-124.8749 605.7281,-131.8302 602.5295,-128.3745 602.5784,-131.8742 602.5784,-131.8742 602.5784,-131.8742 602.5295,-128.3745 599.4287,-131.9182 602.4806,-124.8749 602.4806,-124.8749\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"555.3503\" y=\"-149.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M566.1968,-88.2597C548.034,-78.7068 522.5821,-65.1711 500.4802,-52.8701 495.502,-50.0994 490.2431,-47.1097 485.1466,-44.1787\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"478.8112,-40.5184 486.4482,-41.2928 481.8418,-42.2693 484.8723,-44.0203 484.8723,-44.0203 484.8723,-44.0203 481.8418,-42.2693 483.2965,-46.7478 478.8112,-40.5184 478.8112,-40.5184\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"500.4802\" y=\"-79.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M482.5953,-23.066C501.4632,-21.7524 526.5678,-22.8089 545.4802,-33.8701 559.2923,-41.9482 569.7153,-56.1686 577.0221,-69.4363\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"580.36,-75.842 574.3317,-71.0899 578.7426,-72.7381 577.1252,-69.6342 577.1252,-69.6342 577.1252,-69.6342 578.7426,-72.7381 579.9187,-68.1785 580.36,-75.842 580.36,-75.842\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"517.4802\" y=\"-37.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M443.4799,-50.8749C442.1566,-62.0106 446.2,-71.7401 455.6102,-71.7401 462.9619,-71.7401 467.038,-65.8017 467.8385,-57.8937\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"467.7405,-50.8749 470.988,-57.8302 467.7894,-54.3745 467.8383,-57.8742 467.8383,-57.8742 467.8383,-57.8742 467.7894,-54.3745 464.6886,-57.9182 467.7405,-50.8749 467.7405,-50.8749\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"452.1102\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f787b3720> >"
|
|
]
|
|
},
|
|
"execution_count": 10,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, state_based=True, acc='Rabin 1')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Using the `display_log` option, we can have a hint of what is going on under the hood. Each line in the table shows one call to the SAT solver. The column labeled `target.states` gives the size of the equivalent automaton we ask the SAT-solver to produce, but some of these states may actually be unreachable in the result. The `variables` and `clauses` columns give an indication of the size of the SAT problem. The `enc.*` and `sat.*` columns give the user and system time taken to encode and solve the SAT problem (the unit is \"ticks\", which usually is 1/100 of seconds).\n",
|
|
"\n",
|
|
"Below we see that the minimization procedure first tried to squeeze the 6-state input into a 3-state automaton, which failed, and then into a 5-state automaton, which was successful. This 5-state automaton was used as input to produce a smaller 4-state automaton.. Essentially this procedure is doing a binary search towards the minimal size. \n",
|
|
"\n",
|
|
"(In this case it does not matter, but be aware that the number of states displayed in the log table are those of complete automata, while the output of `sat_minimize()` is trimmed by default.)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>996</td>\n",
|
|
" <td>48806</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2760</td>\n",
|
|
" <td>224707</td>\n",
|
|
" <td>8</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>11</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2008</td>\n",
|
|
" <td>155020</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 3 NaN NaN NaN 996 \n",
|
|
"1 6 5 5 16 40 2760 \n",
|
|
"2 5 4 4 11 32 2008 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 48806 2 0 1 0 \n",
|
|
"1 224707 8 0 7 0 \n",
|
|
"2 155020 6 0 5 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"633pt\" height=\"214pt\"\n",
|
|
" viewBox=\"0.00 0.00 633.35 213.87\" 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 209.8701)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-209.8701 629.3503,-209.8701 629.3503,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"260.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"285.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"301.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"344.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"360.6751\" y=\"-191.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"283.6751\" y=\"-177.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 1]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-86.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-90.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-75.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-86.8701C4.3751,-86.8701 17.3629,-86.8701 30.7917,-86.8701\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-86.8701 30.8046,-90.0202 34.3045,-86.8701 30.8045,-86.8702 30.8045,-86.8702 30.8045,-86.8702 34.3045,-86.8701 30.8045,-83.7202 37.8045,-86.8701 37.8045,-86.8701\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"280.7401\" cy=\"-81.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"276.2401\" y=\"-85.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"272.7401\" y=\"-70.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.5126,-75.0359C95.9501,-72.4907 102.9824,-70.175 109.7401,-68.8701 156.4331,-59.8536 169.4231,-64.113 216.7401,-68.8701 226.8165,-69.8831 237.6525,-71.7718 247.4915,-73.8018\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"254.4544,-75.2944 246.9497,-76.9071 251.0322,-74.5607 247.6099,-73.8271 247.6099,-73.8271 247.6099,-73.8271 251.0322,-74.5607 248.2702,-70.7471 254.4544,-75.2944 254.4544,-75.2944\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"156.7401\" y=\"-72.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"590.3503\" cy=\"-100.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"585.8503\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"582.3503\" y=\"-89.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M88.8196,-99.1319C121.0004,-114.8414 180.4438,-141.1967 234.7401,-150.8701 353.2375,-171.9815 495.2525,-132.8147 557.9215,-112.2794\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"564.8078,-109.9927 559.1572,-115.1883 561.4861,-111.0958 558.1645,-112.1988 558.1645,-112.1988 558.1645,-112.1988 561.4861,-111.0958 557.1717,-109.2093 564.8078,-109.9927 564.8078,-109.9927\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"344.7401\" y=\"-158.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"455.6102\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"451.1102\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"447.6102\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M86.8971,-71.0654C93.9307,-66.5926 101.924,-62.075 109.7401,-58.8701 216.9205,-14.922 357.9972,-18.9111 421.7505,-23.6411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.7707,-24.1886 421.5469,-26.7847 425.2813,-23.9164 421.7918,-23.6442 421.7918,-23.6442 421.7918,-23.6442 425.2813,-23.9164 422.0368,-20.5038 428.7707,-24.1886 428.7707,-24.1886\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M253.6495,-82.7855C242.2538,-83.1527 228.8532,-83.5612 216.7401,-83.8701 176.2257,-84.9032 129.6238,-85.7771 98.8436,-86.3105\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.7571,-86.4322 98.7019,-83.1624 95.2566,-86.3721 98.7561,-86.312 98.7561,-86.312 98.7561,-86.312 95.2566,-86.3721 98.8102,-89.4615 91.7571,-86.4322 91.7571,-86.4322\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-89.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M263.7289,-103.1052C260.2572,-115.3455 265.9276,-126.7401 280.7401,-126.7401 292.6595,-126.7401 298.6593,-119.3619 298.7393,-110.1019\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"297.7513,-103.1052 301.8492,-109.596 298.2407,-106.5708 298.7301,-110.0364 298.7301,-110.0364 298.7301,-110.0364 298.2407,-106.5708 295.6111,-110.4769 297.7513,-103.1052 297.7513,-103.1052\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"249.7401\" y=\"-130.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M307.7063,-84.9388C337.34,-88.1901 386.3673,-93.2131 428.7401,-95.8701 472.7576,-98.6301 523.6192,-99.8856 556.3436,-100.4438\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"563.4464,-100.5588 556.3963,-103.5949 559.9469,-100.5021 556.4473,-100.4453 556.4473,-100.4453 556.4473,-100.4453 559.9469,-100.5021 556.4984,-97.2958 563.4464,-100.5588 563.4464,-100.5588\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"437.1102\" y=\"-101.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M306.5428,-73.7546C337.4093,-64.0465 389.1259,-47.7806 422.8031,-37.1885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"429.7016,-35.0188 423.9692,-40.1239 426.3629,-36.0689 423.0241,-37.1191 423.0241,-37.1191 423.0241,-37.1191 426.3629,-36.0689 422.079,-34.1142 429.7016,-35.0188 429.7016,-35.0188\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"360.7401\" y=\"-64.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M578.22,-124.8749C576.8967,-136.0106 580.9401,-145.7401 590.3503,-145.7401 597.702,-145.7401 601.7781,-139.8017 602.5786,-131.8937\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"602.4806,-124.8749 605.7281,-131.8302 602.5295,-128.3745 602.5784,-131.8742 602.5784,-131.8742 602.5784,-131.8742 602.5295,-128.3745 599.4287,-131.9182 602.4806,-124.8749 602.4806,-124.8749\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"555.3503\" y=\"-149.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M566.1968,-88.2597C548.034,-78.7068 522.5821,-65.1711 500.4802,-52.8701 495.502,-50.0994 490.2431,-47.1097 485.1466,-44.1787\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"478.8112,-40.5184 486.4482,-41.2928 481.8418,-42.2693 484.8723,-44.0203 484.8723,-44.0203 484.8723,-44.0203 481.8418,-42.2693 483.2965,-46.7478 478.8112,-40.5184 478.8112,-40.5184\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"500.4802\" y=\"-79.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M482.5953,-23.066C501.4632,-21.7524 526.5678,-22.8089 545.4802,-33.8701 559.2923,-41.9482 569.7153,-56.1686 577.0221,-69.4363\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"580.36,-75.842 574.3317,-71.0899 578.7426,-72.7381 577.1252,-69.6342 577.1252,-69.6342 577.1252,-69.6342 578.7426,-72.7381 579.9187,-68.1785 580.36,-75.842 580.36,-75.842\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"517.4802\" y=\"-37.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M443.4799,-50.8749C442.1566,-62.0106 446.2,-71.7401 455.6102,-71.7401 462.9619,-71.7401 467.038,-65.8017 467.8385,-57.8937\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"467.7405,-50.8749 470.988,-57.8302 467.7894,-54.3745 467.8383,-57.8742 467.8383,-57.8742 467.8383,-57.8742 467.7894,-54.3745 464.6886,-57.9182 467.7405,-50.8749 467.7405,-50.8749\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"452.1102\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5be97960> >"
|
|
]
|
|
},
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, state_based=True, acc='Rabin 1', display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Note that we already had a smaller transition-based automaton for this language (in the `small` variable), and that it actually is more efficient to work from that, as seen in problem sizes displayed in the following log."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>348</td>\n",
|
|
" <td>15542</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>10</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>960</td>\n",
|
|
" <td>71987</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 2 3 NaN NaN NaN 348 \n",
|
|
"1 2 5 4 10 32 960 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 15542 1 0 0 0 \n",
|
|
"1 71987 4 0 1 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"435pt\" height=\"247pt\"\n",
|
|
" viewBox=\"0.00 0.00 435.48 246.79\" 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 242.7899)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-242.7899 431.4802,-242.7899 431.4802,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"161.7401\" y=\"-224.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"186.7401\" y=\"-224.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"202.7401\" y=\"-224.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"245.7401\" y=\"-224.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"261.7401\" y=\"-224.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"184.7401\" y=\"-210.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 1]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-75.9199\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-79.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-64.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-75.9199C4.3751,-75.9199 17.3629,-75.9199 30.7917,-75.9199\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-75.9199 30.8046,-79.07 34.3045,-75.9199 30.8045,-75.92 30.8045,-75.92 30.8045,-75.92 34.3045,-75.9199 30.8045,-72.77 37.8045,-75.9199 37.8045,-75.9199\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-101.7412C56.2072,-112.0975 58.9404,-120.7899 64.8701,-120.7899 69.3173,-120.7899 71.9666,-115.9004 72.8178,-109.0866\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-101.7412 75.9779,-108.8451 72.9497,-105.2391 72.8297,-108.7371 72.8297,-108.7371 72.8297,-108.7371 72.9497,-105.2391 69.6816,-108.6291 73.0697,-101.7412 73.0697,-101.7412\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-124.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"280.7401\" cy=\"-175.9199\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"276.2401\" y=\"-179.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"272.7401\" y=\"-164.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.6331,-87.3912C129.2405,-105.7389 206.761,-141.6497 249.9033,-161.635\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.2659,-164.5824 248.5902,-164.4982 253.0901,-163.1112 249.9143,-161.64 249.9143,-161.64 249.9143,-161.64 253.0901,-163.1112 251.2383,-158.7818 256.2659,-164.5824 256.2659,-164.5824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"130.2401\" y=\"-146.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"280.7401\" cy=\"-70.9199\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"276.2401\" y=\"-74.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"272.7401\" y=\"-59.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.7571,-75.482C122.1127,-74.966 172.9777,-74.0359 216.7401,-72.9199 226.3927,-72.6737 236.8629,-72.3644 246.4847,-72.063\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"253.6495,-71.8353 246.7531,-75.2062 250.1513,-71.9466 246.653,-72.0578 246.653,-72.0578 246.653,-72.0578 250.1513,-71.9466 246.5529,-68.9094 253.6495,-71.8353 253.6495,-71.8353\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-79.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"400.6102\" cy=\"-100.9199\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"396.1102\" y=\"-104.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"392.6102\" y=\"-89.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M85.648,-58.2822C92.8757,-52.9397 101.2964,-47.5357 109.7401,-43.9199 198.9382,-5.7228 237.9716,19.265 326.7401,-19.9199 350.5174,-30.4158 369.9478,-52.7636 382.9027,-71.3317\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"387.0448,-77.4612 380.5154,-73.425 385.0851,-74.5613 383.1254,-71.6613 383.1254,-71.6613 383.1254,-71.6613 385.0851,-74.5613 385.7354,-69.8976 387.0448,-77.4612 387.0448,-77.4612\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-23.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M306.6551,-168.4566C321.7182,-163.4294 340.6444,-155.8896 355.7401,-145.9199 363.8098,-140.5904 371.614,-133.6347 378.3883,-126.7913\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"383.3553,-121.6087 380.7859,-128.8421 380.9335,-124.1356 378.5117,-126.6625 378.5117,-126.6625 378.5117,-126.6625 380.9335,-124.1356 376.2375,-124.4829 383.3553,-121.6087 383.3553,-121.6087\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"350.2401\" y=\"-154.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M255.1991,-62.5068C243.601,-59.1109 229.6218,-55.6016 216.7401,-53.9199 169.5847,-47.7638 156.0657,-43.1741 109.7401,-53.9199 104.7432,-55.079 99.6609,-56.8762 94.7994,-58.9549\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3355,-61.9306 93.3769,-56.142 91.5148,-60.4669 94.6941,-59.0033 94.6941,-59.0033 94.6941,-59.0033 91.5148,-60.4669 96.0114,-61.8647 88.3355,-61.9306 88.3355,-61.9306\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-57.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M268.2423,-94.9247C266.8788,-106.0604 271.0448,-115.7899 280.7401,-115.7899 288.3146,-115.7899 292.5142,-109.8515 293.3389,-101.9435\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"293.238,-94.9247 296.4884,-101.8786 293.2884,-98.4243 293.3388,-101.924 293.3388,-101.924 293.3388,-101.924 293.2884,-98.4243 290.1891,-101.9693 293.238,-94.9247 293.238,-94.9247\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"249.7401\" y=\"-119.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M307.0461,-77.5035C324.8462,-81.9584 348.4973,-87.8775 367.5666,-92.65\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"374.3655,-94.3516 366.8102,-95.7078 370.9703,-93.5018 367.575,-92.6521 367.575,-92.6521 367.575,-92.6521 370.9703,-93.5018 368.3398,-89.5963 374.3655,-94.3516 374.3655,-94.3516\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"345.7401\" y=\"-93.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M375.5353,-111.1882C365.6867,-115.5785 354.4406,-121.0457 344.7401,-126.9199 340.7156,-129.3569 323.2574,-142.756 307.5903,-154.9273\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"301.9274,-159.3333 305.5178,-152.5486 304.6898,-157.184 307.4522,-155.0347 307.4522,-155.0347 307.4522,-155.0347 304.6898,-157.184 309.3865,-157.5209 301.9274,-159.3333 301.9274,-159.3333\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"344.7401\" y=\"-130.7199\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M391.3176,-126.2899C390.6767,-136.8437 393.7742,-145.7899 400.6102,-145.7899 405.8439,-145.7899 408.8863,-140.5458 409.7373,-133.3511\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"409.9028,-126.2899 412.8878,-133.3618 409.8207,-129.7889 409.7387,-133.288 409.7387,-133.288 409.7387,-133.288 409.8207,-129.7889 406.5896,-133.2141 409.9028,-126.2899 409.9028,-126.2899\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"397.1102\" y=\"-149.5899\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bdc5cc0> >"
|
|
]
|
|
},
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(small, state_based=True, acc='Rabin 1', display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"How did the procedure look for a complete automaton of size 5 when the input had only 2 states? It's because the input uses transition-based acceptance: to estimate an upper bound of the size of the state-based output, the `sat_minimize()` procedure converted its transition-based input to state-based acceptance (using the `spot.sbacc()` function) and counted the number of states in the result.\n",
|
|
"\n",
|
|
"Such an estimate is not necessarily correct of we request a different acceptance condition. In that case We can actually change the upper-bound using `max_states`. Below we additionally demonstrate the use of the `colored` option, to request all transition to belong to exactly one set, as customary in parity automata."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2300</td>\n",
|
|
" <td>285287</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>10</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>368</td>\n",
|
|
" <td>17993</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>92</td>\n",
|
|
" <td>2193</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 2 5 5 16 40 2300 \n",
|
|
"1 2 2 2 6 16 368 \n",
|
|
"2 2 1 NaN NaN NaN 92 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 285287 13 1 10 0 \n",
|
|
"1 17993 1 0 0 0 \n",
|
|
"2 2193 1 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"192pt\" height=\"191pt\"\n",
|
|
" viewBox=\"0.00 0.00 192.00 191.10\" 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 187.1021)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-187.1021 188,-187.1021 188,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"8\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"33\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"49\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & (Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"96\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"112\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) | Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"152\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"168\" y=\"-168.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"35\" y=\"-154.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[parity min odd 3]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56.5\" cy=\"-33.1021\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56.5\" y=\"-29.4021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.6233,-33.1021C4.678,-33.1021 18.4448,-33.1021 31.4241,-33.1021\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"38.4807,-33.1021 31.4808,-36.2522 34.9807,-33.1021 31.4807,-33.1022 31.4807,-33.1022 31.4807,-33.1022 34.9807,-33.1021 31.4807,-29.9522 38.4807,-33.1021 38.4807,-33.1021\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M53.2643,-50.8838C52.7144,-60.417 53.793,-69.1021 56.5,-69.1021 58.488,-69.1021 59.5977,-64.4182 59.8292,-58.1542\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"59.7357,-50.8838 62.9756,-57.8427 59.7808,-54.3835 59.8258,-57.8832 59.8258,-57.8832 59.8258,-57.8832 59.7808,-54.3835 56.6761,-57.9238 59.7357,-50.8838 59.7357,-50.8838\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3\" y=\"-87.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48.5\" y=\"-72.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M51.4906,-50.6792C48.0451,-71.8201 49.7148,-99.1021 56.5,-99.1021 62.543,-99.1021 64.5285,-77.4617 62.4564,-57.7927\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"61.5094,-50.6792 65.5556,-57.2023 61.9713,-54.1486 62.4332,-57.618 62.4332,-57.618 62.4332,-57.618 61.9713,-54.1486 59.3107,-58.0337 61.5094,-50.6792 61.5094,-50.6792\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"25.5\" y=\"-117.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48.5\" y=\"-102.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"165.5\" cy=\"-33.1021\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"165.5\" y=\"-29.4021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M74.3944,-36.0834C80.1572,-36.9103 86.5827,-37.6931 92.5,-38.1021 108.9053,-39.2359 113.0947,-39.2359 129.5,-38.1021 133.1058,-37.8529 136.9004,-37.4648 140.6187,-37.0126\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"147.6056,-36.0834 141.0819,-40.1288 144.1361,-36.5449 140.6666,-37.0063 140.6666,-37.0063 140.6666,-37.0063 144.1361,-36.5449 140.2513,-33.8838 147.6056,-36.0834 147.6056,-36.0834\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92.5\" y=\"-56.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"103\" y=\"-41.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M68.8193,-19.6522C75.2225,-13.6594 83.5689,-7.2519 92.5,-4.1021 108.0082,1.3674 113.9918,1.3674 129.5,-4.1021 136.0588,-6.4152 142.3022,-10.4853 147.6923,-14.8577\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"153.1807,-19.6522 145.8365,-17.4193 150.5448,-17.3496 147.9089,-15.0469 147.9089,-15.0469 147.9089,-15.0469 150.5448,-17.3496 149.9813,-12.6746 153.1807,-19.6522 153.1807,-19.6522\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"94\" y=\"-22.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"103\" y=\"-7.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M160.6797,-50.512C159.78,-60.19 161.3867,-69.1021 165.5,-69.1021 168.5207,-69.1021 170.1896,-64.2957 170.5067,-57.9093\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"170.3203,-50.512 173.6457,-57.4303 170.4085,-54.0109 170.4967,-57.5097 170.4967,-57.5097 170.4967,-57.5097 170.4085,-54.0109 167.3477,-57.5892 170.3203,-50.512 170.3203,-50.512\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"160\" y=\"-87.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"157.5\" y=\"-72.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M158.2325,-49.698C152.7416,-70.9654 155.1641,-99.1021 165.5,-99.1021 174.7458,-99.1021 177.6594,-76.5875 174.2408,-56.6153\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"172.7675,-49.698 177.3066,-55.8882 173.4966,-53.1212 174.2257,-56.5444 174.2257,-56.5444 174.2257,-56.5444 173.4966,-53.1212 171.1448,-57.2006 172.7675,-49.698 172.7675,-49.698\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"162\" y=\"-117.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"157.5\" y=\"-102.9021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78761d20> >"
|
|
]
|
|
},
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(small, max_states=9, acc='parity min odd 3', colored=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"There are a couple of ways in which we can influence the search for the minimum automaton. We can disable the binary search with `sat_naive`. In this case, the procedure will try to remove one state at a time. This is not necessary slower than the default binary search, because satisfiable problems are often solved more quickly than unsatisfiable ones."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173183</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>11</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>964</td>\n",
|
|
" <td>45412</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>363</td>\n",
|
|
" <td>10496</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 6 5 13 40 2742 \n",
|
|
"1 5 4 4 11 32 964 \n",
|
|
"2 4 3 NaN NaN NaN 363 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 173183 7 0 2 0 \n",
|
|
"1 45412 2 0 0 0 \n",
|
|
"2 10496 1 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"573pt\" height=\"190pt\"\n",
|
|
" viewBox=\"0.00 0.00 573.48 190.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 186)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-186 569.4802,-186 569.4802,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"260.2401\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"285.2401\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"301.2401\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"250.2401\" y=\"-153.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-79\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-79C4.3751,-79 17.3629,-79 30.7917,-79\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-79 30.8046,-82.1501 34.3045,-79 30.8045,-79.0001 30.8045,-79.0001 30.8045,-79.0001 34.3045,-79 30.8045,-75.8501 37.8045,-79 37.8045,-79\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-104.8213C56.2072,-115.1776 58.9404,-123.8701 64.8701,-123.8701 69.3173,-123.8701 71.9666,-118.9805 72.8178,-112.1667\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-104.8213 75.9779,-111.9252 72.9497,-108.3193 72.8297,-111.8172 72.8297,-111.8172 72.8297,-111.8172 72.9497,-108.3193 69.6816,-111.7092 73.0697,-104.8213 73.0697,-104.8213\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-127.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"263.7401\" cy=\"-69\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"263.7401\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.5126,-67.1658C95.9501,-64.6207 102.9824,-62.3049 109.7401,-61 154.761,-52.3065 208.4708,-58.826 239.0925,-64.094\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"245.9957,-65.3283 238.5505,-67.1969 242.5504,-64.7122 239.105,-64.0961 239.105,-64.0961 239.105,-64.0961 242.5504,-64.7122 239.6595,-60.9953 245.9957,-65.3283 245.9957,-65.3283\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"538.6102\" cy=\"-85\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"534.1102\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"530.6102\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.758,-90.3598C96.1908,-93.068 103.1594,-95.8059 109.7401,-98 164.04,-116.1044 177.9239,-122.0599 234.7401,-129 333.9405,-141.1173 450.8186,-111.8876 506.2771,-95.3729\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"513.0497,-93.3279 507.2591,-98.367 509.6991,-94.3397 506.3485,-95.3514 506.3485,-95.3514 506.3485,-95.3514 509.6991,-94.3397 505.438,-92.3359 513.0497,-93.3279 513.0497,-93.3279\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"310.7401\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"446.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"446.7401\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M87.3776,-63.3929C94.2992,-59.1699 102.1101,-54.9554 109.7401,-52 219.6816,-9.4152 364.1259,-12.6794 421.5906,-16.0965\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.7937,-16.5535 421.6082,-19.2538 425.3007,-16.3318 421.8077,-16.1102 421.8077,-16.1102 421.8077,-16.1102 425.3007,-16.3318 422.0072,-12.9665 428.7937,-16.5535 428.7937,-16.5535\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-24.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M245.9484,-72.199C237.1843,-73.6343 226.4406,-75.1852 216.7401,-76 176.3547,-79.3922 129.727,-79.7928 98.9054,-79.5711\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.8088,-79.507 98.837,-76.4204 95.3086,-79.5387 98.8085,-79.5703 98.8085,-79.5703 98.8085,-79.5703 95.3086,-79.5387 98.78,-82.7202 91.8088,-79.507 91.8088,-79.507\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M249.6952,-80.4278C241.4335,-92.0566 246.1151,-105 263.7401,-105 278.1981,-105 283.9464,-96.2903 280.9849,-86.7411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"277.785,-80.4278 283.7595,-85.2475 279.3674,-83.5497 280.9497,-86.6717 280.9497,-86.6717 280.9497,-86.6717 279.3674,-83.5497 278.14,-88.0958 277.785,-80.4278 277.785,-80.4278\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"232.7401\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M281.518,-72.6021C290.2789,-74.2297 301.0238,-76.007 310.7401,-77 379.1918,-83.9957 459.743,-85.1796 504.4039,-85.2188\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"511.5208,-85.2155 504.5223,-88.3688 508.0208,-85.2171 504.5208,-85.2188 504.5208,-85.2188 504.5208,-85.2188 508.0208,-85.2171 504.5193,-82.0688 511.5208,-85.2155 511.5208,-85.2155\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"429.7401\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M281.5898,-65.2597C309.4554,-59.2527 364.8574,-46.6335 410.7401,-32 414.833,-30.6946 419.1319,-29.1659 423.2773,-27.6073\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"430.0454,-24.9903 424.6525,-30.4529 426.7809,-26.2526 423.5165,-27.5149 423.5165,-27.5149 423.5165,-27.5149 426.7809,-26.2526 422.3804,-24.5768 430.0454,-24.9903 430.0454,-24.9903\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"342.2401\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M516.6871,-69.0117C501.7572,-58.1235 482.1196,-43.802 467.4535,-33.1061\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"461.5006,-28.7647 469.0125,-30.3443 464.3285,-30.8271 467.1564,-32.8894 467.1564,-32.8894 467.1564,-32.8894 464.3285,-30.8271 465.3002,-35.4345 461.5006,-28.7647 461.5006,-28.7647\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"488.2401\" y=\"-54.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M464.7918,-17.9809C474.0238,-18.7063 485.1029,-20.7684 493.7401,-26 505.3491,-33.0316 515.0085,-44.2836 522.3544,-55.085\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"526.195,-61.0098 519.7441,-56.8494 524.2912,-58.0729 522.3873,-55.1359 522.3873,-55.1359 522.3873,-55.1359 524.2912,-58.0729 525.0306,-53.4225 526.195,-61.0098 526.195,-61.0098\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"482.7401\" y=\"-29.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M439.7089,-34.6641C438.1464,-44.625 440.4901,-54 446.7401,-54 451.4276,-54 453.9178,-48.7266 454.2108,-41.8876\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"453.7714,-34.6641 457.3407,-41.4598 453.9839,-38.1576 454.1965,-41.6511 454.1965,-41.6511 454.1965,-41.6511 453.9839,-38.1576 451.0523,-41.8425 453.7714,-34.6641 453.7714,-34.6641\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"443.2401\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bdc5d20> >"
|
|
]
|
|
},
|
|
"execution_count": 14,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_naive=True, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Variant for incremental SAT solving\n",
|
|
"\n",
|
|
"Using `sat_incr=1`, we encode the problem of finding an equivalent automaton with $n$ states, and add 6 additional variables and some additional constraints to the problem:\n",
|
|
"\n",
|
|
"| variable | implied constraints |\n",
|
|
"| :--- | ---: |\n",
|
|
"| $v_1$ | transitions to state $(n-1)$ must not be used | \n",
|
|
"| $v_2$ | $v_1\\land{}$ transitions to state $(n-2)$ must not be used |\n",
|
|
"| ... | |\n",
|
|
"| $v_6$ | $v_5\\land{}$ transitions to state $(n-5)$ must not be used |\n",
|
|
"\n",
|
|
"Now using `assume` directives on variable $v_i$ amounts to testing whether the problem is solved with $n-i$ states, but we do not have to reencode the problem for each test, and the solver can (probably) reuse some of the knowledge it gathered during a previous attempt. We do a binary search on these 6 assumptions, to find some $i$ such that the problem is satisfiable with assumption $v_i$ but not with $v_{i+1}$. If such cast exists, we have found the minimal automaton. If assumption $v_6$ is satisfiable, we re-encode the problem with $n-7$ states and start over. Watch how the number of variables and clauses do not change in the following log.\n",
|
|
"\n",
|
|
"The number of assumption variables to use in a one encoding can be set with the `sat_incr_steps` argument. Its default value of 6 was chosen empirically by benchmarking different values."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 15,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2747</td>\n",
|
|
" <td>173427</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2747</td>\n",
|
|
" <td>173427</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2747</td>\n",
|
|
" <td>173427</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 1 NaN NaN NaN 2747 \n",
|
|
"1 6 3 NaN NaN NaN 2747 \n",
|
|
"2 6 4 4 12 32 2747 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 173427 7 0 2 0 \n",
|
|
"1 173427 0 0 0 0 \n",
|
|
"2 173427 0 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"650pt\" height=\"215pt\"\n",
|
|
" viewBox=\"0.00 0.00 649.74 214.87\" 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 210.8701)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-210.8701 645.7401,-210.8701 645.7401,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"298.3701\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"323.3701\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"339.3701\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"288.3701\" y=\"-178.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-90.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-94.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-79.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-90.8701C4.3751,-90.8701 17.3629,-90.8701 30.7917,-90.8701\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-90.8701 30.8046,-94.0202 34.3045,-90.8701 30.8045,-90.8702 30.8045,-90.8702 30.8045,-90.8702 34.3045,-90.8701 30.8045,-87.7202 37.8045,-90.8701 37.8045,-90.8701\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-116.6914C56.2072,-127.0476 58.9404,-135.7401 64.8701,-135.7401 69.3173,-135.7401 71.9666,-130.8506 72.8178,-124.0368\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-116.6914 75.9779,-123.7953 72.9497,-120.1893 72.8297,-123.6873 72.8297,-123.6873 72.8297,-123.6873 72.9497,-120.1893 69.6816,-123.5793 73.0697,-116.6914 73.0697,-116.6914\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-139.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"280.7401\" cy=\"-84.8701\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"280.7401\" y=\"-81.1701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.5126,-79.0359C95.9501,-76.4907 102.9824,-74.175 109.7401,-72.8701 161.0841,-62.9555 222.505,-72.3043 255.9814,-79.1437\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"263.0809,-80.643 255.5811,-82.2786 259.6565,-79.9198 256.232,-79.1965 256.232,-79.1965 256.232,-79.1965 259.6565,-79.9198 256.8829,-76.1145 263.0809,-80.643 263.0809,-80.643\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-76.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"623.7401\" cy=\"-100.8701\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"623.7401\" y=\"-97.1701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.5799,-101.6258C122.1082,-115.1029 181.4232,-137.3453 234.7401,-144.8701 390.6128,-166.8687 435.3231,-155.2311 587.7401,-115.8701 591.9399,-114.7855 596.2921,-113.3044 600.4575,-111.6932\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"607.2313,-108.9057 601.9567,-114.4826 603.9946,-110.2377 600.7579,-111.5696 600.7579,-111.5696 600.7579,-111.5696 603.9946,-110.2377 599.5592,-108.6566 607.2313,-108.9057 607.2313,-108.9057\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"344.7401\" y=\"-159.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"474.7401\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"470.2401\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"466.7401\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M86.8611,-75.3954C93.8933,-71.0728 101.8948,-66.7701 109.7401,-63.8701 225.0775,-21.2357 374.0389,-21.863 440.3146,-24.7485\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"447.6022,-25.0899 440.4625,-27.9088 444.1061,-24.9261 440.6099,-24.7623 440.6099,-24.7623 440.6099,-24.7623 444.1061,-24.9261 440.7573,-21.6157 447.6022,-25.0899 447.6022,-25.0899\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-36.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M262.5382,-85.8546C249.7331,-86.5151 232.1929,-87.3554 216.7401,-87.8701 176.235,-89.2192 129.6313,-90.0297 98.848,-90.462\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.7608,-90.5588 98.7171,-87.3134 95.2605,-90.5109 98.7602,-90.4631 98.7602,-90.4631 98.7602,-90.4631 95.2605,-90.5109 98.8032,-93.6128 91.7608,-90.5588 91.7608,-90.5588\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-93.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M266.6952,-96.2979C258.4335,-107.9267 263.1151,-120.8701 280.7401,-120.8701 295.1981,-120.8701 300.9464,-112.1603 297.9849,-102.6112\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"294.785,-96.2979 300.7595,-101.1176 296.3674,-99.4198 297.9497,-102.5417 297.9497,-102.5417 297.9497,-102.5417 296.3674,-99.4198 295.14,-103.9658 294.785,-96.2979 294.785,-96.2979\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"249.7401\" y=\"-124.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M298.8599,-86.5466C340.936,-90.3339 448.5471,-99.4121 538.7401,-101.8701 558.6975,-102.4139 581.2986,-102.1038 598.1762,-101.6903\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"605.4979,-101.4957 598.5841,-104.8306 601.9991,-101.5887 598.5004,-101.6817 598.5004,-101.6817 598.5004,-101.6817 601.9991,-101.5887 598.4167,-98.5329 605.4979,-101.4957 605.4979,-101.4957\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7401\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M298.2985,-79.6206C330.7452,-69.9201 400.5536,-49.0495 441.9746,-36.6659\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"448.8656,-34.6057 443.0612,-39.6289 445.5122,-35.6083 442.1589,-36.6109 442.1589,-36.6109 442.1589,-36.6109 445.5122,-35.6083 441.2566,-33.5929 448.8656,-34.6057 448.8656,-34.6057\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"344.7401\" y=\"-67.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M613.5887,-116.0367C610.5126,-126.5341 613.8964,-136.8701 623.7401,-136.8701 631.2767,-136.8701 635.0266,-130.8113 634.9898,-123.2601\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"633.8915,-116.0367 638.0581,-122.4836 634.4177,-119.4969 634.9439,-122.9571 634.9439,-122.9571 634.9439,-122.9571 634.4177,-119.4969 631.8297,-123.4307 633.8915,-116.0367 633.8915,-116.0367\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"620.2401\" y=\"-140.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M607.3203,-92.7152C582.8158,-80.5452 536.2573,-57.4222 505.3543,-42.0744\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"499.0112,-38.9241 506.6817,-39.2166 502.1459,-40.481 505.2805,-42.0378 505.2805,-42.0378 505.2805,-42.0378 502.1459,-40.481 503.8794,-44.8591 499.0112,-38.9241 499.0112,-38.9241\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"557.7401\" y=\"-86.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M501.6421,-23.5578C526.0613,-21.9475 562.0718,-23.1961 587.7401,-39.8701 601.0002,-48.4838 610.0221,-63.8343 615.718,-76.9808\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"618.3982,-83.6073 612.8532,-78.2991 617.0858,-80.3626 615.7734,-77.118 615.7734,-77.118 615.7734,-77.118 617.0858,-80.3626 618.6936,-75.9368 618.3982,-83.6073 618.3982,-83.6073\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"538.7401\" y=\"-43.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | !b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M458.9209,-49.033C456.2327,-60.9151 461.5057,-71.7401 474.7401,-71.7401 485.2863,-71.7401 490.7769,-64.8662 491.212,-56.061\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.5593,-49.033 494.3432,-55.7117 490.883,-52.518 491.2067,-56.003 491.2067,-56.003 491.2067,-56.003 490.883,-52.518 488.0702,-56.2944 490.5593,-49.033 490.5593,-49.033\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"441.7401\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bdc5f00> >"
|
|
]
|
|
},
|
|
"execution_count": 15,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_incr=1, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Another incremental variant consists is the equivalent of forcing $v_1$, $v_2$, ... in order. But to do that we do not need to use any assumption. We just add the constraints that transitions going to state $n-i$ are forbidden. This variant is enabled by option `sat_incr=2`. As in the previous case, we do a few of those incremental steps (2 by default, but that can be changed with the `sat_incr_steps` parameter) and then we reencode the problem to reduce its size.\n",
|
|
"\n",
|
|
"In the log below, line 0 corresponds to the search of an equivalent automaton with the same size, but the simpler co-Büchi acceptance. It works, and most of the time was spent encoding the problem. Then for the next two lines, the minimization function looks for automata of size 5 and 4 without reencoding the problem but simply adding a few constraints to disable the relevant transitions."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173183</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173279</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173327</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 6 5 13 40 2742 \n",
|
|
"1 5 4 4 12 32 2742 \n",
|
|
"2 4 3 NaN NaN NaN 2742 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 173183 6 0 2 0 \n",
|
|
"1 173279 0 0 1 0 \n",
|
|
"2 173327 0 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"637pt\" height=\"217pt\"\n",
|
|
" viewBox=\"0.00 0.00 637.48 217.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 213)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-213 633.4802,-213 633.4802,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"292.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"317.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"333.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"282.2401\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-85\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-85C4.3751,-85 17.3629,-85 30.7917,-85\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-85 30.8046,-88.1501 34.3045,-85 30.8045,-85.0001 30.8045,-85.0001 30.8045,-85.0001 34.3045,-85 30.8045,-81.8501 37.8045,-85 37.8045,-85\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-110.8213C56.2072,-121.1776 58.9404,-129.8701 64.8701,-129.8701 69.3173,-129.8701 71.9666,-124.9805 72.8178,-118.1667\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-110.8213 75.9779,-117.9252 72.9497,-114.3193 72.8297,-117.8172 72.8297,-117.8172 72.8297,-117.8172 72.9497,-114.3193 69.6816,-117.7092 73.0697,-110.8213 73.0697,-110.8213\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-133.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"478.7401\" cy=\"-69\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"478.7401\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.8609,-89.2001C97.7397,-89.9494 103.9371,-90.6137 109.7401,-91 239.0042,-99.6043 393.8509,-80.9594 453.5586,-72.6894\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"460.6882,-71.6882 454.1943,-75.7811 457.2222,-72.175 453.7562,-72.6617 453.7562,-72.6617 453.7562,-72.6617 457.2222,-72.175 453.3181,-69.5424 460.6882,-71.6882 460.6882,-71.6882\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-95.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"602.6102\" cy=\"-79\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"598.1102\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"594.6102\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M88.4817,-98.0155C95.1698,-101.1534 102.5823,-104.1352 109.7401,-106 290.2186,-153.0184 350.431,-183.6723 528.7401,-129 546.4887,-123.558 563.8127,-112.2491 577.2181,-101.7611\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"582.7132,-97.336 579.2369,-104.1798 579.9872,-99.5312 577.2612,-101.7264 577.2612,-101.7264 577.2612,-101.7264 579.9872,-99.5312 575.2854,-99.273 582.7132,-97.336 582.7132,-97.336\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"318.7401\" y=\"-161.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"267.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"267.7401\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.0835,-78.9666C121.6902,-71.6053 173.6202,-58.1261 216.7401,-42 226.2351,-38.449 236.3969,-33.8419 245.131,-29.6149\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"251.4971,-26.4803 246.6086,-32.3986 248.3571,-28.0264 245.2171,-29.5726 245.2171,-29.5726 245.2171,-29.5726 248.3571,-28.0264 243.8256,-26.7466 251.4971,-26.4803 251.4971,-26.4803\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M466.9836,-83.0417C462.5869,-93.9126 466.5057,-105 478.7401,-105 488.2982,-105 492.7809,-98.2328 492.1882,-90.0885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.4966,-83.0417 495.1936,-89.1131 491.3136,-86.4451 492.1306,-89.8484 492.1306,-89.8484 492.1306,-89.8484 491.3136,-86.4451 489.0676,-90.5837 490.4966,-83.0417 490.4966,-83.0417\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.2401\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M496.1306,-64.3551C512.2249,-60.7361 536.7603,-56.9488 557.7401,-61 562.1749,-61.8564 566.7279,-63.148 571.1534,-64.6542\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"577.9676,-67.1658 570.3101,-67.7005 574.6836,-65.9553 571.3996,-64.7449 571.3996,-64.7449 571.3996,-64.7449 574.6836,-65.9553 572.489,-61.7892 577.9676,-67.1658 577.9676,-67.1658\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"546.7401\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M575.5961,-77.8166C566.4299,-77.344 556.1336,-76.7352 546.7401,-76 532.5965,-74.893 516.8348,-73.2935 504.05,-71.9029\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"496.9012,-71.1135 504.2047,-68.7509 500.3801,-71.4977 503.8589,-71.8818 503.8589,-71.8818 503.8589,-71.8818 500.3801,-71.4977 503.5132,-75.0128 496.9012,-71.1135 496.9012,-71.1135\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"548.7401\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M593.3176,-104.37C592.6767,-114.9238 595.7742,-123.8701 602.6102,-123.8701 607.8439,-123.8701 610.8863,-118.6259 611.7373,-111.4312\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"611.9028,-104.37 614.8878,-111.4419 611.8207,-107.869 611.7387,-111.3681 611.7387,-111.3681 611.7387,-111.3681 611.8207,-107.869 608.5896,-111.2943 611.9028,-104.37 611.9028,-104.37\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"597.1102\" y=\"-127.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M249.8651,-13.7506C219.1612,-7.4524 155.3132,1.1903 109.7401,-23 96.8478,-29.8433 86.7578,-42.2298 79.439,-54.1422\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.8642,-60.2966 76.6563,-52.6614 77.6222,-57.2701 79.3802,-54.2436 79.3802,-54.2436 79.3802,-54.2436 77.6222,-57.2701 82.104,-55.8258 75.8642,-60.2966 75.8642,-60.2966\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M285.1606,-22.9708C294.994,-25.7291 307.5239,-29.1649 318.7401,-32 366.3374,-44.0311 422.2939,-56.6174 453.8292,-63.5686\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"460.9258,-65.1286 453.4127,-66.7022 457.5074,-64.3771 454.0891,-63.6257 454.0891,-63.6257 454.0891,-63.6257 457.5074,-64.3771 454.7654,-60.5491 460.9258,-65.1286 460.9258,-65.1286\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"335.7401\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M285.7688,-15.1861C329.0519,-9.1547 441.7024,2.2222 528.7401,-27 546.6931,-33.0276 564.1447,-44.938 577.5737,-55.8407\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"583.0725,-60.4314 575.6802,-58.3633 580.3857,-58.1883 577.699,-55.9452 577.699,-55.9452 577.699,-55.9452 580.3857,-58.1883 579.7178,-53.5272 583.0725,-60.4314 583.0725,-60.4314\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7401\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M253.6952,-29.4278C245.4335,-41.0566 250.1151,-54 267.7401,-54 282.1981,-54 287.9464,-45.2903 284.9849,-35.7411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"281.785,-29.4278 287.7595,-34.2475 283.3674,-32.5497 284.9497,-35.6717 284.9497,-35.6717 284.9497,-35.6717 283.3674,-32.5497 282.14,-37.0958 281.785,-29.4278 281.785,-29.4278\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"236.7401\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78fcd630> >"
|
|
]
|
|
},
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_incr=2, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Miscellaneous options\n",
|
|
"\n",
|
|
"### `return_log`\n",
|
|
"\n",
|
|
"The `return_log` can be used to obtain the log table as an object. In that case, `sat_minimize()` returns a pair, `(aut,log)` where `aut` can be `None` if the minimization failed. Also, the `log` table contains an extra column that is hidden by `display_log`: it contains the corresponding automaton in HOA format."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 17,
|
|
"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=\"637pt\" height=\"217pt\"\n",
|
|
" viewBox=\"0.00 0.00 637.48 217.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 213)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-213 633.4802,-213 633.4802,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"292.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"317.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"333.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"282.2401\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-85\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-85C4.3751,-85 17.3629,-85 30.7917,-85\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-85 30.8046,-88.1501 34.3045,-85 30.8045,-85.0001 30.8045,-85.0001 30.8045,-85.0001 34.3045,-85 30.8045,-81.8501 37.8045,-85 37.8045,-85\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-110.8213C56.2072,-121.1776 58.9404,-129.8701 64.8701,-129.8701 69.3173,-129.8701 71.9666,-124.9805 72.8178,-118.1667\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-110.8213 75.9779,-117.9252 72.9497,-114.3193 72.8297,-117.8172 72.8297,-117.8172 72.8297,-117.8172 72.9497,-114.3193 69.6816,-117.7092 73.0697,-110.8213 73.0697,-110.8213\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-133.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"478.7401\" cy=\"-69\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"478.7401\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.8609,-89.2001C97.7397,-89.9494 103.9371,-90.6137 109.7401,-91 239.0042,-99.6043 393.8509,-80.9594 453.5586,-72.6894\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"460.6882,-71.6882 454.1943,-75.7811 457.2222,-72.175 453.7562,-72.6617 453.7562,-72.6617 453.7562,-72.6617 457.2222,-72.175 453.3181,-69.5424 460.6882,-71.6882 460.6882,-71.6882\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-95.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"602.6102\" cy=\"-79\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"598.1102\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"594.6102\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M88.4817,-98.0155C95.1698,-101.1534 102.5823,-104.1352 109.7401,-106 290.2186,-153.0184 350.431,-183.6723 528.7401,-129 546.4887,-123.558 563.8127,-112.2491 577.2181,-101.7611\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"582.7132,-97.336 579.2369,-104.1798 579.9872,-99.5312 577.2612,-101.7264 577.2612,-101.7264 577.2612,-101.7264 579.9872,-99.5312 575.2854,-99.273 582.7132,-97.336 582.7132,-97.336\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"318.7401\" y=\"-161.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"267.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"267.7401\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.0835,-78.9666C121.6902,-71.6053 173.6202,-58.1261 216.7401,-42 226.2351,-38.449 236.3969,-33.8419 245.131,-29.6149\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"251.4971,-26.4803 246.6086,-32.3986 248.3571,-28.0264 245.2171,-29.5726 245.2171,-29.5726 245.2171,-29.5726 248.3571,-28.0264 243.8256,-26.7466 251.4971,-26.4803 251.4971,-26.4803\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M466.9836,-83.0417C462.5869,-93.9126 466.5057,-105 478.7401,-105 488.2982,-105 492.7809,-98.2328 492.1882,-90.0885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.4966,-83.0417 495.1936,-89.1131 491.3136,-86.4451 492.1306,-89.8484 492.1306,-89.8484 492.1306,-89.8484 491.3136,-86.4451 489.0676,-90.5837 490.4966,-83.0417 490.4966,-83.0417\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.2401\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M496.1306,-64.3551C512.2249,-60.7361 536.7603,-56.9488 557.7401,-61 562.1749,-61.8564 566.7279,-63.148 571.1534,-64.6542\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"577.9676,-67.1658 570.3101,-67.7005 574.6836,-65.9553 571.3996,-64.7449 571.3996,-64.7449 571.3996,-64.7449 574.6836,-65.9553 572.489,-61.7892 577.9676,-67.1658 577.9676,-67.1658\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"546.7401\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M575.5961,-77.8166C566.4299,-77.344 556.1336,-76.7352 546.7401,-76 532.5965,-74.893 516.8348,-73.2935 504.05,-71.9029\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"496.9012,-71.1135 504.2047,-68.7509 500.3801,-71.4977 503.8589,-71.8818 503.8589,-71.8818 503.8589,-71.8818 500.3801,-71.4977 503.5132,-75.0128 496.9012,-71.1135 496.9012,-71.1135\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"548.7401\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M593.3176,-104.37C592.6767,-114.9238 595.7742,-123.8701 602.6102,-123.8701 607.8439,-123.8701 610.8863,-118.6259 611.7373,-111.4312\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"611.9028,-104.37 614.8878,-111.4419 611.8207,-107.869 611.7387,-111.3681 611.7387,-111.3681 611.7387,-111.3681 611.8207,-107.869 608.5896,-111.2943 611.9028,-104.37 611.9028,-104.37\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"597.1102\" y=\"-127.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M249.8651,-13.7506C219.1612,-7.4524 155.3132,1.1903 109.7401,-23 96.8478,-29.8433 86.7578,-42.2298 79.439,-54.1422\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.8642,-60.2966 76.6563,-52.6614 77.6222,-57.2701 79.3802,-54.2436 79.3802,-54.2436 79.3802,-54.2436 77.6222,-57.2701 82.104,-55.8258 75.8642,-60.2966 75.8642,-60.2966\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M285.1606,-22.9708C294.994,-25.7291 307.5239,-29.1649 318.7401,-32 366.3374,-44.0311 422.2939,-56.6174 453.8292,-63.5686\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"460.9258,-65.1286 453.4127,-66.7022 457.5074,-64.3771 454.0891,-63.6257 454.0891,-63.6257 454.0891,-63.6257 457.5074,-64.3771 454.7654,-60.5491 460.9258,-65.1286 460.9258,-65.1286\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"335.7401\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M285.7688,-15.1861C329.0519,-9.1547 441.7024,2.2222 528.7401,-27 546.6931,-33.0276 564.1447,-44.938 577.5737,-55.8407\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"583.0725,-60.4314 575.6802,-58.3633 580.3857,-58.1883 577.699,-55.9452 577.699,-55.9452 577.699,-55.9452 580.3857,-58.1883 579.7178,-53.5272 583.0725,-60.4314 583.0725,-60.4314\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7401\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M253.6952,-29.4278C245.4335,-41.0566 250.1151,-54 267.7401,-54 282.1981,-54 287.9464,-45.2903 284.9849,-35.7411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"281.785,-29.4278 287.7595,-34.2475 283.3674,-32.5497 284.9497,-35.6717 284.9497,-35.6717 284.9497,-35.6717 283.3674,-32.5497 282.14,-37.0958 281.785,-29.4278 281.785,-29.4278\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"236.7401\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bd9e060> >"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" <th>automaton</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173183</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>HOA: v1 States: 5 Start: 0 AP: 3 \"a\" \"c\" \"b\" a...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173279</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>HOA: v1 States: 4 Start: 0 AP: 3 \"a\" \"c\" \"b\" a...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173327</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 6 5 13 40 2742 \n",
|
|
"1 5 4 4 12 32 2742 \n",
|
|
"2 4 3 NaN NaN NaN 2742 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \\\n",
|
|
"0 173183 7 0 2 0 \n",
|
|
"1 173279 0 0 1 0 \n",
|
|
"2 173327 0 0 0 0 \n",
|
|
"\n",
|
|
" automaton \n",
|
|
"0 HOA: v1 States: 5 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
|
|
"1 HOA: v1 States: 4 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
|
|
"2 NaN "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut, log = spot.sat_minimize(large, acc='co-Buchi', sat_incr=2, state_based=True, return_log=True)\n",
|
|
"display(aut)\n",
|
|
"display(log)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Here is how we can extract the automata from that log:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 18,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"automaton from line 0:\n"
|
|
]
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"580pt\" height=\"242pt\"\n",
|
|
" viewBox=\"0.00 0.00 579.74 242.21\" 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 238.2148)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-238.2148 575.7401,-238.2148 575.7401,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"263.3701\" y=\"-220.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"288.3701\" y=\"-220.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"304.3701\" y=\"-220.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"253.3701\" y=\"-206.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-93.2148\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-97.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-82.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-93.2148C4.3751,-93.2148 17.3629,-93.2148 30.7917,-93.2148\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-93.2148 30.8046,-96.3649 34.3045,-93.2148 30.8045,-93.2149 30.8045,-93.2149 30.8045,-93.2149 34.3045,-93.2148 30.8045,-90.0649 37.8045,-93.2148 37.8045,-93.2148\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-119.0361C56.2072,-129.3924 58.9404,-138.0848 64.8701,-138.0848 69.3173,-138.0848 71.9666,-133.1953 72.8178,-126.3815\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-119.0361 75.9779,-126.14 72.9497,-122.534 72.8297,-126.032 72.8297,-126.032 72.8297,-126.032 72.9497,-122.534 69.6816,-125.924 73.0697,-119.0361 73.0697,-119.0361\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-141.8848\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"265.7401\" cy=\"-55.2148\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"261.2401\" y=\"-59.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"257.7401\" y=\"-44.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M87.2405,-77.6258C94.1582,-73.5435 102.0014,-69.6169 109.7401,-67.2148 150.2086,-54.6533 199.2823,-52.9448 231.4477,-53.527\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"238.8445,-53.7067 231.77,-56.6856 235.3456,-53.6216 231.8466,-53.5366 231.8466,-53.5366 231.8466,-53.5366 235.3456,-53.6216 231.9232,-50.3875 238.8445,-53.7067 238.8445,-53.7067\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"130.2401\" y=\"-71.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"265.7401\" cy=\"-118.2148\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"265.7401\" y=\"-114.5148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.6325,-89.8376C122.3083,-86.779 173.8772,-84.1327 216.7401,-94.2148 226.1051,-96.4176 235.7516,-100.65 243.9824,-104.9549\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"250.5259,-108.5451 242.8737,-107.9396 247.4574,-106.8615 244.3889,-105.1779 244.3889,-105.1779 244.3889,-105.1779 247.4574,-106.8615 245.9042,-102.4163 250.5259,-108.5451 250.5259,-108.5451\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-98.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"553.7401\" cy=\"-122.2148\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"553.7401\" y=\"-118.5148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M82.4251,-114.1912C90.1127,-122.3058 99.6718,-131.0933 109.7401,-137.2148 159.6987,-167.5892 177.0051,-168.9881 234.7401,-178.2148 348.0788,-196.3276 378.5713,-168.5434 490.7401,-144.2148 502.8552,-141.5871 505.9893,-141.1642 517.7401,-137.2148 521.8517,-135.8329 526.1598,-134.2033 530.3087,-132.5365\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"537.0779,-129.7335 531.8156,-135.322 533.8441,-131.0726 530.6104,-132.4117 530.6104,-132.4117 530.6104,-132.4117 533.8441,-131.0726 529.4052,-129.5013 537.0779,-129.7335 537.0779,-129.7335\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"347.7401\" y=\"-187.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"461.7401\" cy=\"-83.2148\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"461.7401\" y=\"-79.5148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M82.514,-72.3822C90.2152,-64.2896 99.7604,-55.4797 109.7401,-49.2148 159.7488,-17.8213 176.5733,-14.3659 234.7401,-4.2148 316.4169,10.0393 341.2307,-14.8659 414.7401,-53.2148 423.6311,-57.8531 433.0228,-63.6501 441.0539,-68.9084\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"446.8994,-72.7964 439.3264,-71.5425 443.9852,-70.8581 441.0709,-68.9197 441.0709,-68.9197 441.0709,-68.9197 443.9852,-70.8581 442.8154,-66.2969 446.8994,-72.7964 446.8994,-72.7964\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-8.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M292.6109,-56.1567C322.6206,-57.5742 372.5267,-61.0265 414.7401,-69.2148 422.2625,-70.6739 430.3048,-72.8375 437.5716,-75.0298\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"444.532,-77.2066 436.9108,-78.1235 441.1915,-76.1619 437.8511,-75.1171 437.8511,-75.1171 437.8511,-75.1171 441.1915,-76.1619 438.7914,-72.1107 444.532,-77.2066 444.532,-77.2066\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"364.7401\" y=\"-73.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M247.7479,-118.8237C218.4913,-119.4477 158.9264,-119.1894 109.7401,-109.2148 105.4848,-108.3518 101.0877,-107.1699 96.786,-105.8361\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"90.1387,-103.6393 97.7736,-102.845 93.4619,-104.7376 96.7851,-105.8359 96.7851,-105.8359 96.7851,-105.8359 93.4619,-104.7376 95.7966,-108.8268 90.1387,-103.6393 90.1387,-103.6393\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-122.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M251.4026,-129.6426C242.9688,-141.2714 247.7479,-154.2148 265.7401,-154.2148 280.4993,-154.2148 286.3673,-145.505 283.3442,-135.9559\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"280.0776,-129.6426 286.0922,-134.4122 281.686,-132.7512 283.2945,-135.8597 283.2945,-135.8597 283.2945,-135.8597 281.686,-132.7512 280.4968,-137.3073 280.0776,-129.6426 280.0776,-129.6426\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-158.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M283.8572,-120.5073C293.0849,-121.562 304.492,-122.6933 314.7401,-123.2148 392.6955,-127.1818 485.1376,-124.7786 528.6815,-123.2252\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"535.7354,-122.9656 528.8561,-126.371 532.2378,-123.0944 528.7402,-123.2232 528.7402,-123.2232 528.7402,-123.2232 532.2378,-123.0944 528.6243,-120.0753 535.7354,-122.9656 535.7354,-122.9656\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"432.7401\" y=\"-129.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M283.4034,-114.464C292.7117,-112.5244 304.3282,-110.162 314.7401,-108.2148 357.4339,-100.2301 407.3079,-91.9731 436.6115,-87.2305\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"443.6015,-86.1027 437.1926,-90.3275 440.1462,-86.6603 436.6909,-87.2178 436.6909,-87.2178 436.6909,-87.2178 440.1462,-86.6603 436.1891,-84.108 443.6015,-86.1027 443.6015,-86.1027\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"314.7401\" y=\"-112.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M546.3986,-105.4379C536.801,-85.8742 517.9464,-54.5209 490.7401,-41.2148 428.0371,-10.5478 343.4992,-29.4043 297.9813,-43.6661\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"291.288,-45.8188 296.9874,-40.6768 294.62,-44.7472 297.9519,-43.6755 297.9519,-43.6755 297.9519,-43.6755 294.62,-44.7472 298.9164,-46.6742 291.288,-45.8188 291.288,-45.8188\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"456.2401\" y=\"-45.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M546.7089,-138.8788C545.1464,-148.8398 547.4901,-158.2148 553.7401,-158.2148 558.4276,-158.2148 560.9178,-152.9413 561.2108,-146.1024\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"560.7714,-138.8788 564.3407,-145.6746 560.9839,-142.3724 561.1965,-145.8659 561.1965,-145.8659 561.1965,-145.8659 560.9839,-142.3724 558.0523,-146.0572 560.7714,-138.8788 560.7714,-138.8788\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"550.2401\" y=\"-162.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->3 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M478.6143,-90.368C493.1391,-96.5252 514.2455,-105.4725 530.3908,-112.3167\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"536.9729,-115.1069 529.2986,-115.275 533.7505,-113.7409 530.528,-112.3748 530.528,-112.3748 530.528,-112.3748 533.7505,-113.7409 531.7575,-109.4746 536.9729,-115.1069 536.9729,-115.1069\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"513.2401\" y=\"-109.0148\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bd9e0c0> >"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"automaton from line 1:\n"
|
|
]
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"637pt\" height=\"217pt\"\n",
|
|
" viewBox=\"0.00 0.00 637.48 217.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 213)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-213 633.4802,-213 633.4802,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"292.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"317.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"333.2401\" y=\"-194.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"282.2401\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-85\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-85C4.3751,-85 17.3629,-85 30.7917,-85\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-85 30.8046,-88.1501 34.3045,-85 30.8045,-85.0001 30.8045,-85.0001 30.8045,-85.0001 34.3045,-85 30.8045,-81.8501 37.8045,-85 37.8045,-85\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-110.8213C56.2072,-121.1776 58.9404,-129.8701 64.8701,-129.8701 69.3173,-129.8701 71.9666,-124.9805 72.8178,-118.1667\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-110.8213 75.9779,-117.9252 72.9497,-114.3193 72.8297,-117.8172 72.8297,-117.8172 72.8297,-117.8172 72.9497,-114.3193 69.6816,-117.7092 73.0697,-110.8213 73.0697,-110.8213\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-133.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"478.7401\" cy=\"-69\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"478.7401\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.8609,-89.2001C97.7397,-89.9494 103.9371,-90.6137 109.7401,-91 239.0042,-99.6043 393.8509,-80.9594 453.5586,-72.6894\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"460.6882,-71.6882 454.1943,-75.7811 457.2222,-72.175 453.7562,-72.6617 453.7562,-72.6617 453.7562,-72.6617 457.2222,-72.175 453.3181,-69.5424 460.6882,-71.6882 460.6882,-71.6882\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-95.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"602.6102\" cy=\"-79\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"598.1102\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"594.6102\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M88.4817,-98.0155C95.1698,-101.1534 102.5823,-104.1352 109.7401,-106 290.2186,-153.0184 350.431,-183.6723 528.7401,-129 546.4887,-123.558 563.8127,-112.2491 577.2181,-101.7611\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"582.7132,-97.336 579.2369,-104.1798 579.9872,-99.5312 577.2612,-101.7264 577.2612,-101.7264 577.2612,-101.7264 579.9872,-99.5312 575.2854,-99.273 582.7132,-97.336 582.7132,-97.336\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"318.7401\" y=\"-161.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"267.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"267.7401\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.0835,-78.9666C121.6902,-71.6053 173.6202,-58.1261 216.7401,-42 226.2351,-38.449 236.3969,-33.8419 245.131,-29.6149\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"251.4971,-26.4803 246.6086,-32.3986 248.3571,-28.0264 245.2171,-29.5726 245.2171,-29.5726 245.2171,-29.5726 248.3571,-28.0264 243.8256,-26.7466 251.4971,-26.4803 251.4971,-26.4803\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M466.9836,-83.0417C462.5869,-93.9126 466.5057,-105 478.7401,-105 488.2982,-105 492.7809,-98.2328 492.1882,-90.0885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.4966,-83.0417 495.1936,-89.1131 491.3136,-86.4451 492.1306,-89.8484 492.1306,-89.8484 492.1306,-89.8484 491.3136,-86.4451 489.0676,-90.5837 490.4966,-83.0417 490.4966,-83.0417\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.2401\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M496.1306,-64.3551C512.2249,-60.7361 536.7603,-56.9488 557.7401,-61 562.1749,-61.8564 566.7279,-63.148 571.1534,-64.6542\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"577.9676,-67.1658 570.3101,-67.7005 574.6836,-65.9553 571.3996,-64.7449 571.3996,-64.7449 571.3996,-64.7449 574.6836,-65.9553 572.489,-61.7892 577.9676,-67.1658 577.9676,-67.1658\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"546.7401\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M575.5961,-77.8166C566.4299,-77.344 556.1336,-76.7352 546.7401,-76 532.5965,-74.893 516.8348,-73.2935 504.05,-71.9029\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"496.9012,-71.1135 504.2047,-68.7509 500.3801,-71.4977 503.8589,-71.8818 503.8589,-71.8818 503.8589,-71.8818 500.3801,-71.4977 503.5132,-75.0128 496.9012,-71.1135 496.9012,-71.1135\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"548.7401\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M593.3176,-104.37C592.6767,-114.9238 595.7742,-123.8701 602.6102,-123.8701 607.8439,-123.8701 610.8863,-118.6259 611.7373,-111.4312\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"611.9028,-104.37 614.8878,-111.4419 611.8207,-107.869 611.7387,-111.3681 611.7387,-111.3681 611.7387,-111.3681 611.8207,-107.869 608.5896,-111.2943 611.9028,-104.37 611.9028,-104.37\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"597.1102\" y=\"-127.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M249.8651,-13.7506C219.1612,-7.4524 155.3132,1.1903 109.7401,-23 96.8478,-29.8433 86.7578,-42.2298 79.439,-54.1422\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.8642,-60.2966 76.6563,-52.6614 77.6222,-57.2701 79.3802,-54.2436 79.3802,-54.2436 79.3802,-54.2436 77.6222,-57.2701 82.104,-55.8258 75.8642,-60.2966 75.8642,-60.2966\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M285.1606,-22.9708C294.994,-25.7291 307.5239,-29.1649 318.7401,-32 366.3374,-44.0311 422.2939,-56.6174 453.8292,-63.5686\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"460.9258,-65.1286 453.4127,-66.7022 457.5074,-64.3771 454.0891,-63.6257 454.0891,-63.6257 454.0891,-63.6257 457.5074,-64.3771 454.7654,-60.5491 460.9258,-65.1286 460.9258,-65.1286\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"335.7401\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M285.7688,-15.1861C329.0519,-9.1547 441.7024,2.2222 528.7401,-27 546.6931,-33.0276 564.1447,-44.938 577.5737,-55.8407\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"583.0725,-60.4314 575.6802,-58.3633 580.3857,-58.1883 577.699,-55.9452 577.699,-55.9452 577.699,-55.9452 580.3857,-58.1883 579.7178,-53.5272 583.0725,-60.4314 583.0725,-60.4314\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7401\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M253.6952,-29.4278C245.4335,-41.0566 250.1151,-54 267.7401,-54 282.1981,-54 287.9464,-45.2903 284.9849,-35.7411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"281.785,-29.4278 287.7595,-34.2475 283.3674,-32.5497 284.9497,-35.6717 284.9497,-35.6717 284.9497,-35.6717 283.3674,-32.5497 282.14,-37.0958 281.785,-29.4278 281.785,-29.4278\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"236.7401\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bd9e150> >"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"for line, data in log.iterrows():\n",
|
|
" if type(data.automaton) is str:\n",
|
|
" print(\"automaton from line {}:\".format(line))\n",
|
|
" display(spot.automaton(data.automaton + \"\\n\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## `sat_langmap`\n",
|
|
"\n",
|
|
"When using the default binary search approach, the `sat_langmap=True` can help refine the lower bound by first testing the language-equivalence of all states in the automaton. This allows to form equivalence classes of states, and clearly the minimal automaton needs at least as many states as the number of equivalence states.\n",
|
|
"\n",
|
|
"For instance in the `large` automaton we use as example, the 6 states correspond to only two different languages. This can be seen with the `highlight_language()` function, which colors states with identical languages. This information can be used by the minimization function to search a minimal automaton between 2 and 6 states."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 19,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Title: & | F G a F b F G c Pages: 1 -->\n",
|
|
"<svg width=\"734pt\" height=\"262pt\"\n",
|
|
" viewBox=\"0.00 0.00 734.00 261.56\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.7976 .7976) rotate(0) translate(4 323.9411)\">\n",
|
|
"<title>& | F G a F b F G c</title>\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-323.9411 916.2935,-323.9411 916.2935,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"339.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"367.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"383.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"426.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"442.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"489.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"505.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"548.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"564.6468\" y=\"-305.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"427.1468\" y=\"-291.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#ff4da0\" stroke-width=\"2\" cx=\"71.9411\" cy=\"-203.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"67.4411\" y=\"-207.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
|
|
"<text text-anchor=\"start\" x=\"55.9411\" y=\"-193.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"71.9411\" y=\"-193.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->5 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.3023,-203.9411C4.5397,-203.9411 17.1247,-203.9411 30.795,-203.9411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.999,-203.9411 30.999,-207.0912 34.499,-203.9412 30.999,-203.9412 30.999,-203.9412 30.999,-203.9412 34.499,-203.9412 30.9989,-200.7912 37.999,-203.9411 37.999,-203.9411\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5->5 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>5->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M62.1917,-236.6575C62.2421,-247.3601 65.4919,-255.8823 71.9411,-255.8823 76.8788,-255.8823 79.9411,-250.8867 81.1279,-243.7418\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.6905,-236.6575 84.2763,-243.885 81.4134,-240.1466 81.1362,-243.6356 81.1362,-243.6356 81.1362,-243.6356 81.4134,-240.1466 77.9961,-243.3861 81.6905,-236.6575 81.6905,-236.6575\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"18.4411\" y=\"-259.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"763.4701\" cy=\"-173.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"758.9701\" y=\"-177.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
|
|
"<text text-anchor=\"start\" x=\"747.4701\" y=\"-163.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"763.4701\" y=\"-163.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M105.4303,-209.6067C146.9318,-216.1251 219.8779,-225.9411 282.8234,-225.9411 282.8234,-225.9411 282.8234,-225.9411 648.5879,-225.9411 678.0047,-225.9411 708.1904,-211.6156 730.2337,-198.0027\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"736.2278,-194.1946 732.0085,-200.6072 733.2735,-196.0715 730.3193,-197.9484 730.3193,-197.9484 730.3193,-197.9484 733.2735,-196.0715 728.6301,-195.2896 736.2278,-194.1946 736.2278,-194.1946\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"426.2056\" y=\"-229.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"878.3524\" cy=\"-211.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"873.8524\" y=\"-215.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"862.3524\" y=\"-201.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"878.3524\" y=\"-201.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M101.24,-221.4818C108.4683,-225.3159 116.3125,-229.0783 123.8823,-231.9411 191.7221,-257.5976 210.2941,-268.9411 282.8234,-268.9411 282.8234,-268.9411 282.8234,-268.9411 763.4701,-268.9411 793.5903,-268.9411 823.958,-253.0238 845.9004,-238.0119\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"851.8587,-233.8158 847.9493,-240.4218 848.9971,-235.8311 846.1355,-237.8464 846.1355,-237.8464 846.1355,-237.8464 848.9971,-235.8311 844.3217,-235.271 851.8587,-233.8158 851.8587,-233.8158\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"529.6468\" y=\"-272.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#ff4da0\" stroke-width=\"2\" cx=\"282.8234\" cy=\"-130.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"278.3234\" y=\"-134.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"266.8234\" y=\"-120.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"282.8234\" y=\"-120.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M105.6811,-199.85C138.6856,-194.9908 189.8317,-185.1451 230.8823,-166.9411 237.4267,-164.039 244.0094,-160.2775 250.1856,-156.2833\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"256.2099,-152.2347 252.1571,-158.7537 253.305,-154.187 250.4,-156.1392 250.4,-156.1392 250.4,-156.1392 253.305,-154.187 248.643,-153.5248 256.2099,-152.2347 256.2099,-152.2347\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"146.3823\" y=\"-199.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"444.7056\" cy=\"-84.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"440.2056\" y=\"-88.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7056\" y=\"-74.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"444.7056\" y=\"-74.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M429.7505,-115.6106C429.1737,-127.2527 434.1588,-136.8823 444.7056,-136.8823 452.9454,-136.8823 457.7904,-131.0048 459.2409,-122.8821\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"459.6608,-115.6106 462.4019,-122.7806 459.4589,-119.1048 459.2571,-122.599 459.2571,-122.599 459.2571,-122.599 459.4589,-119.1048 456.1124,-122.4174 459.6608,-115.6106 459.6608,-115.6106\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"428.7056\" y=\"-140.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"648.5879\" cy=\"-33.9411\" rx=\"33.8824\" ry=\"33.8824\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"644.0879\" y=\"-37.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"632.5879\" y=\"-23.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"648.5879\" y=\"-23.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M477.9166,-76.6336C513.6083,-67.7055 570.3403,-53.5143 608.4927,-43.9707\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"615.3911,-42.2451 609.3648,-46.9997 611.9957,-43.0945 608.6004,-43.9439 608.6004,-43.9439 608.6004,-43.9439 611.9957,-43.0945 607.8359,-40.888 615.3911,-42.2451 615.3911,-42.2451\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"528.6468\" y=\"-75.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M477.8108,-94.0592C523.7733,-106.7342 609.5106,-130.4351 682.529,-150.9411 696.0628,-154.7419 710.8584,-158.935 724.0551,-162.6885\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"730.7952,-164.6069 723.2002,-165.7202 727.4289,-163.6487 724.0626,-162.6906 724.0626,-162.6906 724.0626,-162.6906 727.4289,-163.6487 724.9249,-159.6609 730.7952,-164.6069 730.7952,-164.6069\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"643.0879\" y=\"-154.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M638.0879,-66.4043C638.0879,-77.2254 641.5879,-85.8823 648.5879,-85.8823 653.9473,-85.8823 657.255,-80.8078 658.5111,-73.5727\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"659.0879,-66.4043 661.6662,-73.6345 658.8071,-69.8931 658.5264,-73.3818 658.5264,-73.3818 658.5264,-73.3818 658.8071,-69.8931 655.3865,-73.1291 659.0879,-66.4043 659.0879,-66.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"645.0879\" y=\"-89.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M670.9695,-59.7652C683.1037,-73.888 698.2848,-91.7556 711.529,-107.9411 720.2551,-118.6051 729.6166,-130.3896 737.9554,-141.0141\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"742.4723,-146.7829 735.6766,-143.2133 740.3145,-144.0271 738.1568,-141.2713 738.1568,-141.2713 738.1568,-141.2713 740.3145,-144.0271 740.637,-139.3294 742.4723,-146.7829 742.4723,-146.7829\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"700.529\" y=\"-111.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M752.9701,-206.4043C752.9701,-217.2254 756.4701,-225.8823 763.4701,-225.8823 768.8295,-225.8823 772.1372,-220.8078 773.3933,-213.5727\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"773.9701,-206.4043 776.5485,-213.6345 773.6894,-209.8931 773.4086,-213.3818 773.4086,-213.3818 773.4086,-213.3818 773.6894,-209.8931 770.2688,-213.1291 773.9701,-206.4043 773.9701,-206.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"757.9701\" y=\"-229.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>4->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M795.777,-184.6274C809.2368,-189.0795 824.9901,-194.2903 839.108,-198.9601\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"845.89,-201.2034 838.2549,-201.9957 842.5671,-200.1043 839.2441,-199.0051 839.2441,-199.0051 839.2441,-199.0051 842.5671,-200.1043 840.2334,-196.0144 845.89,-201.2034 845.89,-201.2034\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"817.4113\" y=\"-197.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M852.8311,-189.1741C844.9028,-183.4257 835.7727,-178.0167 826.4113,-174.9411 819.5587,-172.6898 812.0559,-171.5329 804.6937,-171.0557\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"797.4077,-170.7897 804.518,-167.8972 800.9054,-170.9174 804.403,-171.0451 804.403,-171.0451 804.403,-171.0451 800.9054,-170.9174 804.2881,-174.193 797.4077,-170.7897 797.4077,-170.7897\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"815.4113\" y=\"-178.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M867.8524,-244.4043C867.8524,-255.2254 871.3524,-263.8823 878.3524,-263.8823 883.7118,-263.8823 887.0195,-258.8078 888.2756,-251.5727\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"888.8524,-244.4043 891.4307,-251.6345 888.5716,-247.8931 888.2909,-251.3818 888.2909,-251.3818 888.2909,-251.3818 888.5716,-247.8931 885.151,-251.1291 888.8524,-244.4043 888.8524,-244.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"874.8524\" y=\"-267.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M248.7498,-129.2618C215.2662,-128.9915 163.5639,-132.3469 123.8823,-151.9411 114.2145,-156.7149 105.2699,-164.0028 97.6243,-171.6249\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"92.5459,-176.9283 95.1121,-169.6938 94.9666,-174.4004 97.3873,-171.8724 97.3873,-171.8724 97.3873,-171.8724 94.9666,-174.4004 99.6624,-174.0511 92.5459,-176.9283 92.5459,-176.9283\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"123.8823\" y=\"-155.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M315.5827,-121.6323C341.4743,-114.275 377.7078,-103.979 405.2043,-96.1657\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"411.9951,-94.2361 406.1227,-99.1795 408.6283,-95.1928 405.2616,-96.1495 405.2616,-96.1495 405.2616,-96.1495 408.6283,-95.1928 404.4006,-93.1194 411.9951,-94.2361 411.9951,-94.2361\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"334.7645\" y=\"-120.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M315.6329,-140.4855C341.2871,-147.4959 377.9782,-156.5352 410.7645,-160.9411 522.4531,-175.95 655.7003,-176.1033 721.887,-174.9996\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"729.2355,-174.8671 722.2934,-178.1428 725.7361,-174.9302 722.2366,-174.9934 722.2366,-174.9934 722.2366,-174.9934 725.7361,-174.9302 722.1798,-171.8439 729.2355,-174.8671 729.2355,-174.8671\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"496.6468\" y=\"-178.7411\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M267.8682,-161.6106C267.2915,-173.2527 272.2765,-182.8823 282.8234,-182.8823 291.0631,-182.8823 295.9082,-177.0048 297.3586,-168.8821\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"297.7785,-161.6106 300.5196,-168.7806 297.5767,-165.1048 297.3749,-168.599 297.3749,-168.599 297.3749,-168.599 297.5767,-165.1048 294.2301,-168.4174 297.7785,-161.6106 297.7785,-161.6106\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"251.8234\" y=\"-186.6823\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f78761db0> >"
|
|
]
|
|
},
|
|
"execution_count": 19,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.highlight_languages(large); large"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Compare the next two logs, with and without `sat_langmap`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 20,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>687</td>\n",
|
|
" <td>21896</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>1905</td>\n",
|
|
" <td>100457</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 3 NaN NaN NaN 687 \n",
|
|
"1 6 5 4 12 32 1905 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 21896 1 0 0 0 \n",
|
|
"1 100457 4 0 2 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"734pt\" height=\"171pt\"\n",
|
|
" viewBox=\"0.00 0.00 734.00 171.18\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.9231 .9231) rotate(0) translate(4 181.4341)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-181.4341 791.1102,-181.4341 791.1102,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"371.0551\" y=\"-163.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"396.0551\" y=\"-163.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"412.0551\" y=\"-163.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"361.0551\" y=\"-149.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-41.4341\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-45.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-30.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-41.4341C4.3751,-41.4341 17.3629,-41.4341 30.7917,-41.4341\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-41.4341 30.8046,-44.5842 34.3045,-41.4342 30.8045,-41.4342 30.8045,-41.4342 30.8045,-41.4342 34.3045,-41.4342 30.8045,-38.2842 37.8045,-41.4341 37.8045,-41.4341\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-67.2554C56.2072,-77.6117 58.9404,-86.3042 64.8701,-86.3042 69.3173,-86.3042 71.9666,-81.4146 72.8178,-74.6008\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-67.2554 75.9779,-74.3593 72.9497,-70.7534 72.8297,-74.2513 72.8297,-74.2513 72.8297,-74.2513 72.9497,-70.7534 69.6816,-74.1433 73.0697,-67.2554 73.0697,-67.2554\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"29.8701\" y=\"-90.1042\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"499.7401\" cy=\"-90.4341\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"499.7401\" y=\"-86.7341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.2075,-53.3369C95.7705,-56.2541 102.9393,-59.1817 109.7401,-61.4341 213.2044,-95.7016 243.7732,-92.1265 352.7401,-94.4341 397.1746,-95.3751 408.3357,-96.3202 452.7401,-94.4341 459.71,-94.1381 467.2457,-93.5961 474.1987,-93.0047\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"481.4605,-92.3528 474.7702,-96.1161 477.9746,-92.6658 474.4886,-92.9788 474.4886,-92.9788 474.4886,-92.9788 477.9746,-92.6658 474.2069,-89.8414 481.4605,-92.3528 481.4605,-92.3528\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-97.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"284.7401\" cy=\"-29.4341\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"284.7401\" y=\"-25.7341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.7983,-41.8095C122.1908,-42.0224 173.0887,-41.7435 216.7401,-38.4341 231.034,-37.3504 246.9204,-35.296 259.7413,-33.4233\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"266.9006,-32.3504 260.4448,-36.5031 263.4392,-32.8691 259.9779,-33.3879 259.9779,-33.3879 259.9779,-33.3879 263.4392,-32.8691 259.511,-30.2727 266.9006,-32.3504 266.9006,-32.3504\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"113.2401\" y=\"-46.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & !b) | (!b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"708.6102\" cy=\"-45.4341\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"704.1102\" y=\"-49.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"700.6102\" y=\"-34.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M85.4806,-23.7371C92.6971,-18.5209 101.1536,-13.416 109.7401,-10.4341 162.3285,7.8286 179.0993,-4.2128 234.7401,-2.4341 425.8724,3.6759 475.0013,-4.6683 663.7401,-35.4341 667.4817,-36.044 671.3796,-36.7719 675.247,-37.5529\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"682.1349,-39.0022 674.6363,-40.6433 678.7099,-38.2815 675.2849,-37.5608 675.2849,-37.5608 675.2849,-37.5608 678.7099,-38.2815 675.9336,-34.4783 682.1349,-39.0022 682.1349,-39.0022\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"373.7401\" y=\"-9.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M485.6952,-101.8619C477.4335,-113.4907 482.1151,-126.4341 499.7401,-126.4341 514.1981,-126.4341 519.9464,-117.7244 516.9849,-108.1752\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"513.785,-101.8619 519.7595,-106.6816 515.3674,-104.9839 516.9497,-108.1058 516.9497,-108.1058 516.9497,-108.1058 515.3674,-104.9839 514.14,-109.5299 513.785,-101.8619 513.785,-101.8619\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"496.2401\" y=\"-130.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M517.649,-92.2776C548.545,-94.7787 613.3894,-97.0183 663.7401,-78.4341 670.4078,-75.9731 676.9455,-72.205 682.8782,-68.0832\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"688.5917,-63.8789 684.8206,-70.5649 685.7727,-65.9533 682.9536,-68.0277 682.9536,-68.0277 682.9536,-68.0277 685.7727,-65.9533 681.0866,-65.4906 688.5917,-63.8789 688.5917,-63.8789\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"599.7401\" y=\"-97.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M267.0736,-25.1776C235.1798,-18.2058 166.0645,-6.369 109.7401,-19.4341 104.7432,-20.5932 99.6609,-22.3904 94.7994,-24.4691\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3355,-27.4448 93.3769,-21.6562 91.5148,-25.9812 94.6941,-24.5175 94.6941,-24.5175 94.6941,-24.5175 91.5148,-25.9812 96.0114,-27.3789 88.3355,-27.4448 88.3355,-27.4448\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-23.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M302.3345,-34.426C340.6198,-45.2884 431.556,-71.0889 475.3463,-83.5131\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"482.2042,-85.4588 474.6102,-86.5785 478.8371,-84.5034 475.47,-83.5481 475.47,-83.5481 475.47,-83.5481 478.8371,-84.5034 476.3298,-80.5177 482.2042,-85.4588 482.2042,-85.4588\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"352.7401\" y=\"-79.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.2321,-39.0196C256.7544,-51.0772 261.9237,-65.4341 284.7401,-65.4341 304.1697,-65.4341 310.8024,-55.0231 304.6381,-44.4865\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"300.2481,-39.0196 307.0872,-42.5054 302.4396,-41.7486 304.6311,-44.4777 304.6311,-44.4777 304.6311,-44.4777 302.4396,-41.7486 302.1749,-46.45 300.2481,-39.0196 300.2481,-39.0196\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"253.7401\" y=\"-69.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M302.8876,-30.0554C357.4696,-31.9344 524.9256,-37.7766 663.7401,-43.4341 667.1634,-43.5736 670.7333,-43.7242 674.2987,-43.8778\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"681.5624,-44.1951 674.4316,-47.0366 678.0658,-44.0423 674.5691,-43.8896 674.5691,-43.8896 674.5691,-43.8896 678.0658,-44.0423 674.7066,-40.7426 681.5624,-44.1951 681.5624,-44.1951\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"470.7401\" y=\"-42.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M681.7042,-43.7897C648.8845,-42.6722 592.1653,-43.6372 546.7401,-59.4341 537.0287,-62.8113 527.363,-68.6469 519.3449,-74.3505\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"513.5611,-78.6434 517.3046,-71.942 516.3716,-76.5574 519.182,-74.4714 519.182,-74.4714 519.182,-74.4714 516.3716,-76.5574 521.0594,-77.0008 513.5611,-78.6434 513.5611,-78.6434\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"546.7401\" y=\"-63.2341\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c | (!a & !b) | (a & b)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M690.8346,-65.7381C686.5483,-78.3253 692.4735,-90.3042 708.6102,-90.3042 721.7213,-90.3042 728.0911,-82.3962 727.7198,-72.6793\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"726.3858,-65.7381 730.8004,-72.0178 727.0464,-69.1752 727.707,-72.6123 727.707,-72.6123 727.707,-72.6123 727.0464,-69.1752 724.6137,-73.2069 726.3858,-65.7381 726.3858,-65.7381\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"630.1102\" y=\"-94.1042\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & b & !c) | (a & !b & !c)</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bd9e180> >"
|
|
]
|
|
},
|
|
"execution_count": 20,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"# Binary search between 1 and 6\n",
|
|
"spot.sat_minimize(large, acc='co-Buchi', state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 21,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>1220</td>\n",
|
|
" <td>51612</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>162</td>\n",
|
|
" <td>3129</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>363</td>\n",
|
|
" <td>10496</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 4 4 12 32 1220 \n",
|
|
"1 4 2 NaN NaN NaN 162 \n",
|
|
"2 4 3 NaN NaN NaN 363 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 51612 2 0 1 0 \n",
|
|
"1 3129 1 0 0 0 \n",
|
|
"2 10496 0 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"509pt\" height=\"199pt\"\n",
|
|
" viewBox=\"0.00 0.00 509.48 199.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 195)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-195 505.4802,-195 505.4802,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"228.2401\" y=\"-176.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"253.2401\" y=\"-176.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"269.2401\" y=\"-176.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"218.2401\" y=\"-162.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-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=\"-74\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-70.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-74C4.178,-74 17.9448,-74 30.9241,-74\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-74 30.9808,-77.1501 34.4807,-74 30.9807,-74.0001 30.9807,-74.0001 30.9807,-74.0001 34.4807,-74 30.9807,-70.8501 37.9807,-74 37.9807,-74\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-91.0373C48.3189,-100.8579 50.4453,-110 56,-110 60.166,-110 62.4036,-104.8576 62.7128,-98.1433\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.3792,-91.0373 65.8541,-97.8818 62.5434,-94.5335 62.7076,-98.0296 62.7076,-98.0296 62.7076,-98.0296 62.5434,-94.5335 59.561,-98.1774 62.3792,-91.0373 62.3792,-91.0373\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"25\" y=\"-113.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"243.8701\" cy=\"-69\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"239.3701\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"235.8701\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M71.5228,-64.2643C77.6596,-60.9534 84.9272,-57.6697 92,-56 138.2834,-45.074 151.9164,-49.3168 199,-56 203.0124,-56.5695 207.1679,-57.412 211.2579,-58.3992\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"218.0422,-60.1746 210.4727,-61.4498 214.6562,-59.2885 211.2702,-58.4024 211.2702,-58.4024 211.2702,-58.4024 214.6562,-59.2885 212.0677,-55.355 218.0422,-60.1746 218.0422,-60.1746\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"474.6102\" cy=\"-85\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"470.1102\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"466.6102\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M71.8106,-82.8077C99.9499,-97.8969 161.0323,-128.0288 217,-138 299.2176,-152.6479 395.4473,-119.3129 443.7012,-99.0803\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"450.1851,-96.3188 444.9793,-101.9599 446.965,-97.6903 443.7449,-99.0618 443.7449,-99.0618 443.7449,-99.0618 446.965,-97.6903 442.5106,-96.1637 450.1851,-96.3188 450.1851,-96.3188\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"288.7401\" y=\"-143.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"362.2401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"362.2401\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M68.986,-61.0657C75.4194,-55.3414 83.5986,-49.011 92,-45 174.563,-5.5823 287.2222,-10.4073 336.9205,-15.052\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"344.0639,-15.7599 336.7874,-18.2042 340.581,-15.4147 337.098,-15.0695 337.098,-15.0695 337.098,-15.0695 340.581,-15.4147 337.4087,-11.9349 344.0639,-15.7599 344.0639,-15.7599\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"226.8701\" y=\"-17.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M216.8249,-70.3087C210.9494,-70.5642 204.7672,-70.811 199,-71 157.7634,-72.3514 109.8168,-73.2123 81.2409,-73.6502\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"74.0628,-73.7575 81.0148,-70.5031 77.5624,-73.7051 81.062,-73.6527 81.062,-73.6527 81.062,-73.6527 77.5624,-73.7051 81.1091,-76.8024 74.0628,-73.7575 74.0628,-73.7575\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"94\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M232.4267,-93.4616C231.3369,-104.4053 235.1513,-113.8701 243.8701,-113.8701 250.5454,-113.8701 254.3458,-108.322 255.2715,-100.8099\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"255.3134,-93.4616 258.4234,-100.4795 255.2934,-96.9616 255.2734,-100.4615 255.2734,-100.4615 255.2734,-100.4615 255.2934,-96.9616 252.1235,-100.4435 255.3134,-93.4616 255.3134,-93.4616\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"210.8701\" y=\"-117.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M270.9766,-71.7118C291.0521,-73.6546 319.083,-76.2301 343.7401,-78 376.5161,-80.3526 413.9621,-82.2786 440.3777,-83.5106\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"447.5227,-83.8395 440.3852,-86.6642 444.0264,-83.6785 440.5301,-83.5175 440.5301,-83.5175 440.5301,-83.5175 444.0264,-83.6785 440.6749,-80.3709 447.5227,-83.8395 447.5227,-83.8395\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"343.7401\" y=\"-83.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M268.6843,-58.3087C289.3929,-49.3864 318.6928,-36.7625 338.9612,-28.0298\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"345.4631,-25.2284 340.2809,-30.8912 342.2488,-26.6133 339.0344,-27.9983 339.0344,-27.9983 339.0344,-27.9983 342.2488,-26.6133 337.788,-25.1054 345.4631,-25.2284 345.4631,-25.2284\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"290.2401\" y=\"-52.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M463.4948,-109.9167C462.5847,-120.6664 466.2899,-129.8701 474.6102,-129.8701 480.9804,-129.8701 484.6453,-124.475 485.6049,-117.1217\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"485.7256,-109.9167 488.7578,-116.9686 485.6669,-113.4162 485.6083,-116.9158 485.6083,-116.9158 485.6083,-116.9158 485.6669,-113.4162 482.4587,-116.863 485.7256,-109.9167 485.7256,-109.9167\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"456.1102\" y=\"-133.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M450.7957,-72.0321C435.7286,-63.6977 415.9214,-52.5017 398.7401,-42 393.7353,-38.9409 388.4229,-35.5396 383.4457,-32.282\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"377.3688,-28.2693 384.946,-29.4979 380.2895,-30.1979 383.2102,-32.1265 383.2102,-32.1265 383.2102,-32.1265 380.2895,-30.1979 381.4745,-34.7552 377.3688,-28.2693 377.3688,-28.2693\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"398.7401\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M380.3276,-15.3683C394.6395,-14.1815 414.6573,-14.5804 429.7401,-23 442.4848,-30.1144 452.5539,-42.5394 459.8969,-54.4073\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"463.488,-60.5317 457.2299,-56.0866 461.7176,-57.5124 459.9472,-54.4932 459.9472,-54.4932 459.9472,-54.4932 461.7176,-57.5124 462.6645,-52.8998 463.488,-60.5317 463.488,-60.5317\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"408.7401\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M353.2614,-33.916C350.9191,-44.1504 353.912,-54 362.2401,-54 368.6163,-54 371.8652,-48.2263 371.9866,-40.9268\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"371.2189,-33.916 375.1122,-40.5315 371.5999,-37.3952 371.9809,-40.8744 371.9809,-40.8744 371.9809,-40.8744 371.5999,-37.3952 368.8497,-41.2174 371.2189,-33.916 371.2189,-33.916\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"358.7401\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bdc5ea0> >"
|
|
]
|
|
},
|
|
"execution_count": 21,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"# Binary search between 2 and 6 thanks to sat_langmap\n",
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_langmap=True, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### `states`\n",
|
|
"\n",
|
|
"Sometimes we do not want a minimization loop, we just want to generate an equivalent automaton with a given number of states. In that case, we use the `states` option. However there is no constraint that all state should be reachable, so in the end, you could end with an automaton with fewer states than requested."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 22,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>22</td>\n",
|
|
" <td>56</td>\n",
|
|
" <td>1379</td>\n",
|
|
" <td>87992</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 2 7 7 22 56 1379 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 87992 3 0 2 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"690pt\" height=\"360pt\"\n",
|
|
" viewBox=\"0.00 0.00 689.62 360.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.8491 .8491) rotate(0) translate(4 420)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-420 808.2203,-420 808.2203,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"379.6102\" y=\"-401.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"404.6102\" y=\"-401.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"420.6102\" y=\"-401.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"369.6102\" y=\"-387.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"64.8701\" cy=\"-154\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-157.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-142.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-154C4.3751,-154 17.3629,-154 30.7917,-154\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-154 30.8046,-157.1501 34.3045,-154 30.8045,-154.0001 30.8045,-154.0001 30.8045,-154.0001 34.3045,-154 30.8045,-150.8501 37.8045,-154 37.8045,-154\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-179.8213C56.2072,-190.1776 58.9404,-198.8701 64.8701,-198.8701 69.3173,-198.8701 71.9666,-193.9805 72.8178,-187.1667\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-179.8213 75.9779,-186.9252 72.9497,-183.3193 72.8297,-186.8172 72.8297,-186.8172 72.8297,-186.8172 72.9497,-183.3193 69.6816,-186.7092 73.0697,-179.8213 73.0697,-179.8213\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"29.8701\" y=\"-202.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"611.3503\" cy=\"-296\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"606.8503\" y=\"-299.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"603.3503\" y=\"-284.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M80.3615,-176.3232C88.1582,-186.076 98.3678,-196.8882 109.7401,-204 142.6602,-224.587 155.8475,-219.5322 193.7401,-228 334.7822,-259.5186 505.69,-282.7545 577.2538,-291.8227\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"584.2703,-292.7067 576.9314,-294.9569 580.7977,-292.2692 577.3252,-291.8316 577.3252,-291.8316 577.3252,-291.8316 580.7977,-292.2692 577.719,-288.7064 584.2703,-292.7067 584.2703,-292.7067\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"265.4802\" y=\"-257.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"220.6102\" cy=\"-192\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"216.1102\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"212.6102\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.741,-149.3464C114.7632,-146.4921 148.4292,-145.0526 175.7401,-155 183.2942,-157.7514 190.49,-162.3707 196.8196,-167.4298\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"202.3743,-172.1586 195.0022,-170.0196 199.7093,-169.8898 197.0442,-167.621 197.0442,-167.621 197.0442,-167.621 199.7093,-169.8898 199.0861,-165.2224 202.3743,-172.1586 202.3743,-172.1586\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-158.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"786.2203\" cy=\"-158\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"786.2203\" y=\"-154.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M75.8459,-129.2572C97.0354,-85.725 147.9828,0 220.6102,0 220.6102,0 220.6102,0 611.3503,0 677.7347,0 704.2481,-7.11 750.2203,-55 770.6984,-76.3323 779.5882,-109.9479 783.4079,-132.9341\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"784.4782,-139.9946 780.3146,-133.5458 783.9536,-136.5341 783.429,-133.0737 783.429,-133.0737 783.429,-133.0737 783.9536,-136.5341 786.5434,-132.6015 784.4782,-139.9946 784.4782,-139.9946\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"349.4802\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"395.4802\" cy=\"-115\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"395.4802\" y=\"-111.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->5 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>0->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.3433,-147.5559C97.365,-146.2421 103.7522,-144.9676 109.7401,-144 205.2537,-128.5652 320.1362,-119.8676 370.1521,-116.5616\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"377.3306,-116.0949 370.5497,-119.6925 373.8379,-116.322 370.3453,-116.5491 370.3453,-116.5491 370.3453,-116.5491 373.8379,-116.322 370.1409,-113.4058 377.3306,-116.0949 377.3306,-116.0949\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"202.1102\" y=\"-136.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M638.2889,-293.2692C676.2708,-289.1892 741.8921,-281.2091 750.2203,-274 757.2608,-267.9056 771.7251,-214.9935 780.0163,-182.7739\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"781.7857,-175.8479 783.105,-183.4098 780.9194,-179.239 780.053,-182.6301 780.053,-182.6301 780.053,-182.6301 780.9194,-179.239 777.001,-181.8504 781.7857,-175.8479 781.7857,-175.8479\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"656.2203\" y=\"-294.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & !c) | (a & b)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>6</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"786.2203\" cy=\"-261\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"786.2203\" y=\"-257.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">6</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->6 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M624.2962,-319.7047C631.9365,-331.1228 642.7581,-343.6829 656.2203,-350 694.0413,-367.7472 715.5803,-373.3549 750.2203,-350 771.2363,-335.8307 779.9874,-307.0902 783.6291,-286.0897\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"784.7159,-279.0209 786.7656,-286.4183 784.184,-282.4803 783.6521,-285.9396 783.6521,-285.9396 783.6521,-285.9396 784.184,-282.4803 780.5387,-285.4609 784.7159,-279.0209 784.7159,-279.0209\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"669.7203\" y=\"-368.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a | (!b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M193.9208,-187.8347C171.3025,-184.0364 138.1153,-177.8289 109.7401,-170 105.5546,-168.8452 101.1986,-167.4911 96.9182,-166.0681\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"90.2894,-163.7938 97.9329,-163.086 93.6,-164.9297 96.9106,-166.0655 96.9106,-166.0655 96.9106,-166.0655 93.6,-164.9297 95.8883,-169.045 90.2894,-163.7938 90.2894,-163.7938\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"124.2401\" y=\"-188.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M247.574,-192.2095C348.6717,-192.8827 701.9066,-194.1863 750.2203,-180 755.656,-178.4039 761.0933,-175.7641 766.0349,-172.857\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"771.9919,-169.09 767.7591,-175.4937 769.0337,-170.9607 766.0756,-172.8313 766.0756,-172.8313 766.0756,-172.8313 769.0337,-170.9607 764.392,-170.169 771.9919,-169.09 771.9919,-169.09\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"495.9802\" y=\"-196.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M243.4685,-177.1955C250.3999,-172.9951 258.1283,-168.5917 265.4802,-165 301.3808,-147.4613 345.0958,-131.7331 371.5813,-122.7849\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"378.2511,-120.552 372.6132,-125.7614 374.9321,-121.6631 371.6132,-122.7743 371.6132,-122.7743 371.6132,-122.7743 374.9321,-121.6631 370.6131,-119.7872 378.2511,-120.552 378.2511,-120.552\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"277.9802\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->6 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>2->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M245.9312,-201.7223C252.2333,-203.7909 259.0329,-205.7315 265.4802,-207 477.3278,-248.6811 544.4216,-173.704 750.2203,-239 755.4042,-240.6447 760.6095,-243.1861 765.3876,-245.9656\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"771.5964,-249.8416 763.9903,-248.8067 768.6274,-247.9882 765.6585,-246.1347 765.6585,-246.1347 765.6585,-246.1347 768.6274,-247.9882 767.3266,-243.4626 771.5964,-249.8416 771.5964,-249.8416\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"494.4802\" y=\"-221.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->1 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>4->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M777.4898,-173.9777C771.0436,-184.65 761.4606,-198.4319 750.2203,-208 714.6526,-238.2765 694.718,-228.5489 656.2203,-255 649.1539,-259.8552 642.0531,-265.7586 635.6517,-271.5556\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"630.455,-276.3747 633.4458,-269.3052 633.0213,-273.9948 635.5877,-271.6149 635.5877,-271.6149 635.5877,-271.6149 633.0213,-273.9948 637.7296,-273.9246 630.455,-276.3747 630.455,-276.3747\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"697.7203\" y=\"-258.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M773.3828,-170.9184C767.5271,-182.1348 771.8063,-194 786.2203,-194 797.7066,-194 802.757,-186.4655 801.3717,-177.7288\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"799.0579,-170.9184 804.2923,-176.533 800.1838,-174.2324 801.3098,-177.5463 801.3098,-177.5463 801.3098,-177.5463 800.1838,-174.2324 798.3272,-178.5597 799.0579,-170.9184 799.0579,-170.9184\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"782.7203\" y=\"-197.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge20\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M410.6368,-104.9896C423.2282,-97.1046 441.8668,-86.4078 459.4802,-80 534.8602,-52.5766 559.2942,-40.688 638.2203,-55 690.53,-64.4855 709.4979,-62.8247 750.2203,-97 762.0624,-106.9381 770.9555,-121.8265 776.9401,-134.4064\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"779.966,-141.1116 774.2154,-136.0268 778.5263,-137.9214 777.0866,-134.7311 777.0866,-134.7311 777.0866,-134.7311 778.5263,-137.9214 779.9578,-133.4354 779.966,-141.1116 779.966,-141.1116\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"606.8503\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->5 -->\n",
|
|
"<g id=\"edge21\" class=\"edge\">\n",
|
|
"<title>5->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M381.4353,-126.4278C373.1736,-138.0566 377.8552,-151 395.4802,-151 409.9382,-151 415.6865,-142.2903 412.725,-132.7411\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"409.5252,-126.4278 415.4996,-131.2475 411.1075,-129.5497 412.6899,-132.6717 412.6899,-132.6717 412.6899,-132.6717 411.1075,-129.5497 409.8801,-134.0958 409.5252,-126.4278 409.5252,-126.4278\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"364.4802\" y=\"-154.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node8\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"611.3503\" cy=\"-106\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"606.8503\" y=\"-109.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"603.3503\" y=\"-94.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M411.5558,-106.7816C424.2078,-100.7972 442.4825,-93.202 459.4802,-90 506.2138,-81.1963 519.6204,-81.8952 566.4802,-90 570.8656,-90.7585 575.39,-91.9051 579.8011,-93.2431\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"586.6035,-95.475 578.9703,-96.2857 583.2779,-94.3838 579.9523,-93.2926 579.9523,-93.2926 579.9523,-93.2926 583.2779,-94.3838 580.9344,-90.2996 586.6035,-95.475 586.6035,-95.475\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"459.4802\" y=\"-93.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->1 -->\n",
|
|
"<g id=\"edge22\" class=\"edge\">\n",
|
|
"<title>6->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M779.4132,-277.8704C773.6013,-289.7921 763.9809,-304.8699 750.2203,-312 716.507,-329.4688 672.1318,-319.6088 642.7196,-309.2998\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"635.9474,-306.8255 643.6033,-306.269 639.2349,-308.0267 642.5223,-309.2278 642.5223,-309.2278 642.5223,-309.2278 639.2349,-308.0267 641.4413,-312.1865 635.9474,-306.8255 635.9474,-306.8255\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"697.7203\" y=\"-324.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->6 -->\n",
|
|
"<g id=\"edge23\" class=\"edge\">\n",
|
|
"<title>6->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M773.3828,-273.9184C767.5271,-285.1348 771.8063,-297 786.2203,-297 797.7066,-297 802.757,-289.4655 801.3717,-280.7288\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"799.0579,-273.9184 804.2923,-279.533 800.1838,-277.2324 801.3098,-280.5463 801.3098,-280.5463 801.3098,-280.5463 800.1838,-277.2324 798.3272,-281.5597 799.0579,-273.9184 799.0579,-273.9184\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"782.7203\" y=\"-300.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->4 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>3->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M637.994,-102.4032C667.1686,-99.7176 714.5459,-99.1183 750.2203,-117 759.1279,-121.4649 766.7933,-129.1826 772.7335,-136.7263\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"776.9316,-142.4043 770.2371,-138.6485 774.8508,-139.59 772.77,-136.7757 772.77,-136.7757 772.77,-136.7757 774.8508,-139.59 775.3028,-134.903 776.9316,-142.4043 776.9316,-142.4043\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"686.2203\" y=\"-120.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M584.3093,-107.9471C578.4336,-108.3312 572.2502,-108.706 566.4802,-109 514.7653,-111.6354 454.1929,-113.4638 420.8035,-114.3622\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"413.7098,-114.55 420.6239,-111.2157 417.2086,-114.4573 420.7073,-114.3646 420.7073,-114.3646 420.7073,-114.3646 417.2086,-114.4573 420.7908,-117.5135 413.7098,-114.55 413.7098,-114.55\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"461.4802\" y=\"-117.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->6 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>3->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M634.478,-120.1327C671.5553,-142.916 741.082,-186.2059 750.2203,-196 761.4615,-208.0477 770.4475,-224.2554 776.6302,-237.4722\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"779.6049,-244.0732 773.857,-238.9855 778.1669,-240.8823 776.7289,-237.6913 776.7289,-237.6913 776.7289,-237.6913 778.1669,-240.8823 779.6008,-236.3971 779.6049,-244.0732 779.6049,-244.0732\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"684.7203\" y=\"-199.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M595.2828,-127.6995C592.2835,-139.7621 597.6394,-150.8701 611.3503,-150.8701 622.2762,-150.8701 627.8965,-143.8164 628.2113,-134.8469\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"627.4178,-127.6995 631.321,-134.3092 627.804,-131.1782 628.1903,-134.6568 628.1903,-134.6568 628.1903,-134.6568 627.804,-131.1782 625.0595,-135.0044 627.4178,-127.6995 627.4178,-127.6995\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"578.3503\" y=\"-154.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3f5bdc5f30> >"
|
|
]
|
|
},
|
|
"execution_count": 22,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(small, acc=\"co-Buchi\", states=7, state_based=True, display_log=True)"
|
|
]
|
|
}
|
|
],
|
|
"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.7"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|