spot/tests/python/satmin.ipynb
Alexandre Duret-Lutz 8959eabad6 simulation: try pulling marks instead of pushing them for sbacc input
Suggested by František Blahoudek.

* spot/twaalgos/simulation.cc: When doing forward simulation with
state-based acceptance as input but transition-based acceptance as
output, pull acceptance marks on incoming edges instead of pushing
them to outgoing edges.
* tests/core/dra2dba.test, tests/core/exclusive-tgba.test,
tests/core/ltlcrossce.test, tests/core/satmin3.test,
tests/core/sim3.test, tests/python/satmin.ipynb: Adjust test cases.
* NEWS: Mention the change.
2019-02-27 10:46:20 +01:00

4596 lines
322 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&#45;&gt;6 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>6&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge19\" class=\"edge\">\n",
"<title>6&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;5 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;6 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>4&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;5 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>4&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;6 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>5&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;6 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;6 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1dc8308cf0> >"
]
},
"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=\"403pt\" height=\"360pt\"\n",
" viewBox=\"0.00 0.00 403.31 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(.9445 .9445) rotate(0) translate(4 377.1482)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-377.1482 423,-377.1482 423,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"188.5\" y=\"-358.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"210.5\" y=\"-358.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"226.5\" y=\"-358.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"186.5\" y=\"-344.9482\" 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=\"-116.1482\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-112.4482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-116.1482C4.178,-116.1482 17.9448,-116.1482 30.9241,-116.1482\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-116.1482 30.9808,-119.2983 34.4807,-116.1483 30.9807,-116.1483 30.9807,-116.1483 30.9807,-116.1483 34.4807,-116.1483 30.9807,-112.9983 37.9807,-116.1482 37.9807,-116.1482\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"169.5\" cy=\"-135.1482\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"169.5\" y=\"-131.4482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M63.0163,-132.9434C68.8835,-144.597 78.4814,-159.2235 92,-166.1482 108.2183,-174.4558 115.8954,-172.4316 133,-166.1482 140.1406,-163.5251 146.8397,-158.8169 152.5007,-153.8491\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"157.7935,-148.8625 154.8586,-155.9554 155.246,-151.2626 152.6985,-153.6627 152.6985,-153.6627 152.6985,-153.6627 155.246,-151.2626 150.5384,-151.37 157.7935,-148.8625 157.7935,-148.8625\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-189.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"104.5\" y=\"-174.9482\" 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=\"401\" cy=\"-214.1482\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"401\" y=\"-210.4482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M57.4837,-134.3255C60.9291,-171.4731 70.8421,-254.0364 92,-271.1482 186.3407,-347.4477 259.2384,-330.6147 365,-271.1482 377.74,-263.985 386.6169,-250.2474 392.3682,-238.0537\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"395.2464,-231.4899 395.3201,-239.1657 393.8408,-234.6953 392.4352,-237.9006 392.4352,-237.9006 392.4352,-237.9006 393.8408,-234.6953 389.5504,-236.6356 395.2464,-231.4899 395.2464,-231.4899\"/>\n",
"<text text-anchor=\"start\" x=\"208\" y=\"-325.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"285.5\" cy=\"-60.1482\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"285.5\" y=\"-56.4482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M71.3978,-106.2244C77.6391,-102.4539 85.0123,-98.31 92,-95.1482 140.6581,-73.1315 153.2823,-65.7031 206,-57.1482 224.0432,-54.2202 244.6777,-55.1214 260.4021,-56.6751\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"267.6941,-57.4763 260.3919,-59.8428 264.215,-57.094 260.736,-56.7117 260.736,-56.7117 260.736,-56.7117 264.215,-57.094 261.0801,-53.5805 267.6941,-57.4763 267.6941,-57.4763\"/>\n",
"<text text-anchor=\"start\" x=\"151\" y=\"-87.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"161.5\" y=\"-72.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M66.0517,-100.9767C72.65,-91.8259 81.9059,-80.3851 92,-72.1482 114.9502,-53.4208 122.2409,-48.2437 151,-41.1482 189.0422,-31.7624 234.3604,-42.5636 261.4848,-51.3015\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"268.3024,-53.5787 260.665,-54.3487 264.9827,-52.4698 261.663,-51.361 261.663,-51.361 261.663,-51.361 264.9827,-52.4698 262.661,-48.3732 268.3024,-53.5787 268.3024,-53.5787\"/>\n",
"<text text-anchor=\"start\" x=\"152.5\" y=\"-44.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M151.5997,-132.1517C132.6215,-128.9747 102.4958,-123.9317 81.1399,-120.3567\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.9844,-119.1588 81.4085,-117.2079 77.4364,-119.7367 80.8883,-120.3146 80.8883,-120.3146 80.8883,-120.3146 77.4364,-119.7367 80.3682,-123.4214 73.9844,-119.1588 73.9844,-119.1588\"/>\n",
"<text text-anchor=\"start\" x=\"94\" y=\"-146.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"104.5\" y=\"-131.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M157.8771,-121.0003C151.3632,-114.2064 142.6226,-106.7691 133,-103.1482 115.6146,-96.6063 94.7819,-100.791 79.1722,-106.0942\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"72.3988,-108.575 77.8885,-103.2097 75.6853,-107.3713 78.9718,-106.1675 78.9718,-106.1675 78.9718,-106.1675 75.6853,-107.3713 80.0552,-109.1254 72.3988,-108.575 72.3988,-108.575\"/>\n",
"<text text-anchor=\"start\" x=\"95.5\" y=\"-106.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M159.9254,-150.6897C157.2303,-161.0569 160.4219,-171.1482 169.5,-171.1482 176.4504,-171.1482 179.9503,-165.2329 179.9995,-157.8073\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"179.0746,-150.6897 183.1004,-157.2254 179.5256,-154.1605 179.9767,-157.6313 179.9767,-157.6313 179.9767,-157.6313 179.5256,-154.1605 176.853,-158.0373 179.0746,-150.6897 179.0746,-150.6897\"/>\n",
"<text text-anchor=\"start\" x=\"151\" y=\"-174.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M187.3972,-131.5679C203.9864,-127.6137 228.7793,-120.0353 247,-107.1482 256.7486,-100.2533 265.4039,-90.2658 272.0265,-81.2691\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"276.076,-75.5425 274.6063,-83.0766 274.0552,-78.4002 272.0344,-81.2579 272.0344,-81.2579 272.0344,-81.2579 274.0552,-78.4002 269.4625,-79.4391 276.076,-75.5425 276.076,-75.5425\"/>\n",
"<text text-anchor=\"start\" x=\"206\" y=\"-143.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"218.5\" y=\"-128.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M385.3545,-223.0973C379.2027,-226.194 371.9569,-229.3389 365,-231.1482 339.5637,-237.7635 332.2674,-234.2588 306,-235.1482 210.0139,-238.3983 166.7356,-265.4682 92,-205.1482 72.5935,-189.485 63.5743,-161.7281 59.4295,-141.3651\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"58.1129,-134.2335 62.4815,-140.5452 58.7484,-137.6753 59.3839,-141.1172 59.3839,-141.1172 59.3839,-141.1172 58.7484,-137.6753 56.2862,-141.6891 58.1129,-134.2335 58.1129,-134.2335\"/>\n",
"<text text-anchor=\"start\" x=\"208\" y=\"-246.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M383.0118,-216.3271C346.6261,-219.8106 262.919,-223.0558 206,-188.1482 194.5356,-181.1173 185.7824,-168.98 179.7256,-158.0932\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"176.4709,-151.8757 182.5081,-156.6164 178.0941,-154.9765 179.7174,-158.0774 179.7174,-158.0774 179.7174,-158.0774 178.0941,-154.9765 176.9266,-159.5383 176.4709,-151.8757 176.4709,-151.8757\"/>\n",
"<text text-anchor=\"start\" x=\"265\" y=\"-219.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M384.5167,-206.6002C365.8289,-198.3105 334.2797,-185.1196 306,-177.1482 262.535,-164.8966 247.9394,-175.8932 206,-159.1482 200.4534,-156.9337 194.8653,-153.8105 189.7862,-150.5473\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"183.6661,-146.3968 191.2276,-147.7188 186.5629,-148.3613 189.4596,-150.3258 189.4596,-150.3258 189.4596,-150.3258 186.5629,-148.3613 187.6915,-152.9329 183.6661,-146.3968 183.6661,-146.3968\"/>\n",
"<text text-anchor=\"start\" x=\"281\" y=\"-195.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"<text text-anchor=\"start\" x=\"277.5\" y=\"-180.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M272.1165,-47.6432C248.3377,-26.9931 196.9028,10.6518 151,-3.1482 120.8977,-12.1981 112.7206,-18.5113 92,-42.1482 79.2595,-56.6819 69.9312,-76.5198 63.9666,-91.9973\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"61.4626,-98.7671 60.9366,-91.109 62.6768,-95.4845 63.891,-92.2018 63.891,-92.2018 63.891,-92.2018 62.6768,-95.4845 66.8454,-93.2946 61.4626,-98.7671 61.4626,-98.7671\"/>\n",
"<text text-anchor=\"start\" x=\"152.5\" y=\"-21.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"161.5\" y=\"-6.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M267.4843,-58.9164C250.2423,-58.638 224.2323,-60.664 206,-73.1482 202.2014,-75.7492 190.6725,-95.9172 181.5769,-112.5559\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"178.1071,-118.9461 178.6792,-111.2913 179.7773,-115.8702 181.4474,-112.7944 181.4474,-112.7944 181.4474,-112.7944 179.7773,-115.8702 184.2157,-114.2976 178.1071,-118.9461 178.1071,-118.9461\"/>\n",
"<text text-anchor=\"start\" x=\"208\" y=\"-91.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"218.5\" y=\"-76.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M301.6894,-68.4582C319.4751,-78.3371 347.7948,-96.3879 365,-119.1482 380.8886,-140.1668 390.4926,-169.0044 395.7363,-189.3784\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"397.4124,-196.2052 392.6841,-190.1582 396.5778,-192.8062 395.7433,-189.4071 395.7433,-189.4071 395.7433,-189.4071 396.5778,-192.8062 398.8024,-188.656 397.4124,-196.2052 397.4124,-196.2052\"/>\n",
"<text text-anchor=\"start\" x=\"324\" y=\"-122.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M275.687,-75.3149C272.7134,-85.8123 275.9844,-96.1482 285.5,-96.1482 292.7854,-96.1482 296.4103,-90.0895 296.3747,-82.5383\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"295.313,-75.3149 299.4476,-81.7823 295.822,-78.7777 296.331,-82.2404 296.331,-82.2404 296.331,-82.2404 295.822,-78.7777 293.2145,-82.6986 295.313,-75.3149 295.313,-75.3149\"/>\n",
"<text text-anchor=\"start\" x=\"267\" y=\"-99.9482\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1dc82fae40> >"
]
},
"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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-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 &amp; 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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; 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&#45;&gt;2 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !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&#45;&gt;5 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;0 -->\n",
"<g id=\"edge19\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;1 -->\n",
"<g id=\"edge20\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge21\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !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&#45;&gt;4 -->\n",
"<g id=\"edge22\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>4&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;1 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>4&#45;&gt;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 &amp; !b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>4&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>4&#45;&gt;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 &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1dc839a480> >"
]
},
"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: &amp; | 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>&amp; | 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\">) &amp; 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\">) &amp; 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&#45;&gt;5 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;5 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;4 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !b &amp; 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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; 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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>4&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>4&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;5 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1dc83222d0> >"
]
},
"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\">) &amp; 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\">) &amp; 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=\"60.5\" cy=\"-32.0026\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"60.5\" y=\"-28.3026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M5.6233,-32.0026C8.678,-32.0026 22.4448,-32.0026 35.4241,-32.0026\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"42.4807,-32.0026 35.4808,-35.1527 38.9807,-32.0027 35.4807,-32.0027 35.4807,-32.0027 35.4807,-32.0027 38.9807,-32.0027 35.4807,-28.8527 42.4807,-32.0026 42.4807,-32.0026\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M58.3291,-50.1553C57.9951,-59.5417 58.7188,-68.0026 60.5,-68.0026 61.8081,-68.0026 62.5458,-63.4396 62.7132,-57.298\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"62.6709,-50.1553 65.8624,-57.1365 62.6917,-53.6553 62.7124,-57.1552 62.7124,-57.1552 62.7124,-57.1552 62.6917,-53.6553 59.5625,-57.1739 62.6709,-50.1553 62.6709,-50.1553\"/>\n",
"<text text-anchor=\"start\" x=\"27.5\" y=\"-86.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"52.5\" y=\"-71.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M57.125,-49.9089C54.875,-71.0026 56,-98.0026 60.5,-98.0026 64.5078,-98.0026 65.8385,-76.5859 64.4922,-56.9992\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"63.875,-49.9089 67.6202,-56.6093 64.1785,-53.3957 64.4821,-56.8825 64.4821,-56.8825 64.4821,-56.8825 64.1785,-53.3957 61.344,-57.1557 63.875,-49.9089 63.875,-49.9089\"/>\n",
"<text text-anchor=\"start\" x=\"40\" y=\"-115.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"<text text-anchor=\"start\" x=\"44.5\" y=\"-101.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"60.5\" y=\"-101.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.3867,-49.5895C51.8164,-79.7917 53.1875,-126.0026 60.5,-126.0026 67.2698,-126.0026 68.9473,-86.3966 65.5327,-56.5533\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"64.6133,-49.5895 68.6525,-56.117 65.0715,-53.0594 65.5296,-56.5293 65.5296,-56.5293 65.5296,-56.5293 65.0715,-53.0594 62.4067,-56.9417 64.6133,-49.5895 64.6133,-49.5895\"/>\n",
"<text text-anchor=\"start\" x=\"29.5\" y=\"-144.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"52.5\" y=\"-129.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"169.5\" cy=\"-32.0026\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"169.5\" y=\"-28.3026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M78.4127,-34.388C84.1764,-35.0496 90.5979,-35.6757 96.5,-36.0026 112.9193,-36.912 117.0807,-36.912 133.5,-36.0026 137.0966,-35.8034 140.8861,-35.4931 144.602,-35.1314\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"151.5873,-34.388 144.96,-38.2611 148.107,-34.7584 144.6266,-35.1288 144.6266,-35.1288 144.6266,-35.1288 148.107,-34.7584 144.2933,-31.9965 151.5873,-34.388 151.5873,-34.388\"/>\n",
"<text text-anchor=\"start\" x=\"96.5\" y=\"-53.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; !c</text>\n",
"<text text-anchor=\"start\" x=\"99\" y=\"-39.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"115\" y=\"-39.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M73.2292,-18.714C79.6063,-13.0119 87.8124,-6.9834 96.5,-4.0026 112.0544,1.3342 117.9456,1.3342 133.5,-4.0026 139.88,-6.1916 146.0002,-10.0243 151.3272,-14.1643\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"156.7708,-18.714 149.3797,-16.6419 154.0853,-16.4695 151.3997,-14.2249 151.3997,-14.2249 151.3997,-14.2249 154.0853,-16.4695 153.4198,-11.808 156.7708,-18.714 156.7708,-18.714\"/>\n",
"<text text-anchor=\"start\" x=\"98\" y=\"-21.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"99\" y=\"-7.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"115\" y=\"-7.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M166.2643,-49.7843C165.7144,-59.3176 166.793,-68.0026 169.5,-68.0026 171.488,-68.0026 172.5977,-63.3187 172.8292,-57.0547\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"172.7357,-49.7843 175.9756,-56.7432 172.7808,-53.2841 172.8258,-56.7838 172.8258,-56.7838 172.8258,-56.7838 172.7808,-53.2841 169.6761,-56.8243 172.7357,-49.7843 172.7357,-49.7843\"/>\n",
"<text text-anchor=\"start\" x=\"164\" y=\"-85.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
"<text text-anchor=\"start\" x=\"153.5\" y=\"-71.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"169.5\" y=\"-71.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M164.4375,-49.5964C161.0625,-70.1276 162.75,-96.0026 169.5,-96.0026 175.4854,-96.0026 177.4902,-75.6579 175.5146,-56.7341\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"174.5625,-49.5964 178.6104,-56.1184 175.0253,-53.0656 175.4881,-56.5349 175.4881,-56.5349 175.4881,-56.5349 175.0253,-53.0656 172.3657,-56.9514 174.5625,-49.5964 174.5625,-49.5964\"/>\n",
"<text text-anchor=\"start\" x=\"94.5\" y=\"-113.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; b &amp; c) | (a &amp; !b &amp; c)</text>\n",
"<text text-anchor=\"start\" x=\"153.5\" y=\"-99.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"169.5\" y=\"-99.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M163.4296,-48.9776C156.455,-78.6793 158.4785,-124.0026 169.5,-124.0026 179.6604,-124.0026 182.1739,-85.4844 177.0403,-56.1959\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"175.5704,-48.9776 180.0539,-55.2082 176.2689,-52.4072 176.9673,-55.8368 176.9673,-55.8368 176.9673,-55.8368 176.2689,-52.4072 173.8806,-56.4654 175.5704,-48.9776 175.5704,-48.9776\"/>\n",
"<text text-anchor=\"start\" x=\"94.5\" y=\"-141.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b &amp; c) | (a &amp; b &amp; c)</text>\n",
"<text text-anchor=\"start\" x=\"153.5\" y=\"-127.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"169.5\" y=\"-127.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 0x7f1dc8330240> >"
]
},
"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": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Pages: 1 -->\n",
"<svg width=\"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\">) &amp; 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\">) &amp; 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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; 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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1dc8330930> >"
]
},
"execution_count": 8,
"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": 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=\"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\">) &amp; 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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 0x7f1dc82bf750> >"
]
},
"execution_count": 9,
"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": 10,
"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>9</td>\n",
" <td>0</td>\n",
" <td>8</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>7</td>\n",
" <td>0</td>\n",
" <td>7</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 9 0 8 0 \n",
"2 155020 7 0 7 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\">) &amp; 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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 0x7f1daa5b8d80> >"
]
},
"execution_count": 10,
"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": 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>2</td>\n",
" <td>3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>348</td>\n",
" <td>15974</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>5</td>\n",
" <td>17</td>\n",
" <td>40</td>\n",
" <td>960</td>\n",
" <td>73187</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>11</td>\n",
" <td>32</td>\n",
" <td>616</td>\n",
" <td>37620</td>\n",
" <td>1</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 5 17 40 960 \n",
"2 2 4 4 11 32 616 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 15974 1 0 0 0 \n",
"1 73187 4 0 1 0 \n",
"2 37620 1 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=\"625pt\" height=\"179pt\"\n",
" viewBox=\"0.00 0.00 625.22 178.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 174.8701)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-174.8701 621.2203,-174.8701 621.2203,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"256.6102\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"281.6102\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"297.6102\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) &amp; Inf(</text>\n",
"<text text-anchor=\"start\" x=\"340.6102\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"356.6102\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"279.6102\" y=\"-142.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=\"-56.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-60.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-45.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-56.8701C4.3751,-56.8701 17.3629,-56.8701 30.7917,-56.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-56.8701 30.8046,-60.0202 34.3045,-56.8701 30.8045,-56.8702 30.8045,-56.8702 30.8045,-56.8702 34.3045,-56.8701 30.8045,-53.7202 37.8045,-56.8701 37.8045,-56.8701\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-82.6914C56.2072,-93.0476 58.9404,-101.7401 64.8701,-101.7401 69.3173,-101.7401 71.9666,-96.8506 72.8178,-90.0368\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-82.6914 75.9779,-89.7953 72.9497,-86.1893 72.8297,-89.6873 72.8297,-89.6873 72.8297,-89.6873 72.9497,-86.1893 69.6816,-89.5793 73.0697,-82.6914 73.0697,-82.6914\"/>\n",
"<text text-anchor=\"start\" x=\"44.3701\" y=\"-105.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"455.6102\" cy=\"-60.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"451.1102\" y=\"-64.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"447.6102\" y=\"-49.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M88.7042,-70.068C130.9674,-91.8815 222.0114,-131.7401 300.7401,-117.8701 345.4656,-109.9905 394.1802,-90.0155 424.7965,-75.9446\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"431.4229,-72.8611 426.4053,-78.6704 428.2496,-74.3378 425.0764,-75.8144 425.0764,-75.8144 425.0764,-75.8144 428.2496,-74.3378 423.7474,-72.9585 431.4229,-72.8611 431.4229,-72.8611\"/>\n",
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-123.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"267.7401\" cy=\"-48.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"263.2401\" y=\"-52.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"259.7401\" y=\"-37.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.7798,-56.9713C122.1558,-56.9384 173.039,-56.44 216.7401,-53.8701 222.2978,-53.5432 228.1859,-53.0774 233.9107,-52.5601\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"241.0376,-51.8839 234.3665,-55.6811 237.5532,-52.2145 234.0689,-52.5452 234.0689,-52.5452 234.0689,-52.5452 237.5532,-52.2145 233.7713,-49.4093 241.0376,-51.8839 241.0376,-51.8839\"/>\n",
"<text text-anchor=\"start\" x=\"144.7401\" y=\"-61.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; c</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"590.3503\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"585.8503\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"<text text-anchor=\"start\" x=\"582.3503\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M85.4599,-38.7629C92.675,-33.389 101.1359,-28.0852 109.7401,-24.8701 162.0203,-5.3343 178.993,-15.5398 234.7401,-12.8701 313.5512,-9.0958 463.6788,-3.7803 545.4802,-14.8701 549.3757,-15.3982 553.4146,-16.1603 557.4012,-17.0482\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"564.4781,-18.7588 556.9339,-20.1759 561.0761,-17.9364 557.674,-17.114 557.674,-17.114 557.674,-17.114 561.0761,-17.9364 558.4142,-14.0522 564.4781,-18.7588 564.4781,-18.7588\"/>\n",
"<text text-anchor=\"start\" x=\"318.7401\" y=\"-13.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a &amp; b) | (b &amp; c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M443.4799,-84.8749C442.1566,-96.0106 446.2,-105.7401 455.6102,-105.7401 462.9619,-105.7401 467.038,-99.8017 467.8385,-91.8937\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"467.7405,-84.8749 470.988,-91.8302 467.7894,-88.3745 467.8383,-91.8742 467.8383,-91.8742 467.8383,-91.8742 467.7894,-88.3745 464.6886,-91.9182 467.7405,-84.8749 467.7405,-84.8749\"/>\n",
"<text text-anchor=\"start\" x=\"420.6102\" y=\"-109.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M482.1946,-56.5884C500.2099,-53.433 524.4707,-48.6869 545.4802,-42.8701 549.6648,-41.7115 554.0201,-40.3552 558.3001,-38.931\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"564.9287,-36.6558 559.3305,-41.9078 561.6183,-37.7921 558.3078,-38.9285 558.3078,-38.9285 558.3078,-38.9285 561.6183,-37.7921 557.2851,-35.9491 564.9287,-36.6558 564.9287,-36.6558\"/>\n",
"<text text-anchor=\"start\" x=\"500.4802\" y=\"-57.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | b | c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M242.073,-40.3838C234.0528,-38.1236 225.1116,-35.9982 216.7401,-34.8701 169.6106,-28.5188 156.0657,-24.1243 109.7401,-34.8701 104.7432,-36.0292 99.6609,-37.8264 94.7994,-39.9051\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3355,-42.8807 93.3769,-37.0921 91.5148,-41.4171 94.6941,-39.9535 94.6941,-39.9535 94.6941,-39.9535 91.5148,-41.4171 96.0114,-42.8149 88.3355,-42.8807 88.3355,-42.8807\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-38.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M294.6573,-50.5894C328.1393,-52.728 385.324,-56.3806 421.7481,-58.7072\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.7429,-59.1539 421.5563,-61.8512 425.25,-58.9308 421.7571,-58.7076 421.7571,-58.7076 421.7571,-58.7076 425.25,-58.9308 421.958,-55.564 428.7429,-59.1539 428.7429,-59.1539\"/>\n",
"<text text-anchor=\"start\" x=\"360.2401\" y=\"-62.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M250.7289,-70.1052C247.2572,-82.3455 252.9276,-93.7401 267.7401,-93.7401 279.6595,-93.7401 285.6593,-86.3619 285.7393,-77.1019\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"284.7513,-70.1052 288.8492,-76.596 285.2407,-73.5708 285.7301,-77.0364 285.7301,-77.0364 285.7301,-77.0364 285.2407,-73.5708 282.6111,-77.4769 284.7513,-70.1052 284.7513,-70.1052\"/>\n",
"<text text-anchor=\"start\" x=\"236.7401\" y=\"-97.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M563.9908,-20.9671C545.6427,-18.0506 520.9027,-16.5358 500.4802,-23.8701 492.9138,-26.5874 485.7133,-31.1938 479.3832,-36.2513\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"473.829,-40.9815 477.1159,-34.0447 476.4936,-38.7122 479.1582,-36.4429 479.1582,-36.4429 479.1582,-36.4429 476.4936,-38.7122 481.2006,-38.8411 473.829,-40.9815 473.829,-40.9815\"/>\n",
"<text text-anchor=\"start\" x=\"517.4802\" y=\"-27.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M578.22,-50.8749C576.8967,-62.0106 580.9401,-71.7401 590.3503,-71.7401 597.702,-71.7401 601.7781,-65.8017 602.5786,-57.8937\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"602.4806,-50.8749 605.7281,-57.8302 602.5295,-54.3745 602.5784,-57.8742 602.5784,-57.8742 602.5784,-57.8742 602.5295,-54.3745 599.4287,-57.9182 602.4806,-50.8749 602.4806,-50.8749\"/>\n",
"<text text-anchor=\"start\" x=\"586.8503\" 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 0x7f1daa56c390> >"
]
},
"execution_count": 11,
"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": 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>5</td>\n",
" <td>5</td>\n",
" <td>19</td>\n",
" <td>40</td>\n",
" <td>2300</td>\n",
" <td>288887</td>\n",
" <td>13</td>\n",
" <td>0</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>18569</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</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>2337</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 2 5 5 19 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 288887 13 0 10 0 \n",
"1 18569 1 0 1 0 \n",
"2 2337 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=\"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\">) &amp; (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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; 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&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; 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&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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 0x7f1daa56c5a0> >"
]
},
"execution_count": 12,
"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": 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>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>1</td>\n",
" <td>4</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>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>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 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 6 1 4 0 \n",
"1 45412 2 0 1 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=\"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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; 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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 0x7f1daa56c7e0> >"
]
},
"execution_count": 13,
"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": 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>1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2747</td>\n",
" <td>173427</td>\n",
" <td>6</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>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>1</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 6 0 1 0 \n",
"1 173427 0 0 1 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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; 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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; b) | (b &amp; c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1daa56c6c0> >"
]
},
"execution_count": 14,
"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": 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>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>3</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 3 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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1daa56cbd0> >"
]
},
"execution_count": 15,
"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": 16,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Pages: 1 -->\n",
"<svg width=\"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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1daa56cde0> >"
]
},
"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>6</td>\n",
" <td>1</td>\n",
" <td>3</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>1</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 6 1 3 0 \n",
"1 173279 0 0 1 0 \n",
"2 173327 0 0 1 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": 17,
"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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; 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&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>4&#45;&gt;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 0x7f1daa56ce70> >"
]
},
"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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1daa56c840> >"
]
},
"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": 18,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: &amp; | 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>&amp; | 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\">) &amp; 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\">) &amp; 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&#45;&gt;5 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;5 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;4 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>5&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" cx=\"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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; 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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>4&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>4&#45;&gt;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&#45;&gt;4 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;5 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1dc83222d0> >"
]
},
"execution_count": 18,
"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": 19,
"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>2</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 2 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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b &amp; !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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b) | (b &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; 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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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&#45;&gt;3 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;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&#45;&gt;0 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; !b) | (a &amp; b)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 &amp; b &amp; !c) | (a &amp; !b &amp; !c)</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1daa56cea0> >"
]
},
"execution_count": 19,
"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": 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>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>0</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 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 0 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=\"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&#45;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&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.1233,-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&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M49.6208,-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 &amp; !b &amp; 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&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !b) | (!b &amp; !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&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; !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&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !b) | (!b &amp; c)</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"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 &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>1&#45;&gt;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 &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;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 &amp; !c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;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&#45;&gt;2 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>3&#45;&gt;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&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;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 0x7f1daa56cf00> >"
]
},
"execution_count": 20,
"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": 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>2</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>23</td>\n",
" <td>56</td>\n",
" <td>1379</td>\n",
" <td>89168</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 7 7 23 56 1379 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 89168 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=\"734pt\" height=\"356pt\"\n",
" viewBox=\"0.00 0.00 734.00 356.45\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.8367 .8367) rotate(0) translate(4 422)\">\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-422 873.2203,-422 873.2203,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"412.1102\" y=\"-403.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"437.1102\" y=\"-403.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"453.1102\" y=\"-403.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"402.1102\" y=\"-389.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[co&#45;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=\"-118\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-121.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-106.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.2229,-118C4.3751,-118 17.3629,-118 30.7917,-118\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-118 30.8046,-121.1501 34.3045,-118 30.8045,-118.0001 30.8045,-118.0001 30.8045,-118.0001 34.3045,-118 30.8045,-114.8501 37.8045,-118 37.8045,-118\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M56.6704,-143.8213C56.2072,-154.1776 58.9404,-162.8701 64.8701,-162.8701 69.3173,-162.8701 71.9666,-157.9805 72.8178,-151.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-143.8213 75.9779,-150.9252 72.9497,-147.3193 72.8297,-150.8172 72.8297,-150.8172 72.8297,-150.8172 72.9497,-147.3193 69.6816,-150.7092 73.0697,-143.8213 73.0697,-143.8213\"/>\n",
"<text text-anchor=\"start\" x=\"29.8701\" y=\"-166.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"655.3503\" cy=\"-329\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"650.8503\" y=\"-332.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"647.3503\" y=\"-317.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M78.9856,-141.1332C86.8048,-152.2041 97.4332,-164.8015 109.7401,-173 279.3795,-286.0086 531.1946,-318.2471 621.5542,-326.4567\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"628.5353,-327.0719 621.2857,-329.5951 625.0488,-326.7646 621.5623,-326.4573 621.5623,-326.4573 621.5623,-326.4573 625.0488,-326.7646 621.8389,-323.3195 628.5353,-327.0719 628.5353,-327.0719\"/>\n",
"<text text-anchor=\"start\" x=\"358.4802\" y=\"-298.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b &amp; !c</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"311.6102\" cy=\"-156\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"307.1102\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"303.6102\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.3385,-112.6483C130.876,-105.8506 207.091,-97.4115 266.7401,-119 274.2998,-121.736 281.4977,-126.3496 287.8275,-131.4079\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"293.382,-136.1374 286.0101,-133.9977 290.7172,-133.8683 288.0523,-131.5993 288.0523,-131.5993 288.0523,-131.5993 290.7172,-133.8683 290.0944,-129.2009 293.382,-136.1374 293.382,-136.1374\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-122.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b &amp; c) | (a &amp; !b &amp; !c)</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"767.7203\" cy=\"-237\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"767.7203\" y=\"-233.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M85.38,-100.3342C125.7783,-67.4162 219.7298,0 311.6102,0 311.6102,0 311.6102,0 655.3503,0 701.9522,0 745.8672,-151.5018 761.6017,-212.245\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"763.3791,-219.1865 758.5911,-213.1867 762.5109,-215.7959 761.6426,-212.4053 761.6426,-212.4053 761.6426,-212.4053 762.5109,-215.7959 764.6942,-211.6239 763.3791,-219.1865 763.3791,-219.1865\"/>\n",
"<text text-anchor=\"start\" x=\"451.9802\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(a &amp; b) | (b &amp; c)</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>5</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"655.3503\" cy=\"-140\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"655.3503\" y=\"-136.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;5 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>0&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M89.6169,-107.475C96.0524,-105.2128 103.0576,-103.1558 109.7401,-102 178.497,-90.1079 196.9746,-100.6902 266.7401,-102 393.4444,-104.3787 425.141,-107.0988 551.4802,-117 577.716,-119.0561 584.8753,-115.923 610.4802,-122 617.8301,-123.7444 625.5579,-126.487 632.4894,-129.3103\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"639.112,-132.1266 631.4376,-132.286 635.8912,-130.7569 632.6703,-129.3872 632.6703,-129.3872 632.6703,-129.3872 635.8912,-130.7569 633.903,-126.4884 639.112,-132.1266 639.112,-132.1266\"/>\n",
"<text text-anchor=\"start\" x=\"360.4802\" y=\"-111.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M678.2746,-314.8586C697.1435,-303.0429 722.1992,-286.8965 731.2203,-279 738.7506,-272.4085 746.1633,-264.2741 752.3206,-256.9249\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"756.7656,-251.4965 754.768,-258.9081 754.5482,-254.2045 752.3308,-256.9125 752.3308,-256.9125 752.3308,-256.9125 754.5482,-254.2045 749.8936,-254.9168 756.7656,-251.4965 756.7656,-251.4965\"/>\n",
"<text text-anchor=\"start\" x=\"700.2203\" y=\"-302.8\" 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=\"851.2203\" cy=\"-331\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"851.2203\" y=\"-327.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M682.5852,-329.2781C720.4658,-329.6649 788.5633,-330.3602 825.576,-330.7381\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"832.9802,-330.8138 825.9484,-333.892 829.4804,-330.778 825.9806,-330.7422 825.9806,-330.7422 825.9806,-330.7422 829.4804,-330.778 826.0128,-327.5924 832.9802,-330.8138 832.9802,-330.8138\"/>\n",
"<text text-anchor=\"start\" x=\"749.2203\" y=\"-333.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; !c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M284.5009,-155.0566C245.4361,-153.2455 171.2472,-148.1125 109.7401,-134 105.5081,-133.029 101.1248,-131.7833 96.8302,-130.4165\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"90.1891,-128.191 97.8273,-127.4285 93.5078,-129.3031 96.8264,-130.4153 96.8264,-130.4153 96.8264,-130.4153 93.5078,-129.3031 95.8254,-133.402 90.1891,-128.191 90.1891,-128.191\"/>\n",
"<text text-anchor=\"start\" x=\"157.2401\" y=\"-157.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M297.4172,-179.0865C295.4534,-190.6001 300.1844,-200.8701 311.6102,-200.8701 320.5366,-200.8701 325.3768,-194.6018 326.1308,-186.3693\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"325.8031,-179.0865 329.2647,-185.9378 325.9605,-182.583 326.1179,-186.0795 326.1179,-186.0795 326.1179,-186.0795 325.9605,-182.583 322.971,-186.2211 325.8031,-179.0865 325.8031,-179.0865\"/>\n",
"<text text-anchor=\"start\" x=\"278.6102\" y=\"-204.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M324.5774,-179.7322C332.4203,-192.2427 343.4242,-207.0202 356.4802,-217 389.7919,-242.4629 403.2619,-243.3142 444.4802,-251 554.1761,-271.4544 688.2717,-251.7331 742.8422,-241.8716\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"750.0037,-240.5508 743.6912,-244.9182 746.5618,-241.1856 743.1198,-241.8205 743.1198,-241.8205 743.1198,-241.8205 746.5618,-241.1856 742.5485,-238.7227 750.0037,-240.5508 750.0037,-240.5508\"/>\n",
"<text text-anchor=\"start\" x=\"585.4802\" y=\"-262.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>2&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M338.5811,-154.5C365.4229,-153.0259 407.7934,-150.7492 444.4802,-149 511.3917,-145.8096 590.2729,-142.5862 629.9066,-141.0039\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"637.2949,-140.7098 630.4257,-144.1358 633.7976,-140.8491 630.3004,-140.9883 630.3004,-140.9883 630.3004,-140.9883 633.7976,-140.8491 630.1751,-137.8408 637.2949,-140.7098 637.2949,-140.7098\"/>\n",
"<text text-anchor=\"start\" x=\"464.9802\" y=\"-152.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>6</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"497.9802\" cy=\"-191\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"497.9802\" y=\"-187.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">6</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;6 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>2&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M338.6379,-159.6281C361.9823,-162.9065 396.5736,-168.1108 426.4802,-174 442.2579,-177.1069 459.8299,-181.275 473.6055,-184.7063\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"480.4336,-186.424 472.8766,-187.771 477.0394,-185.5701 473.6451,-184.7162 473.6451,-184.7162 473.6451,-184.7162 477.0394,-185.5701 474.4137,-181.6614 480.4336,-186.424 480.4336,-186.424\"/>\n",
"<text text-anchor=\"start\" x=\"356.4802\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; !c</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M760.3375,-253.6641C758.6969,-263.625 761.1578,-273 767.7203,-273 772.6422,-273 775.257,-267.7266 775.5646,-260.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"775.1032,-253.6641 778.6931,-260.449 775.3263,-257.1569 775.5495,-260.6498 775.5495,-260.6498 775.5495,-260.6498 775.3263,-257.1569 772.4059,-260.8507 775.1032,-253.6641 775.1032,-253.6641\"/>\n",
"<text text-anchor=\"start\" x=\"764.2203\" y=\"-276.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>4&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M779.6839,-250.4679C793.9873,-266.57 818.0235,-293.6287 834.2439,-311.8888\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"839.0075,-317.2514 832.0036,-314.11 836.6831,-314.6347 834.3586,-312.018 834.3586,-312.018 834.3586,-312.018 836.6831,-314.6347 836.7137,-309.926 839.0075,-317.2514 839.0075,-317.2514\"/>\n",
"<text text-anchor=\"start\" x=\"804.2203\" y=\"-292.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;2 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>5&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M637.4212,-136.6121C616.7846,-132.8991 581.8295,-127.1801 551.4802,-125 504.0469,-121.5927 491.7392,-119.6973 444.4802,-125 404.6219,-129.4723 395.5147,-135.7803 356.4802,-145 352.6749,-145.8988 348.6917,-146.8542 344.7364,-147.812\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"337.6914,-149.527 343.7477,-144.8106 341.0921,-148.6991 344.4928,-147.8712 344.4928,-147.8712 344.4928,-147.8712 341.0921,-148.6991 345.2379,-150.9319 337.6914,-149.527 337.6914,-149.527\"/>\n",
"<text text-anchor=\"start\" x=\"444.4802\" y=\"-128.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;4 -->\n",
"<g id=\"edge19\" class=\"edge\">\n",
"<title>5&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M670.1806,-150.222C685.9035,-161.3102 711.183,-179.8653 731.2203,-198 737.9886,-204.1256 744.9486,-211.3068 750.9521,-217.826\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"755.7448,-223.1088 748.7084,-220.041 753.3931,-220.5166 751.0413,-217.9244 751.0413,-217.9244 751.0413,-217.9244 753.3931,-220.5166 753.3743,-215.8079 755.7448,-223.1088 755.7448,-223.1088\"/>\n",
"<text text-anchor=\"start\" x=\"711.2203\" y=\"-201.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;5 -->\n",
"<g id=\"edge20\" class=\"edge\">\n",
"<title>5&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M645.1989,-155.1666C642.1227,-165.6641 645.5065,-176 655.3503,-176 662.8869,-176 666.6368,-169.9413 666.6,-162.39\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"665.5017,-155.1666 669.6682,-161.6135 666.0278,-158.6269 666.554,-162.0871 666.554,-162.0871 666.554,-162.0871 666.0278,-158.6269 663.4398,-162.5607 665.5017,-155.1666 665.5017,-155.1666\"/>\n",
"<text text-anchor=\"start\" x=\"624.3503\" y=\"-179.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;1 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M834.2024,-337.84C828.267,-340.039 821.5159,-342.3344 815.2203,-344 802.5763,-347.3451 799.2518,-347.8848 786.2203,-349 748.0447,-352.2669 737.6765,-351.0674 700.2203,-343 696.1319,-342.1194 691.8822,-341.0303 687.6995,-339.8515\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"680.7641,-337.8039 688.3696,-336.765 684.1209,-338.795 687.4776,-339.7861 687.4776,-339.7861 687.4776,-339.7861 684.1209,-338.795 686.5857,-342.8071 680.7641,-337.8039 680.7641,-337.8039\"/>\n",
"<text text-anchor=\"start\" x=\"762.2203\" y=\"-353.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M844.1891,-347.6641C842.6266,-357.625 844.9703,-367 851.2203,-367 855.9078,-367 858.3981,-361.7266 858.691,-354.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"858.2516,-347.6641 861.8209,-354.4598 858.4642,-351.1576 858.6768,-354.6511 858.6768,-354.6511 858.6768,-354.6511 858.4642,-351.1576 855.5326,-354.8425 858.2516,-347.6641 858.2516,-347.6641\"/>\n",
"<text text-anchor=\"start\" x=\"847.7203\" y=\"-370.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;2 -->\n",
"<g id=\"edge21\" class=\"edge\">\n",
"<title>6&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M479.9706,-194.1651C452.5034,-198.2439 398.8664,-203.2409 356.4802,-189 349.743,-186.7364 343.1756,-183.0524 337.236,-178.9501\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"331.5226,-174.7456 339.0276,-176.3575 334.3416,-176.8201 337.1606,-178.8946 337.1606,-178.8946 337.1606,-178.8946 334.3416,-176.8201 335.2935,-181.4317 331.5226,-174.7456 331.5226,-174.7456\"/>\n",
"<text text-anchor=\"start\" x=\"358.4802\" y=\"-201.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;4 -->\n",
"<g id=\"edge22\" class=\"edge\">\n",
"<title>6&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M516.0975,-194.0896C563.0293,-202.0931 688.6445,-223.5148 742.565,-232.7101\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"749.6819,-233.9238 742.252,-235.8522 746.2318,-233.3354 742.7816,-232.747 742.7816,-232.747 742.7816,-232.747 746.2318,-233.3354 743.3111,-229.6418 749.6819,-233.9238 749.6819,-233.9238\"/>\n",
"<text text-anchor=\"start\" x=\"650.8503\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;5 -->\n",
"<g id=\"edge23\" class=\"edge\">\n",
"<title>6&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M515.1212,-185.445C543.1161,-176.3725 598.7438,-158.3448 630.8831,-147.9292\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"637.7501,-145.7038 632.0622,-150.8585 634.4206,-146.7829 631.091,-147.8619 631.091,-147.8619 631.091,-147.8619 634.4206,-146.7829 630.1199,-144.8654 637.7501,-145.7038 637.7501,-145.7038\"/>\n",
"<text text-anchor=\"start\" x=\"569.4802\" y=\"-170.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;6 -->\n",
"<g id=\"edge24\" class=\"edge\">\n",
"<title>6&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M484.272,-202.7994C476.6999,-214.3306 481.2693,-227 497.9802,-227 511.5579,-227 517.1202,-218.6362 514.6672,-209.3147\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"511.6884,-202.7994 517.4639,-207.8558 513.1438,-205.9825 514.5991,-209.1656 514.5991,-209.1656 514.5991,-209.1656 513.1438,-205.9825 511.7343,-210.4754 511.6884,-202.7994 511.6884,-202.7994\"/>\n",
"<text text-anchor=\"start\" x=\"466.9802\" y=\"-230.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1daa56c0f0> >"
]
},
"execution_count": 21,
"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.7.2+"
}
},
"nbformat": 4,
"nbformat_minor": 2
}