spot/tests/python/satmin.ipynb
Alexandre Duret-Lutz c766f58d5d sat_minimize: improve logs and document Python bindings
* spot/priv/satcommon.cc, spot/priv/satcommon.hh: Make it possible to
set the log file without setting the environment variable.  Adjust
print_log to take the input state and print it as a new column.
* spot/twaalgos/dtbasat.cc, spot/twaalgos/dtwasat.cc: Adjust all
calls to print_log.  Fix log output for incremental approaches.
Prefer purge_unreachable_states() over stats_reachable().  Do
not call scc_filter() on colored automata.
* spot/twaalgos/dtwasat.hh: Document the new "log" option.
* NEWS: Mention the changes.
* tests/python/satmin.ipynb: New file.
* tests/Makefile.am: Add it.
* doc/org/satmin.org, doc/org/tut.org: Link to it.
* doc/org/satmin.org, bin/man/spot-x.x: Adjust description
of CSV files.
* bench/dtgbasat/gen.py, bench/dtgbasat/tabl.pl,
bench/dtgbasat/tabl1.pl, bench/dtgbasat/tabl2.pl,
bench/dtgbasat/tabl3.pl, bench/dtgbasat/tabl4.pl: Adjust for
the new column.
* spot/misc/satsolver.cc, spot/misc/satsolver.hh (stats): Make it
const.
* python/spot/__init__.py (sat_minimize): Add display_log and
return_log options.
* tests/python/ipnbdoctest.py: Adjust to not compare SAT-minimization
logs as they contain timings.
2018-03-30 18:01:59 +02:00

4819 lines
333 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": [
"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",
"<!-- Title: G 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",
"<title>G</title>\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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9c91bd0> >"
]
},
"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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"423pt\" height=\"320pt\"\n",
" viewBox=\"0.00 0.00 422.50 320.23\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 316.232)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-316.232 418.5,-316.232 418.5,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"186.25\" y=\"-298.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Inf(</text>\n",
"<text text-anchor=\"start\" x=\"208.25\" y=\"-298.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"224.25\" y=\"-298.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"184.25\" y=\"-284.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[Büchi]</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"56\" cy=\"-115.232\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-111.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"</g>\n",
"<!-- I&#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,-115.232C4.178,-115.232 17.9448,-115.232 30.9241,-115.232\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.9807,-115.232 30.9808,-118.3821 34.4807,-115.232 30.9807,-115.2321 30.9807,-115.2321 30.9807,-115.2321 34.4807,-115.232 30.9807,-112.0821 37.9807,-115.232 37.9807,-115.232\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"171.5\" cy=\"-105.232\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"171.5\" y=\"-101.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M71.5228,-105.4963C77.6596,-102.1854 84.9272,-98.9017 92,-97.232 110.1468,-92.9481 131.1543,-95.3682 147.0156,-98.6334\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"153.9124,-100.1721 146.3944,-101.7222 150.4963,-99.4099 147.0803,-98.6478 147.0803,-98.6478 147.0803,-98.6478 150.4963,-99.4099 147.7662,-95.5734 153.9124,-100.1721 153.9124,-100.1721\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-101.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</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.1005,-115.245C89.7384,-115.085 112.9197,-114.4375 133,-112.232 137.4317,-111.7452 142.1212,-111.048 146.6452,-110.2803\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"153.5573,-109.0358 147.2262,-113.3764 150.1127,-109.656 146.668,-110.2763 146.668,-110.2763 146.668,-110.2763 150.1127,-109.656 146.1098,-107.1761 153.5573,-109.0358 153.5573,-109.0358\"/>\n",
"<text text-anchor=\"start\" x=\"94\" y=\"-133.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"104.5\" y=\"-118.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"396\" cy=\"-80.232\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"396\" y=\"-76.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M59.6172,-132.8704C65.7164,-161.0523 78.689,-214.467 92,-228.232 123.5696,-260.8783 147.083,-255.9313 192,-249.232 274.7641,-236.8878 305.3108,-227.5673 360,-164.232 374.8299,-147.0576 384.3257,-122.8563 389.8188,-104.8394\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"391.7979,-98.0223 392.8713,-105.623 390.822,-101.3836 389.8462,-104.7448 389.8462,-104.7448 389.8462,-104.7448 390.822,-101.3836 386.8211,-103.8665 391.7979,-98.0223 391.7979,-98.0223\"/>\n",
"<text text-anchor=\"start\" x=\"213.5\" y=\"-265.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"222.5\" y=\"-250.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"287\" cy=\"-126.232\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"287\" y=\"-122.532\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M58.5062,-133.1241C62.2785,-153.5161 71.3199,-186.5586 92,-206.232 112.0605,-225.3159 123.681,-221.7275 151,-226.232 195.7208,-233.6057 217.4494,-236.7062 251,-206.232 266.9808,-191.7165 276.3016,-168.7481 281.4381,-151.1382\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"283.3905,-143.9594 284.593,-151.5407 282.472,-147.3367 281.5534,-150.714 281.5534,-150.714 281.5534,-150.714 282.472,-147.3367 278.5138,-149.8873 283.3905,-143.9594 283.3905,-143.9594\"/>\n",
"<text text-anchor=\"start\" x=\"153\" y=\"-234.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</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=\"M161.687,-120.3986C158.7134,-130.8961 161.9844,-141.232 171.5,-141.232 178.7854,-141.232 182.4103,-135.1733 182.3747,-127.622\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"181.313,-120.3986 185.4476,-126.8661 181.822,-123.8614 182.331,-127.3242 182.331,-127.3242 182.331,-127.3242 181.822,-123.8614 179.2145,-127.7823 181.313,-120.3986 181.313,-120.3986\"/>\n",
"<text text-anchor=\"start\" x=\"153\" y=\"-145.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</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=\"M186.0663,-115.9503C192.9555,-120.3704 201.5179,-124.9794 210,-127.232 226.8785,-131.7143 246.58,-131.362 261.8291,-129.9419\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"268.9255,-129.1754 262.3043,-133.059 265.4458,-129.5513 261.966,-129.9272 261.966,-129.9272 261.966,-129.9272 265.4458,-129.5513 261.6277,-126.7954 268.9255,-129.1754 268.9255,-129.1754\"/>\n",
"<text text-anchor=\"start\" x=\"213.5\" y=\"-134.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</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=\"M188.183,-97.9037C204.6576,-91.7639 230.3158,-85.1862 251,-93.232 258.5018,-96.1501 265.3905,-101.4423 271.0893,-106.9464\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"275.9717,-111.9988 268.8421,-109.154 273.5395,-109.4819 271.1073,-106.9651 271.1073,-106.9651 271.1073,-106.9651 273.5395,-109.4819 273.3725,-104.7761 275.9717,-111.9988 275.9717,-111.9988\"/>\n",
"<text text-anchor=\"start\" x=\"224\" y=\"-112.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b</text>\n",
"<text text-anchor=\"start\" x=\"222.5\" y=\"-97.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;0 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M385.451,-65.5181C379.0566,-57.9068 370.1766,-49.3636 360,-45.232 298.2244,-20.1519 276.4789,-42.1542 210,-47.232 157.2294,-51.2627 137.119,-35.5686 92,-63.232 80.9148,-70.0286 72.3818,-81.6644 66.4119,-92.2079\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"63.0261,-98.5786 63.5297,-90.919 64.6687,-95.488 66.3113,-92.3974 66.3113,-92.3974 66.3113,-92.3974 64.6687,-95.488 69.0929,-93.8757 63.0261,-98.5786 63.0261,-98.5786\"/>\n",
"<text text-anchor=\"start\" x=\"210\" y=\"-51.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</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=\"M388.2528,-63.772C382.1379,-52.593 372.5477,-38.4057 360,-30.232 303.4869,6.5812 276.7079,2.7174 210,-7.232 155.769,-15.3205 133.8792,-7.8406 92,-43.232 77.4671,-55.5135 68.2099,-75.0963 62.7274,-90.7407\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"60.4686,-97.6111 59.6625,-89.9774 61.5618,-94.2861 62.655,-90.9612 62.655,-90.9612 62.655,-90.9612 61.5618,-94.2861 65.6474,-91.9451 60.4686,-97.6111 60.4686,-97.6111\"/>\n",
"<text text-anchor=\"start\" x=\"212\" y=\"-26.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"222.5\" y=\"-11.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M386.7674,-95.7734C384.1685,-106.1407 387.2461,-116.232 396,-116.232 402.7022,-116.232 406.077,-110.3167 406.1245,-102.8911\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"405.2326,-95.7734 409.2286,-102.3274 405.6678,-99.2463 406.103,-102.7191 406.103,-102.7191 406.103,-102.7191 405.6678,-99.2463 402.9775,-103.1108 405.2326,-95.7734 405.2326,-95.7734\"/>\n",
"<text text-anchor=\"start\" x=\"377.5\" y=\"-120.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>2&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M387.2399,-96.2957C381.02,-105.9588 371.7052,-117.4702 360,-123.232 345.2697,-130.4829 326.7729,-131.1684 312.0841,-130.074\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"304.7901,-129.3648 312.0622,-126.9071 308.2737,-129.7035 311.7573,-130.0423 311.7573,-130.0423 311.7573,-130.0423 308.2737,-129.7035 311.4524,-133.1775 304.7901,-129.3648 304.7901,-129.3648\"/>\n",
"<text text-anchor=\"start\" x=\"324.5\" y=\"-149.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"333.5\" y=\"-134.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>3&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M272.5077,-136.92C266.1562,-141.2193 258.4603,-145.9302 251,-149.232 209.8412,-167.4483 195.5677,-171.5248 151,-165.232 123.979,-161.4167 115.7998,-161.5834 92,-148.232 85.345,-144.4986 78.9198,-139.3116 73.3854,-134.1544\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"68.1724,-129.0622 75.381,-131.7003 70.6761,-131.5079 73.1798,-133.9536 73.1798,-133.9536 73.1798,-133.9536 70.6761,-131.5079 70.9787,-136.207 68.1724,-129.0622 68.1724,-129.0622\"/>\n",
"<text text-anchor=\"start\" x=\"151\" y=\"-186.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"163.5\" y=\"-171.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;0 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>3&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M276.79,-111.292C270.2635,-102.6851 261.1385,-92.2215 251,-85.232 227.9589,-69.3475 219.5414,-68.1998 192,-63.232 146.6951,-55.0601 131.9947,-67.4343 92,-90.232 86.8871,-93.1465 81.5776,-96.5819 76.657,-99.9574\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"70.6763,-104.1573 74.5946,-97.5565 73.5406,-102.1458 76.4049,-100.1343 76.4049,-100.1343 76.4049,-100.1343 73.5406,-102.1458 78.2152,-102.7122 70.6763,-104.1573 70.6763,-104.1573\"/>\n",
"<text text-anchor=\"start\" x=\"153\" y=\"-67.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; b</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=\"M290.5238,-108.3295C294.9228,-91.3357 304.2751,-66.7321 323,-55.232 337.0127,-46.626 344.3071,-50.3175 360,-55.232 365.9499,-57.0953 371.779,-60.3269 376.9551,-63.8601\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"382.6996,-68.0823 375.1937,-66.4748 379.8794,-66.0094 377.0593,-63.9366 377.0593,-63.9366 377.0593,-63.9366 379.8794,-66.0094 378.9248,-61.3984 382.6996,-68.0823 382.6996,-68.0823\"/>\n",
"<text text-anchor=\"start\" x=\"323\" y=\"-74.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"333.5\" y=\"-59.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M301.9849,-116.0037C308.2906,-111.9862 315.8197,-107.5519 323,-104.232 338.7136,-96.9665 357.2538,-90.9001 371.7175,-86.6839\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"378.4601,-84.7656 372.5893,-89.7109 375.0937,-85.7234 371.7273,-86.6812 371.7273,-86.6812 371.7273,-86.6812 375.0937,-85.7234 370.8653,-83.6514 378.4601,-84.7656 378.4601,-84.7656\"/>\n",
"<text text-anchor=\"start\" x=\"324.5\" y=\"-108.032\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9f5fe70> >"
]
},
"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",
"<!-- Title: G 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",
"<title>G</title>\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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9c9fa20> >"
]
},
"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: G 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>G</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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9c9f690> >"
]
},
"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": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HOA: v1\n",
"name: \"& | F G a F b F G c\"\n",
"States: 6\n",
"Start: 5\n",
"AP: 3 \"a\" \"c\" \"b\"\n",
"acc-name: Rabin 2\n",
"Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))\n",
"properties: trans-labels explicit-labels state-acc complete\n",
"properties: deterministic stutter-invariant\n",
"--BODY--\n",
"State: 0 {1 3}\n",
"[0&1] 0\n",
"[!0&1] 1\n",
"[!1] 4\n",
"State: 1 {0 3}\n",
"[1] 1\n",
"[!1] 4\n",
"State: 2 {1 2}\n",
"[1] 2\n",
"[!1] 4\n",
"State: 3 {1 2}\n",
"[0&1&2] 0\n",
"[0&1&!2] 3\n",
"[!0&2 | !1&2] 4\n",
"[!0&!2 | !1&!2] 5\n",
"State: 4 {0 2}\n",
"[1] 2\n",
"[!1] 4\n",
"State: 5 {0 2}\n",
"[1&2] 2\n",
"[0&1&!2] 3\n",
"[!1&2] 4\n",
"[!0&!2 | !1&!2] 5\n",
"--END--\n"
]
}
],
"source": [
"print(large.to_str())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It can be minimized as a 2-state transition-based Rabin:"
]
},
{
"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",
"<!-- Title: G 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",
"<title>G</title>\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=\"74.25\" cy=\"-32.0026\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"74.25\" 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=\"M19.3733,-32.0026C22.428,-32.0026 36.1948,-32.0026 49.1741,-32.0026\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"56.2307,-32.0026 49.2308,-35.1527 52.7307,-32.0027 49.2307,-32.0027 49.2307,-32.0027 49.2307,-32.0027 52.7307,-32.0027 49.2307,-28.8527 56.2307,-32.0026 56.2307,-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=\"M72.0791,-50.1553C71.7451,-59.5417 72.4688,-68.0026 74.25,-68.0026 75.5581,-68.0026 76.2958,-63.4396 76.4632,-57.298\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"76.4209,-50.1553 79.6124,-57.1365 76.4417,-53.6553 76.4624,-57.1552 76.4624,-57.1552 76.4624,-57.1552 76.4417,-53.6553 73.3125,-57.1739 76.4209,-50.1553 76.4209,-50.1553\"/>\n",
"<text text-anchor=\"start\" x=\"41.25\" y=\"-86.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"66.25\" 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=\"M70.875,-49.9089C68.625,-71.0026 69.75,-98.0026 74.25,-98.0026 78.2578,-98.0026 79.5885,-76.5859 78.2422,-56.9992\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"77.625,-49.9089 81.3702,-56.6093 77.9285,-53.3957 78.2321,-56.8825 78.2321,-56.8825 78.2321,-56.8825 77.9285,-53.3957 75.094,-57.1557 77.625,-49.9089 77.625,-49.9089\"/>\n",
"<text text-anchor=\"start\" x=\"53.75\" y=\"-115.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"<text text-anchor=\"start\" x=\"58.25\" y=\"-101.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"74.25\" 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=\"M70.1367,-49.5895C65.5664,-79.7917 66.9375,-126.0026 74.25,-126.0026 81.0198,-126.0026 82.6973,-86.3966 79.2827,-56.5533\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"78.3633,-49.5895 82.4025,-56.117 78.8215,-53.0594 79.2796,-56.5293 79.2796,-56.5293 79.2796,-56.5293 78.8215,-53.0594 76.1567,-56.9417 78.3633,-49.5895 78.3633,-49.5895\"/>\n",
"<text text-anchor=\"start\" x=\"43.25\" y=\"-144.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"66.25\" 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=\"183.25\" cy=\"-32.0026\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"183.25\" 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=\"M92.1627,-34.388C97.9264,-35.0496 104.3479,-35.6757 110.25,-36.0026 126.6693,-36.912 130.8307,-36.912 147.25,-36.0026 150.8466,-35.8034 154.6361,-35.4931 158.352,-35.1314\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"165.3373,-34.388 158.71,-38.2611 161.857,-34.7584 158.3766,-35.1288 158.3766,-35.1288 158.3766,-35.1288 161.857,-34.7584 158.0433,-31.9965 165.3373,-34.388 165.3373,-34.388\"/>\n",
"<text text-anchor=\"start\" x=\"110.25\" y=\"-53.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; !c</text>\n",
"<text text-anchor=\"start\" x=\"112.75\" y=\"-39.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"128.75\" 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=\"M86.9792,-18.714C93.3563,-13.0119 101.5624,-6.9834 110.25,-4.0026 125.8044,1.3342 131.6956,1.3342 147.25,-4.0026 153.63,-6.1916 159.7502,-10.0243 165.0772,-14.1643\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"170.5208,-18.714 163.1297,-16.6419 167.8353,-16.4695 165.1497,-14.2249 165.1497,-14.2249 165.1497,-14.2249 167.8353,-16.4695 167.1698,-11.808 170.5208,-18.714 170.5208,-18.714\"/>\n",
"<text text-anchor=\"start\" x=\"111.75\" y=\"-21.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"112.75\" y=\"-7.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"128.75\" 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=\"M180.0143,-49.7843C179.4644,-59.3176 180.543,-68.0026 183.25,-68.0026 185.238,-68.0026 186.3477,-63.3187 186.5792,-57.0547\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"186.4857,-49.7843 189.7256,-56.7432 186.5308,-53.2841 186.5758,-56.7838 186.5758,-56.7838 186.5758,-56.7838 186.5308,-53.2841 183.4261,-56.8243 186.4857,-49.7843 186.4857,-49.7843\"/>\n",
"<text text-anchor=\"start\" x=\"177.75\" y=\"-85.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</text>\n",
"<text text-anchor=\"start\" x=\"167.25\" y=\"-71.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"183.25\" 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=\"M178.1875,-49.5964C174.8125,-70.1276 176.5,-96.0026 183.25,-96.0026 189.2354,-96.0026 191.2402,-75.6579 189.2646,-56.7341\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"188.3125,-49.5964 192.3604,-56.1184 188.7753,-53.0656 189.2381,-56.5349 189.2381,-56.5349 189.2381,-56.5349 188.7753,-53.0656 186.1157,-56.9514 188.3125,-49.5964 188.3125,-49.5964\"/>\n",
"<text text-anchor=\"start\" x=\"152.25\" y=\"-113.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"<text text-anchor=\"start\" x=\"167.25\" y=\"-99.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"183.25\" 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=\"M177.1796,-48.9776C170.205,-78.6793 172.2285,-124.0026 183.25,-124.0026 193.4104,-124.0026 195.9239,-85.4844 190.7903,-56.1959\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"189.3204,-48.9776 193.8039,-55.2082 190.0189,-52.4072 190.7173,-55.8368 190.7173,-55.8368 190.7173,-55.8368 190.0189,-52.4072 187.6306,-56.4654 189.3204,-48.9776 189.3204,-48.9776\"/>\n",
"<text text-anchor=\"start\" x=\"135.75\" y=\"-141.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; c) | (b &amp; c)</text>\n",
"<text text-anchor=\"start\" x=\"167.25\" y=\"-127.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"183.25\" y=\"-127.8026\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9c9f480> >"
]
},
"execution_count": 8,
"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:"
]
},
{
"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",
"<!-- Title: G 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",
"<title>G</title>\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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9cbc060> >"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(large, state_based=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"But do we really need 2 rabin pairs? Let's ask if we can get an equivalent with only one pair. (Note that reducing the number of pairs might require more state, but the `sat_minimize()` function will never attempt to add state unless explicitely instructed to do so. In this case we are therefore looking for a state-based Rabin-1 automaton with at most 4 states.)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"635pt\" height=\"203pt\"\n",
" viewBox=\"0.00 0.00 635.35 203.30\" 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 199.3021)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-199.3021 631.3503,-199.3021 631.3503,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"261.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"286.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"302.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) &amp; Inf(</text>\n",
"<text text-anchor=\"start\" x=\"345.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"361.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"284.6751\" y=\"-167.1021\" 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=\"-46.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-50.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-35.232\" 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,-46.432C4.3751,-46.432 17.3629,-46.432 30.7917,-46.432\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-46.432 30.8046,-49.5821 34.3045,-46.4321 30.8045,-46.4321 30.8045,-46.4321 30.8045,-46.4321 34.3045,-46.4321 30.8045,-43.2821 37.8045,-46.432 37.8045,-46.432\"/>\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,-72.2533C56.2072,-82.6096 58.9404,-91.3021 64.8701,-91.3021 69.3173,-91.3021 71.9666,-86.4126 72.8178,-79.5987\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-72.2533 75.9779,-79.3572 72.9497,-75.7513 72.8297,-79.2492 72.8297,-79.2492 72.8297,-79.2492 72.9497,-75.7513 69.6816,-79.1412 73.0697,-72.2533 73.0697,-72.2533\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-95.1021\" 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=\"455.6102\" cy=\"-99.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"451.1102\" y=\"-103.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"447.6102\" y=\"-88.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</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.8887,-57.4248C96.319,-60.14 103.2537,-62.9731 109.7401,-65.432 164.5422,-86.2069 176.9005,-97.9747 234.7401,-107.432 276.8476,-114.317 288.0953,-108.7967 330.7401,-107.432 361.3704,-106.4518 396.1622,-104.1225 421.2272,-102.2287\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.3521,-101.6823 421.6135,-105.3584 424.8624,-101.9499 421.3726,-102.2176 421.3726,-102.2176 421.3726,-102.2176 424.8624,-101.9499 421.1317,-99.0768 428.3521,-101.6823 428.3521,-101.6823\"/>\n",
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-114.232\" 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=\"282.7401\" cy=\"-38.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"278.2401\" y=\"-42.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"274.7401\" y=\"-27.232\" 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.7703,-46.354C122.1377,-46.1606 173.0132,-45.5186 216.7401,-43.432 227.0848,-42.9384 238.3257,-42.1726 248.5498,-41.3875\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"255.7875,-40.816 249.0572,-44.5074 252.2984,-41.0916 248.8092,-41.3671 248.8092,-41.3671 248.8092,-41.3671 252.2984,-41.0916 248.5612,-38.2269 255.7875,-40.816 255.7875,-40.816\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-50.232\" 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=\"594.3503\" cy=\"-49.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"589.8503\" y=\"-53.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"<text text-anchor=\"start\" x=\"586.3503\" y=\"-38.232\" 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.552,-28.9341C92.7732,-23.7312 101.2145,-18.5838 109.7401,-15.432 162.1299,3.9358 178.9599,-5.3248 234.7401,-2.432 277.3495,-.2223 288.2394,1.3271 330.7401,-2.432 414.3778,-9.8297 511.2168,-30.1844 560.9959,-41.5304\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"567.9917,-43.1365 560.4643,-44.6403 564.5804,-42.3533 561.1692,-41.5702 561.1692,-41.5702 561.1692,-41.5702 564.5804,-42.3533 561.874,-38.5 567.9917,-43.1365 567.9917,-43.1365\"/>\n",
"<text text-anchor=\"start\" x=\"348.7401\" y=\"-16.232\" 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=\"M443.1123,-123.4368C441.7489,-134.5726 445.9149,-144.3021 455.6102,-144.3021 463.1846,-144.3021 467.3842,-138.3636 468.209,-130.4557\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"468.108,-123.4368 471.3585,-130.3907 468.1584,-126.9365 468.2088,-130.4361 468.2088,-130.4361 468.2088,-130.4361 468.1584,-126.9365 465.0591,-130.4815 468.108,-123.4368 468.108,-123.4368\"/>\n",
"<text text-anchor=\"start\" x=\"452.1102\" y=\"-148.1021\" 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=\"M482.435,-97.8142C501.7341,-95.8876 528.0321,-91.6686 549.4802,-82.432 556.008,-79.6208 562.4861,-75.7037 568.405,-71.5473\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"574.1186,-67.3433 570.3472,-74.0291 571.2995,-69.4175 568.4804,-71.4918 568.4804,-71.4918 568.4804,-71.4918 571.2995,-69.4175 566.6135,-68.9546 574.1186,-67.3433 574.1186,-67.3433\"/>\n",
"<text text-anchor=\"start\" x=\"519.4802\" y=\"-98.232\" 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=\"M256.5826,-31.3963C222.3818,-23.3099 160.8153,-12.5845 109.7401,-24.432 104.7432,-25.5911 99.6609,-27.3883 94.7994,-29.467\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3355,-32.4427 93.3769,-26.6541 91.5148,-30.9791 94.6941,-29.5155 94.6941,-29.5155 94.6941,-29.5155 91.5148,-30.9791 96.0114,-32.3768 88.3355,-32.4427 88.3355,-32.4427\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-28.232\" 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=\"M308.2477,-47.4328C338.7612,-58.2 389.8863,-76.2403 423.1783,-87.9879\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"429.998,-90.3943 422.3486,-91.0355 426.6974,-89.2296 423.3969,-88.065 423.3969,-88.065 423.3969,-88.065 426.6974,-89.2296 424.4451,-85.0945 429.998,-90.3943 429.998,-90.3943\"/>\n",
"<text text-anchor=\"start\" x=\"362.7401\" y=\"-86.232\" 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=\"M265.7289,-59.6672C262.2572,-71.9075 267.9276,-83.3021 282.7401,-83.3021 294.6595,-83.3021 300.6593,-75.9238 300.7393,-66.6638\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"299.7513,-59.6672 303.8492,-66.1579 300.2407,-63.1328 300.7301,-66.5984 300.7301,-66.5984 300.7301,-66.5984 300.2407,-63.1328 297.6111,-67.0389 299.7513,-59.6672 299.7513,-59.6672\"/>\n",
"<text text-anchor=\"start\" x=\"251.7401\" y=\"-87.1021\" 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=\"M309.8484,-39.3889C366.4789,-41.388 497.2514,-46.0044 559.8024,-48.2125\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"567.0828,-48.4695 559.976,-51.3705 563.585,-48.3459 560.0872,-48.2224 560.0872,-48.2224 560.0872,-48.2224 563.585,-48.3459 560.1983,-45.0744 567.0828,-48.4695 567.0828,-48.4695\"/>\n",
"<text text-anchor=\"start\" x=\"437.1102\" y=\"-49.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M567.4284,-49.7358C548.0824,-50.8245 521.768,-54.1265 500.4802,-63.432 493.3338,-66.556 486.3719,-71.1241 480.147,-75.9645\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"474.6534,-80.4527 478.0813,-73.5845 477.3638,-78.2383 480.0743,-76.0239 480.0743,-76.0239 480.0743,-76.0239 477.3638,-78.2383 482.0672,-78.4633 474.6534,-80.4527 474.6534,-80.4527\"/>\n",
"<text text-anchor=\"start\" x=\"500.4802\" y=\"-67.232\" 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=\"M581.8524,-73.4368C580.489,-84.5726 584.655,-94.3021 594.3503,-94.3021 601.9248,-94.3021 606.1244,-88.3636 606.9491,-80.4557\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"606.8482,-73.4368 610.0986,-80.3907 606.8985,-76.9365 606.9489,-80.4361 606.9489,-80.4361 606.9489,-80.4361 606.8985,-76.9365 603.7993,-80.4815 606.8482,-73.4368 606.8482,-73.4368\"/>\n",
"<text text-anchor=\"start\" x=\"561.3503\" y=\"-98.1021\" 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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9cbc720> >"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(large, state_based=True, acc='Rabin 1')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Using the `display_log` option, we can have a hint of what is going on under the hood. Each line in the table shows one call to the SAT solver. The column labeled `target.states` gives the size of the equivalent automaton we ask the SAT-solver to produce, but some of these states may actually be unreachable in the result. The `variables` and `clauses` columns give an indication of the size of the SAT problem. The `enc.*` and `sat.*` columns give the user and system time taken to encode and solve the SAT problem (the unit is \"ticks\", which usually is 1/100 of seconds).\n",
"\n",
"Below we see that the minimization procedure first tried to squeeze the 6-state input into a 3-state automaton, which failed, and then into a 5-state automaton, which was successful. This 5-state automaton was used as input to produce a smaller 4-state automaton.. Essentially this procedure is doing a binary search towards the minimal size. \n",
"\n",
"(In this case it does not matter, but be aware that the number of states displayed in the log table are those of complete automata, while the output of `sat_minimize()` is trimmed by default.)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1428</td>\n",
" <td>73430</td>\n",
" <td>58</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>3960</td>\n",
" <td>336307</td>\n",
" <td>268</td>\n",
" <td>1</td>\n",
" <td>18</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>12</td>\n",
" <td>32</td>\n",
" <td>2008</td>\n",
" <td>116372</td>\n",
" <td>92</td>\n",
" <td>0</td>\n",
" <td>4</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 1428 \n",
"1 6 5 5 16 40 3960 \n",
"2 5 4 4 12 32 2008 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 73430 58 0 1 0 \n",
"1 336307 268 1 18 0 \n",
"2 116372 92 0 4 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"635pt\" height=\"203pt\"\n",
" viewBox=\"0.00 0.00 635.35 203.30\" 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 199.3021)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-199.3021 631.3503,-199.3021 631.3503,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"261.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"286.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"302.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) &amp; Inf(</text>\n",
"<text text-anchor=\"start\" x=\"345.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"361.6751\" y=\"-181.1021\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"284.6751\" y=\"-167.1021\" 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=\"-46.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-50.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-35.232\" 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,-46.432C4.3751,-46.432 17.3629,-46.432 30.7917,-46.432\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-46.432 30.8046,-49.5821 34.3045,-46.4321 30.8045,-46.4321 30.8045,-46.4321 30.8045,-46.4321 34.3045,-46.4321 30.8045,-43.2821 37.8045,-46.432 37.8045,-46.432\"/>\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,-72.2533C56.2072,-82.6096 58.9404,-91.3021 64.8701,-91.3021 69.3173,-91.3021 71.9666,-86.4126 72.8178,-79.5987\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-72.2533 75.9779,-79.3572 72.9497,-75.7513 72.8297,-79.2492 72.8297,-79.2492 72.8297,-79.2492 72.9497,-75.7513 69.6816,-79.1412 73.0697,-72.2533 73.0697,-72.2533\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-95.1021\" 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=\"455.6102\" cy=\"-99.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"451.1102\" y=\"-103.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"447.6102\" y=\"-88.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</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.8887,-57.4248C96.319,-60.14 103.2537,-62.9731 109.7401,-65.432 164.5422,-86.2069 176.9005,-97.9747 234.7401,-107.432 276.8476,-114.317 288.0953,-108.7967 330.7401,-107.432 361.3704,-106.4518 396.1622,-104.1225 421.2272,-102.2287\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.3521,-101.6823 421.6135,-105.3584 424.8624,-101.9499 421.3726,-102.2176 421.3726,-102.2176 421.3726,-102.2176 424.8624,-101.9499 421.1317,-99.0768 428.3521,-101.6823 428.3521,-101.6823\"/>\n",
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-114.232\" 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=\"282.7401\" cy=\"-38.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"278.2401\" y=\"-42.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"274.7401\" y=\"-27.232\" 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.7703,-46.354C122.1377,-46.1606 173.0132,-45.5186 216.7401,-43.432 227.0848,-42.9384 238.3257,-42.1726 248.5498,-41.3875\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"255.7875,-40.816 249.0572,-44.5074 252.2984,-41.0916 248.8092,-41.3671 248.8092,-41.3671 248.8092,-41.3671 252.2984,-41.0916 248.5612,-38.2269 255.7875,-40.816 255.7875,-40.816\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-50.232\" 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=\"594.3503\" cy=\"-49.432\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"589.8503\" y=\"-53.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"<text text-anchor=\"start\" x=\"586.3503\" y=\"-38.232\" 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.552,-28.9341C92.7732,-23.7312 101.2145,-18.5838 109.7401,-15.432 162.1299,3.9358 178.9599,-5.3248 234.7401,-2.432 277.3495,-.2223 288.2394,1.3271 330.7401,-2.432 414.3778,-9.8297 511.2168,-30.1844 560.9959,-41.5304\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"567.9917,-43.1365 560.4643,-44.6403 564.5804,-42.3533 561.1692,-41.5702 561.1692,-41.5702 561.1692,-41.5702 564.5804,-42.3533 561.874,-38.5 567.9917,-43.1365 567.9917,-43.1365\"/>\n",
"<text text-anchor=\"start\" x=\"348.7401\" y=\"-16.232\" 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=\"M443.1123,-123.4368C441.7489,-134.5726 445.9149,-144.3021 455.6102,-144.3021 463.1846,-144.3021 467.3842,-138.3636 468.209,-130.4557\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"468.108,-123.4368 471.3585,-130.3907 468.1584,-126.9365 468.2088,-130.4361 468.2088,-130.4361 468.2088,-130.4361 468.1584,-126.9365 465.0591,-130.4815 468.108,-123.4368 468.108,-123.4368\"/>\n",
"<text text-anchor=\"start\" x=\"452.1102\" y=\"-148.1021\" 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=\"M482.435,-97.8142C501.7341,-95.8876 528.0321,-91.6686 549.4802,-82.432 556.008,-79.6208 562.4861,-75.7037 568.405,-71.5473\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"574.1186,-67.3433 570.3472,-74.0291 571.2995,-69.4175 568.4804,-71.4918 568.4804,-71.4918 568.4804,-71.4918 571.2995,-69.4175 566.6135,-68.9546 574.1186,-67.3433 574.1186,-67.3433\"/>\n",
"<text text-anchor=\"start\" x=\"519.4802\" y=\"-98.232\" 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=\"M256.5826,-31.3963C222.3818,-23.3099 160.8153,-12.5845 109.7401,-24.432 104.7432,-25.5911 99.6609,-27.3883 94.7994,-29.467\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3355,-32.4427 93.3769,-26.6541 91.5148,-30.9791 94.6941,-29.5155 94.6941,-29.5155 94.6941,-29.5155 91.5148,-30.9791 96.0114,-32.3768 88.3355,-32.4427 88.3355,-32.4427\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-28.232\" 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=\"M308.2477,-47.4328C338.7612,-58.2 389.8863,-76.2403 423.1783,-87.9879\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"429.998,-90.3943 422.3486,-91.0355 426.6974,-89.2296 423.3969,-88.065 423.3969,-88.065 423.3969,-88.065 426.6974,-89.2296 424.4451,-85.0945 429.998,-90.3943 429.998,-90.3943\"/>\n",
"<text text-anchor=\"start\" x=\"362.7401\" y=\"-86.232\" 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=\"M265.7289,-59.6672C262.2572,-71.9075 267.9276,-83.3021 282.7401,-83.3021 294.6595,-83.3021 300.6593,-75.9238 300.7393,-66.6638\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"299.7513,-59.6672 303.8492,-66.1579 300.2407,-63.1328 300.7301,-66.5984 300.7301,-66.5984 300.7301,-66.5984 300.2407,-63.1328 297.6111,-67.0389 299.7513,-59.6672 299.7513,-59.6672\"/>\n",
"<text text-anchor=\"start\" x=\"251.7401\" y=\"-87.1021\" 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=\"M309.8484,-39.3889C366.4789,-41.388 497.2514,-46.0044 559.8024,-48.2125\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"567.0828,-48.4695 559.976,-51.3705 563.585,-48.3459 560.0872,-48.2224 560.0872,-48.2224 560.0872,-48.2224 563.585,-48.3459 560.1983,-45.0744 567.0828,-48.4695 567.0828,-48.4695\"/>\n",
"<text text-anchor=\"start\" x=\"437.1102\" y=\"-49.232\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M567.4284,-49.7358C548.0824,-50.8245 521.768,-54.1265 500.4802,-63.432 493.3338,-66.556 486.3719,-71.1241 480.147,-75.9645\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"474.6534,-80.4527 478.0813,-73.5845 477.3638,-78.2383 480.0743,-76.0239 480.0743,-76.0239 480.0743,-76.0239 477.3638,-78.2383 482.0672,-78.4633 474.6534,-80.4527 474.6534,-80.4527\"/>\n",
"<text text-anchor=\"start\" x=\"500.4802\" y=\"-67.232\" 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=\"M581.8524,-73.4368C580.489,-84.5726 584.655,-94.3021 594.3503,-94.3021 601.9248,-94.3021 606.1244,-88.3636 606.9491,-80.4557\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"606.8482,-73.4368 610.0986,-80.3907 606.8985,-76.9365 606.9489,-80.4361 606.9489,-80.4361 606.9489,-80.4361 606.8985,-76.9365 603.7993,-80.4815 606.8482,-73.4368 606.8482,-73.4368\"/>\n",
"<text text-anchor=\"start\" x=\"561.3503\" y=\"-98.1021\" 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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae293780> >"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(large, state_based=True, acc='Rabin 1', display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that we already had a smaller transition-based automaton for this language (in the `small` variable), and that it actually is more efficient to work from that, as seen in problem sizes displayed in the following log."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>483</td>\n",
" <td>24470</td>\n",
" <td>20</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>16</td>\n",
" <td>40</td>\n",
" <td>1335</td>\n",
" <td>111187</td>\n",
" <td>88</td>\n",
" <td>0</td>\n",
" <td>3</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>12</td>\n",
" <td>32</td>\n",
" <td>856</td>\n",
" <td>57332</td>\n",
" <td>46</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 483 \n",
"1 2 5 5 16 40 1335 \n",
"2 2 4 4 12 32 856 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 24470 20 0 0 0 \n",
"1 111187 88 0 3 0 \n",
"2 57332 46 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"607pt\" height=\"215pt\"\n",
" viewBox=\"0.00 0.00 607.22 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",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-210.8701 603.2203,-210.8701 603.2203,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"247.6102\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"272.6102\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"288.6102\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">) &amp; Inf(</text>\n",
"<text text-anchor=\"start\" x=\"331.6102\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
"<text text-anchor=\"start\" x=\"347.6102\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"270.6102\" y=\"-178.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=\"#ff4da0\">❶</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",
"<!-- 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,-112.6914C56.2072,-123.0476 58.9404,-131.7401 64.8701,-131.7401 69.3173,-131.7401 71.9666,-126.8506 72.8178,-120.0368\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-112.6914 75.9779,-119.7953 72.9497,-116.1893 72.8297,-119.6873 72.8297,-119.6873 72.8297,-119.6873 72.9497,-116.1893 69.6816,-119.5793 73.0697,-112.6914 73.0697,-112.6914\"/>\n",
"<text text-anchor=\"start\" x=\"33.8701\" y=\"-135.5401\" 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=\"265.7401\" cy=\"-81.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"261.2401\" y=\"-85.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"257.7401\" y=\"-70.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=\"M89.5126,-75.0359C95.9501,-72.4907 102.9824,-70.175 109.7401,-68.8701 156.4331,-59.8536 169.5838,-62.721 216.7401,-68.8701 222.1402,-69.5742 227.7924,-70.6974 233.2593,-71.996\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"240.0522,-73.7162 232.493,-75.0513 236.6593,-72.857 233.2664,-71.9977 233.2664,-71.9977 233.2664,-71.9977 236.6593,-72.857 234.0397,-68.9441 240.0522,-73.7162 240.0522,-73.7162\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-72.6701\" 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=\"572.3503\" cy=\"-100.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"567.8503\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"564.3503\" y=\"-89.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=\"M88.8196,-99.1319C121.0004,-114.8414 180.4438,-141.1967 234.7401,-150.8701 346.2895,-170.7437 479.5677,-133.0281 539.8707,-112.6701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"546.8566,-110.2785 541.2542,-115.526 543.5453,-111.4121 540.2339,-112.5458 540.2339,-112.5458 540.2339,-112.5458 543.5453,-111.4121 539.2136,-109.5656 546.8566,-110.2785 546.8566,-110.2785\"/>\n",
"<text text-anchor=\"start\" x=\"314.7401\" y=\"-159.6701\" 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=\"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=\"#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.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 &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=\"M238.7857,-83.0722C231.6216,-83.3638 223.8886,-83.6536 216.7401,-83.8701 176.2311,-85.0967 129.6281,-85.9318 98.8462,-86.4033\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.7592,-86.5097 98.7111,-83.2549 95.2589,-86.4571 98.7585,-86.4045 98.7585,-86.4045 98.7585,-86.4045 95.2589,-86.4571 98.8058,-89.5542 91.7592,-86.5097 91.7592,-86.5097\"/>\n",
"<text text-anchor=\"start\" x=\"144.7401\" y=\"-89.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!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=\"M248.7289,-103.1052C245.2572,-115.3455 250.9276,-126.7401 265.7401,-126.7401 277.6595,-126.7401 283.6593,-119.3619 283.7393,-110.1019\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"282.7513,-103.1052 286.8492,-109.596 283.2407,-106.5708 283.7301,-110.0364 283.7301,-110.0364 283.7301,-110.0364 283.2407,-106.5708 280.6111,-110.4769 282.7513,-103.1052 282.7513,-103.1052\"/>\n",
"<text text-anchor=\"start\" x=\"245.2401\" y=\"-130.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!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=\"M292.5337,-84.5923C324.8078,-87.7739 380.6847,-92.9717 428.7401,-95.8701 466.1595,-98.127 509.1298,-99.4571 538.2421,-100.1708\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"545.3331,-100.3392 538.2603,-103.322 541.8341,-100.256 538.3351,-100.1729 538.3351,-100.1729 538.3351,-100.1729 541.8341,-100.256 538.4099,-97.0238 545.3331,-100.3392 545.3331,-100.3392\"/>\n",
"<text text-anchor=\"start\" x=\"438.6102\" 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=\"edge9\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M291.7426,-74.3379C325.7347,-64.4913 385.3081,-47.2346 422.4934,-36.4631\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"429.6177,-34.3993 423.7706,-39.3727 426.2559,-35.3732 422.8941,-36.347 422.8941,-36.347 422.8941,-36.347 426.2559,-35.3732 422.0177,-33.3214 429.6177,-34.3993 429.6177,-34.3993\"/>\n",
"<text text-anchor=\"start\" x=\"344.2401\" y=\"-70.6701\" 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=\"M561.6054,-125.7868C560.7257,-136.5364 564.3073,-145.7401 572.3503,-145.7401 578.5082,-145.7401 582.0509,-140.3451 582.9785,-132.9918\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"583.0952,-125.7868 586.1314,-132.8369 583.0385,-129.2863 582.9818,-132.7859 582.9818,-132.7859 582.9818,-132.7859 583.0385,-129.2863 579.8322,-132.7348 583.0952,-125.7868 583.0952,-125.7868\"/>\n",
"<text text-anchor=\"start\" x=\"568.8503\" y=\"-149.5401\" 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=\"M549.622,-86.4629C530.9966,-74.6565 504.5264,-57.8774 484.4169,-45.1303\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"478.396,-41.3137 485.9947,-42.4009 481.3521,-43.1875 484.3082,-45.0614 484.3082,-45.0614 484.3082,-45.0614 481.3521,-43.1875 482.6218,-47.7219 478.396,-41.3137 478.396,-41.3137\"/>\n",
"<text text-anchor=\"start\" x=\"508.4802\" y=\"-73.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=\"M482.5983,-26.0822C496.8733,-26.8263 514.1519,-29.6636 527.4802,-37.8701 540.0411,-45.604 550.0841,-58.3009 557.4573,-70.2775\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"561.0688,-76.4447 554.8132,-71.996 559.3001,-73.4245 557.5314,-70.4042 557.5314,-70.4042 557.5314,-70.4042 559.3001,-73.4245 560.2497,-68.8124 561.0688,-76.4447 561.0688,-76.4447\"/>\n",
"<text text-anchor=\"start\" x=\"500.4802\" y=\"-41.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M444.8653,-51.7868C443.9856,-62.5364 447.5672,-71.7401 455.6102,-71.7401 461.7681,-71.7401 465.3108,-66.3451 466.2384,-58.9918\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"466.3551,-51.7868 469.3912,-58.8369 466.2984,-55.2863 466.2416,-58.7859 466.2416,-58.7859 466.2416,-58.7859 466.2984,-55.2863 463.0921,-58.7348 466.3551,-51.7868 466.3551,-51.7868\"/>\n",
"<text text-anchor=\"start\" x=\"435.1102\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae293d20> >"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(small, state_based=True, acc='Rabin 1', display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"How did the procedure look for a complete automaton of size 5 when the input had only 2 states? It's because the input uses transition-based acceptance: to estimate an upper bound of the size of the state-based output, the `sat_minimize()` procedure converted its transition-based input to state-based acceptance (using the `spot.sbacc()` function) and counted the number of states in the result.\n",
"\n",
"Such an estimate is not necessarily correct of we request a different acceptance condition. In that case We can actually change the upper-bound using `max_states`. Below we additionally demonstrate the use of the `colored` option, to request all transition to belong to exactly one set, as customary in parity automata."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>18</td>\n",
" <td>40</td>\n",
" <td>3050</td>\n",
" <td>437037</td>\n",
" <td>441</td>\n",
" <td>1</td>\n",
" <td>16</td>\n",
" <td>1</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>488</td>\n",
" <td>28449</td>\n",
" <td>29</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>68</td>\n",
" <td>1285</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" input.states target.states reachable.states edges transitions variables \\\n",
"0 2 5 5 18 40 3050 \n",
"1 2 2 2 6 16 488 \n",
"2 2 1 NaN NaN NaN 68 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 437037 441 1 16 1 \n",
"1 28449 29 0 0 0 \n",
"2 1285 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",
"<!-- Title: G 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",
"<title>G</title>\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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae293cf0> >"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(small, max_states=9, acc='parity min odd 3', colored=True, display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are a couple of ways in which we can influence the search for the minimum automaton. We can disable the binary search with `sat_naive`. In this case, the procedure will try to remove one state at a time. This is not necessary slower than the default binary search, because satisfiable problems are often solved more quickly than unsatisfiable ones."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>19</td>\n",
" <td>48</td>\n",
" <td>3894</td>\n",
" <td>258719</td>\n",
" <td>148</td>\n",
" <td>1</td>\n",
" <td>5</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>15</td>\n",
" <td>40</td>\n",
" <td>2005</td>\n",
" <td>106302</td>\n",
" <td>62</td>\n",
" <td>0</td>\n",
" <td>1</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>676</td>\n",
" <td>24632</td>\n",
" <td>14</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</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>10553</td>\n",
" <td>7</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 6 19 48 3894 \n",
"1 6 5 5 15 40 2005 \n",
"2 5 4 4 11 32 676 \n",
"3 4 3 NaN NaN NaN 363 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 258719 148 1 5 0 \n",
"1 106302 62 0 1 0 \n",
"2 24632 14 0 0 0 \n",
"3 10553 7 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"632pt\" height=\"207pt\"\n",
" viewBox=\"0.00 0.00 631.74 206.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 202.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-202.8701 627.7401,-202.8701 627.7401,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"289.3701\" y=\"-184.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"314.3701\" y=\"-184.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"330.3701\" y=\"-184.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"279.3701\" y=\"-170.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",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"265.7401\" cy=\"-84.8701\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"265.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=\"edge2\" 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 156.4331,-63.8536 169.527,-67.173 216.7401,-72.8701 224.862,-73.8501 233.5804,-75.7125 241.3787,-77.6829\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"248.2383,-79.5006 240.6649,-80.7524 244.855,-78.6041 241.4718,-77.7075 241.4718,-77.7075 241.4718,-77.7075 244.855,-78.6041 242.2787,-74.6626 248.2383,-79.5006 248.2383,-79.5006\"/>\n",
"<text text-anchor=\"start\" x=\"156.7401\" y=\"-76.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=\"605.7401\" cy=\"-100.8701\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"605.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=\"edge3\" 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 334.1181,-158.8955 494.0294,-131.5815 569.7401,-113.8701 573.8023,-112.9198 578.0371,-111.6537 582.1157,-110.284\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"588.774,-107.9182 583.2326,-113.2301 585.476,-109.0901 582.178,-110.2619 582.178,-110.2619 582.178,-110.2619 585.476,-109.0901 581.1233,-107.2937 588.774,-107.9182 588.774,-107.9182\"/>\n",
"<text text-anchor=\"start\" x=\"314.7401\" y=\"-151.6701\" 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=\"476.7401\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"472.2401\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"<text text-anchor=\"start\" x=\"468.7401\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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.78,-74.7667C93.8088,-70.2817 101.8289,-65.8323 109.7401,-62.8701 225.7794,-19.4208 376.1273,-21.0921 442.5838,-24.4941\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"449.8868,-24.8926 442.7256,-27.6564 446.392,-24.7019 442.8972,-24.5111 442.8972,-24.5111 442.8972,-24.5111 446.392,-24.7019 443.0689,-21.3658 449.8868,-24.8926 449.8868,-24.8926\"/>\n",
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-35.6701\" 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=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M247.5985,-86.1603C238.3645,-86.7714 226.9592,-87.4565 216.7401,-87.8701 176.2457,-89.5089 129.6398,-90.2613 98.8532,-90.6008\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.7651,-90.6748 98.7318,-87.4518 95.2649,-90.6382 98.7647,-90.6017 98.7647,-90.6017 98.7647,-90.6017 95.2649,-90.6382 98.7976,-93.7515 91.7651,-90.6748 91.7651,-90.6748\"/>\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=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M251.6952,-96.2979C243.4335,-107.9267 248.1151,-120.8701 265.7401,-120.8701 280.1981,-120.8701 285.9464,-112.1603 282.9849,-102.6112\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"279.785,-96.2979 285.7595,-101.1176 281.3674,-99.4198 282.9497,-102.5417 282.9497,-102.5417 282.9497,-102.5417 281.3674,-99.4198 280.14,-103.9658 279.785,-96.2979 279.785,-96.2979\"/>\n",
"<text text-anchor=\"start\" x=\"234.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=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M283.8841,-86.4388C293.1188,-87.2149 304.5239,-88.1395 314.7401,-88.8701 365.3729,-92.4908 378.0289,-93.5975 428.7401,-95.8701 482.702,-98.2883 545.9737,-99.7424 580.3536,-100.4167\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"587.6417,-100.5564 580.5826,-103.5716 584.1424,-100.4893 580.643,-100.4222 580.643,-100.4222 580.643,-100.4222 584.1424,-100.4893 580.7034,-97.2727 587.6417,-100.5564 587.6417,-100.5564\"/>\n",
"<text text-anchor=\"start\" x=\"428.7401\" y=\"-102.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=\"edge8\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M283.3669,-80.0248C318.6232,-70.3335 398.3226,-48.4256 443.6281,-35.9719\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"450.592,-34.0577 444.6773,-38.9505 447.2171,-34.9854 443.8423,-35.9131 443.8423,-35.9131 443.8423,-35.9131 447.2171,-34.9854 443.0074,-32.8758 450.592,-34.0577 450.592,-34.0577\"/>\n",
"<text text-anchor=\"start\" x=\"331.7401\" y=\"-73.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=\"edge9\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M597.3751,-117.1603C595.358,-127.2592 598.1464,-136.8701 605.7401,-136.8701 611.4354,-136.8701 614.4277,-131.464 614.7169,-124.5004\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"614.1051,-117.1603 617.8257,-123.8745 614.3959,-120.6482 614.6866,-124.1361 614.6866,-124.1361 614.6866,-124.1361 614.3959,-120.6482 611.5475,-124.3978 614.1051,-117.1603 614.1051,-117.1603\"/>\n",
"<text text-anchor=\"start\" x=\"602.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=\"edge10\" class=\"edge\">\n",
"<title>2&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M589.8727,-91.7678C569.1419,-79.8758 532.4309,-58.8167 506.457,-43.9169\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"500.101,-40.2709 507.7404,-41.0217 503.137,-42.0125 506.173,-43.7541 506.173,-43.7541 506.173,-43.7541 503.137,-42.0125 504.6055,-46.4864 500.101,-40.2709 500.101,-40.2709\"/>\n",
"<text text-anchor=\"start\" x=\"550.7401\" y=\"-82.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!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=\"M503.6897,-27.3565C523.4827,-28.9037 550.2129,-33.5877 569.7401,-46.8701 580.9548,-54.4982 589.5825,-66.8921 595.5765,-77.8833\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"598.8011,-84.1461 592.7961,-79.3645 597.1989,-81.0343 595.5967,-77.9226 595.5967,-77.9226 595.5967,-77.9226 597.1989,-81.0343 598.3973,-76.4806 598.8011,-84.1461 598.8011,-84.1461\"/>\n",
"<text text-anchor=\"start\" x=\"542.7401\" y=\"-50.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b | 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=\"M462.5472,-49.9566C460.5833,-61.4702 465.3143,-71.7401 476.7401,-71.7401 485.6665,-71.7401 490.5067,-65.4718 491.2608,-57.2394\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.9331,-49.9566 494.3946,-56.8079 491.0904,-53.4531 491.2478,-56.9495 491.2478,-56.9495 491.2478,-56.9495 491.0904,-53.4531 488.101,-57.0912 490.9331,-49.9566 490.9331,-49.9566\"/>\n",
"<text text-anchor=\"start\" x=\"456.2401\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae293e70> >"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(large, acc='co-Buchi', sat_naive=True, state_based=True, display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Variant for incremental SAT solving\n",
"\n",
"Using `sat_incr=1`, we encode the problem of finding an equivalent automaton with $n$ states, and add 6 additional variables and some additional constraints to the problem:\n",
"\n",
"| variable | implied constraints |\n",
"| :--- | ---: |\n",
"| $v_1$ | transitions to state $(n-1)$ must not be used | \n",
"| $v_2$ | $v_1\\land{}$ transitions to state $(n-2)$ must not be used |\n",
"| ... | |\n",
"| $v_6$ | $v_5\\land{}$ transitions to state $(n-5)$ must not be used |\n",
"\n",
"Now using `assume` directives on variable $v_i$ amounts to testing whether the problem is solved with $n-i$ states, but we do not have to reencode the problem for each test, and the solver can (probably) reuse some of the knowledge it gathered during a previous attempt. We do a binary search on these 6 assumptions, to find some $i$ such that the problem is satisfiable with assumption $v_i$ but not with $v_{i+1}$. If such cast exists, we have found the minimal automaton. If assumption $v_6$ is satisfiable, we re-encode the problem with $n-7$ states and start over. Watch how the number of variables and clauses do not change in the following log.\n",
"\n",
"The number of assumption variables to use in a one encoding can be set with the `sat_incr_steps` argument. Its default value of 6 was chosen empirically by benchmarking different values."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>3899</td>\n",
" <td>258963</td>\n",
" <td>151</td>\n",
" <td>1</td>\n",
" <td>3</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>3899</td>\n",
" <td>258963</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>6</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>11</td>\n",
" <td>32</td>\n",
" <td>3899</td>\n",
" <td>258963</td>\n",
" <td>0</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 6 1 NaN NaN NaN 3899 \n",
"1 6 3 NaN NaN NaN 3899 \n",
"2 6 4 4 11 32 3899 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 258963 151 1 3 0 \n",
"1 258963 0 0 0 0 \n",
"2 258963 0 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"618pt\" height=\"186pt\"\n",
" viewBox=\"0.00 0.00 617.61 185.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 181.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-181.8701 613.6102,-181.8701 613.6102,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"282.3051\" y=\"-163.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"307.3051\" y=\"-163.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"323.3051\" y=\"-163.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"272.3051\" y=\"-149.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=\"-55.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-59.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-44.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,-55.8701C4.3751,-55.8701 17.3629,-55.8701 30.7917,-55.8701\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-55.8701 30.8046,-59.0202 34.3045,-55.8701 30.8045,-55.8702 30.8045,-55.8702 30.8045,-55.8702 34.3045,-55.8701 30.8045,-52.7202 37.8045,-55.8701 37.8045,-55.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,-81.6914C56.2072,-92.0476 58.9404,-100.7401 64.8701,-100.7401 69.3173,-100.7401 71.9666,-95.8506 72.8178,-89.0368\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-81.6914 75.9779,-88.7953 72.9497,-85.1893 72.8297,-88.6873 72.8297,-88.6873 72.8297,-88.6873 72.9497,-85.1893 69.6816,-88.5793 73.0697,-81.6914 73.0697,-81.6914\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-104.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=\"267.7401\" cy=\"-90.8701\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"267.7401\" y=\"-87.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=\"M84.78,-74.6232C92.0735,-80.3168 100.7549,-85.8586 109.7401,-88.8701 154.5293,-103.8816 210.5505,-99.6033 242.429,-95.1936\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"249.6123,-94.1403 243.1434,-98.2726 246.1493,-94.6481 242.6864,-95.1559 242.6864,-95.1559 242.6864,-95.1559 246.1493,-94.6481 242.2293,-92.0392 249.6123,-94.1403 249.6123,-94.1403\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-102.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=\"446.7401\" cy=\"-51.8701\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"446.7401\" y=\"-48.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=\"M91.9183,-54.6444C97.7936,-54.3838 103.975,-54.1138 109.7401,-53.8701 165.2905,-51.521 179.1512,-49.9814 234.7401,-48.8701 264.0676,-48.2837 271.4083,-48.5687 300.7401,-48.8701 342.8618,-49.3028 391.8083,-50.4375 420.9771,-51.1807\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.304,-51.3698 421.2251,-54.3381 424.8052,-51.2795 421.3064,-51.1891 421.3064,-51.1891 421.3064,-51.1891 424.8052,-51.2795 421.3877,-48.0402 428.304,-51.3698 428.304,-51.3698\"/>\n",
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-52.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=\"576.6102\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"572.1102\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"<text text-anchor=\"start\" x=\"568.6102\" 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=\"M90.8266,-48.7718C96.9882,-47.2916 103.5656,-45.877 109.7401,-44.8701 273.9204,-18.0942 316.5337,-20.7649 482.7401,-13.8701 504.4992,-12.9674 510.1785,-10.8095 531.7401,-13.8701 535.7525,-14.4396 539.9081,-15.2821 543.998,-16.2693\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"550.7823,-18.0446 543.2129,-19.3198 547.3963,-17.1585 544.0103,-16.2724 544.0103,-16.2724 544.0103,-16.2724 547.3963,-17.1585 544.8078,-13.225 550.7823,-18.0446 550.7823,-18.0446\"/>\n",
"<text text-anchor=\"start\" x=\"318.7401\" y=\"-23.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=\"M251.6222,-82.7776C241.7903,-78.2132 228.8276,-72.8443 216.7401,-69.8701 177.1082,-60.1183 130.1424,-57.0343 99.043,-56.124\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"91.8812,-55.9446 98.9579,-52.971 95.3801,-56.0323 98.879,-56.12 98.879,-56.12 98.879,-56.12 95.3801,-56.0323 98.8001,-59.269 91.8812,-55.9446 91.8812,-55.9446\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-73.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=\"M253.6952,-102.2979C245.4335,-113.9267 250.1151,-126.8701 267.7401,-126.8701 282.1981,-126.8701 287.9464,-118.1603 284.9849,-108.6112\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"281.785,-102.2979 287.7595,-107.1176 283.3674,-105.4198 284.9497,-108.5417 284.9497,-108.5417 284.9497,-108.5417 283.3674,-105.4198 282.14,-109.9658 281.785,-102.2979 281.785,-102.2979\"/>\n",
"<text text-anchor=\"start\" x=\"236.7401\" y=\"-130.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=\"M285.5577,-86.988C317.724,-79.9797 385.5402,-65.2041 422.1158,-57.2351\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"428.9946,-55.7364 422.8256,-60.3045 425.5748,-56.4815 422.155,-57.2267 422.155,-57.2267 422.155,-57.2267 425.5748,-56.4815 421.4844,-54.1489 428.9946,-55.7364 428.9946,-55.7364\"/>\n",
"<text text-anchor=\"start\" x=\"360.2401\" y=\"-82.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M436.5887,-67.0367C433.5126,-77.5341 436.8964,-87.8701 446.7401,-87.8701 454.2767,-87.8701 458.0266,-81.8113 457.9898,-74.2601\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"456.8915,-67.0367 461.0581,-73.4836 457.4177,-70.4969 457.9439,-73.9571 457.9439,-73.9571 457.9439,-73.9571 457.4177,-70.4969 454.8297,-74.4307 456.8915,-67.0367 456.8915,-67.0367\"/>\n",
"<text text-anchor=\"start\" x=\"443.2401\" y=\"-91.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M464.8523,-51.1952C482.2012,-50.2579 509.0243,-48.0455 531.7401,-42.8701 535.9736,-41.9055 540.3578,-40.6637 544.6528,-39.2989\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"551.2943,-37.0751 545.6567,-42.2847 547.9754,-38.1864 544.6565,-39.2977 544.6565,-39.2977 544.6565,-39.2977 547.9754,-38.1864 543.6563,-36.3107 551.2943,-37.0751 551.2943,-37.0751\"/>\n",
"<text text-anchor=\"start\" x=\"501.7401\" y=\"-53.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!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=\"M549.9656,-21.0808C530.7539,-18.0767 504.4861,-16.4089 482.7401,-23.8701 476.3602,-26.0591 470.2399,-29.8917 464.913,-34.0317\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"459.4693,-38.5815 462.8203,-31.6754 462.1548,-36.3369 464.8404,-34.0924 464.8404,-34.0924 464.8404,-34.0924 462.1548,-36.3369 466.8605,-36.5094 459.4693,-38.5815 459.4693,-38.5815\"/>\n",
"<text text-anchor=\"start\" x=\"482.7401\" y=\"-27.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | !b | 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=\"M564.1123,-50.8749C562.7489,-62.0106 566.9149,-71.7401 576.6102,-71.7401 584.1846,-71.7401 588.3842,-65.8017 589.209,-57.8937\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"589.108,-50.8749 592.3585,-57.8288 589.1584,-54.3745 589.2088,-57.8741 589.2088,-57.8741 589.2088,-57.8741 589.1584,-54.3745 586.0591,-57.9195 589.108,-50.8749 589.108,-50.8749\"/>\n",
"<text text-anchor=\"start\" x=\"543.6102\" 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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae293ed0> >"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(large, acc='co-Buchi', sat_incr=1, state_based=True, display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Another incremental variant consists is the equivalent of forcing $v_1$, $v_2$, ... in order. But to do that we do not need to use any assumption. We just add the constraints that transitions going to state $n-i$ are forbidden. This variant is enabled by option `sat_incr=2`. As in the previous case, we do a few of those incremental steps (2 by default, but that can be changed with the `sat_incr_steps` parameter) and then we reencode the problem to reduce its size.\n",
"\n",
"In the log below, line 0 corresponds to the search of an equivalent automaton with the same size, but the simpler co-Büchi acceptance. It works, and most of the time was spent encoding the problem. Then for the next two lines, the minimization function looks for automata of size 5 and 4 without reencoding the problem but simply adding a few constraints to disable the relevant transitions."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>19</td>\n",
" <td>48</td>\n",
" <td>3894</td>\n",
" <td>258719</td>\n",
" <td>150</td>\n",
" <td>0</td>\n",
" <td>5</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>14</td>\n",
" <td>40</td>\n",
" <td>3894</td>\n",
" <td>258767</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>5</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>10</td>\n",
" <td>32</td>\n",
" <td>3894</td>\n",
" <td>258815</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</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>10325</td>\n",
" <td>6</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 6 6 6 19 48 3894 \n",
"1 6 5 5 14 40 3894 \n",
"2 5 4 4 10 32 3894 \n",
"3 4 3 NaN NaN NaN 363 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 258719 150 0 5 0 \n",
"1 258767 0 0 0 0 \n",
"2 258815 0 0 0 0 \n",
"3 10325 6 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"507pt\" height=\"166pt\"\n",
" viewBox=\"0.00 0.00 507.48 165.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 161.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-161.8701 503.4802,-161.8701 503.4802,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"227.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"252.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"268.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"217.2401\" y=\"-129.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=\"-56\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-44.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,-56C4.3751,-56 17.3629,-56 30.7917,-56\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-56 30.8046,-59.1501 34.3045,-56 30.8045,-56.0001 30.8045,-56.0001 30.8045,-56.0001 34.3045,-56 30.8045,-52.8501 37.8045,-56 37.8045,-56\"/>\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,-81.8213C56.2072,-92.1776 58.9404,-100.8701 64.8701,-100.8701 69.3173,-100.8701 71.9666,-95.9805 72.8178,-89.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-81.8213 75.9779,-88.9252 72.9497,-85.3193 72.8297,-88.8172 72.8297,-88.8172 72.8297,-88.8172 72.9497,-85.3193 69.6816,-88.7092 73.0697,-81.8213 73.0697,-81.8213\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"342.6102\" cy=\"-62\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"338.1102\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"334.6102\" y=\"-50.8\" 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=\"M90.1822,-65.7679C96.4846,-67.8352 103.2865,-69.7637 109.7401,-71 180.0841,-84.476 199.5461,-85.8289 270.7401,-78 283.5923,-76.5867 297.5083,-73.7924 309.641,-70.9291\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"316.5569,-69.2451 310.5009,-73.9618 313.1563,-70.0732 309.7557,-70.9012 309.7557,-70.9012 309.7557,-70.9012 313.1563,-70.0732 309.0104,-67.8406 316.5569,-69.2451 316.5569,-69.2451\"/>\n",
"<text text-anchor=\"start\" x=\"248.2401\" y=\"-84.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"252.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"252.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=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.9514,-54.3245C122.6987,-51.9087 174.1223,-46.303 216.7401,-34 221.1387,-32.7302 225.6983,-31.0306 230.034,-29.2126\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"236.6077,-26.3034 231.4814,-32.0169 233.4071,-27.7199 230.2066,-29.1363 230.2066,-29.1363 230.2066,-29.1363 233.4071,-27.7199 228.9317,-26.2558 236.6077,-26.3034 236.6077,-26.3034\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-55.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=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M333.6893,-87.37C333.074,-97.9238 336.0477,-106.8701 342.6102,-106.8701 347.6346,-106.8701 350.5553,-101.6259 351.3722,-94.4312\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"351.5311,-87.37 354.5228,-94.4391 351.4523,-90.8691 351.3736,-94.3682 351.3736,-94.3682 351.3736,-94.3682 351.4523,-90.8691 348.2243,-94.2974 351.5311,-87.37 351.5311,-87.37\"/>\n",
"<text text-anchor=\"start\" x=\"289.6102\" y=\"-110.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !c) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"481.4802\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"481.4802\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M369.7154,-62C394.752,-62 431.662,-62 456.1253,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"463.2909,-62 456.2909,-65.1501 459.7909,-62 456.2909,-62.0001 456.2909,-62.0001 456.2909,-62.0001 459.7909,-62 456.2908,-58.8501 463.2909,-62 463.2909,-62\"/>\n",
"<text text-anchor=\"start\" x=\"387.4802\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c | (a &amp; b)</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=\"M235.2764,-13.4989C207.5742,-7.2516 152.3357,1.5301 109.7401,-15 101.4398,-18.2211 93.7366,-23.7728 87.1387,-29.7688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.8675,-34.8685 84.7081,-27.7373 84.383,-32.4349 86.8984,-30.0012 86.8984,-30.0012 86.8984,-30.0012 84.383,-32.4349 89.0887,-32.2651 81.8675,-34.8685 81.8675,-34.8685\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-18.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.2237,-26.0703C281.1762,-31.9222 297.6913,-40.0079 312.0282,-47.0272\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"318.438,-50.1654 310.7659,-49.9164 315.2945,-48.6263 312.1511,-47.0873 312.1511,-47.0873 312.1511,-47.0873 315.2945,-48.6263 313.5362,-44.2582 318.438,-50.1654 318.438,-50.1654\"/>\n",
"<text text-anchor=\"start\" x=\"288.7401\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M245.7089,-34.6641C244.1464,-44.625 246.4901,-54 252.7401,-54 257.4276,-54 259.9178,-48.7266 260.2108,-41.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"259.7714,-34.6641 263.3407,-41.4598 259.9839,-38.1576 260.1965,-41.6511 260.1965,-41.6511 260.1965,-41.6511 259.9839,-38.1576 257.0523,-41.8425 259.7714,-34.6641 259.7714,-34.6641\"/>\n",
"<text text-anchor=\"start\" x=\"221.7401\" y=\"-57.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=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M465.9574,-52.2643C459.8206,-48.9534 452.553,-45.6697 445.4802,-44 420.392,-38.0775 412.7904,-39.1126 387.4802,-44 383.0455,-44.8564 378.4925,-46.148 374.0669,-47.6542\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2527,-50.1658 372.7314,-44.7892 370.5368,-48.9553 373.8208,-47.7449 373.8208,-47.7449 373.8208,-47.7449 370.5368,-48.9553 374.9102,-50.7005 367.2527,-50.1658 367.2527,-50.1658\"/>\n",
"<text text-anchor=\"start\" x=\"410.9802\" y=\"-47.8\" 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=\"M470.7722,-76.7917C467.2859,-87.4165 470.8552,-98 481.4802,-98 489.615,-98 493.6139,-91.7961 493.4768,-84.1197\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"492.1882,-76.7917 496.503,-83.1403 492.7944,-80.2388 493.4006,-83.6859 493.4006,-83.6859 493.4006,-83.6859 492.7944,-80.2388 490.2982,-84.2315 492.1882,-76.7917 492.1882,-76.7917\"/>\n",
"<text text-anchor=\"start\" x=\"477.9802\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a120> >"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(large, acc='co-Buchi', sat_incr=2, state_based=True, display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Miscellaneous options\n",
"\n",
"### `return_log`\n",
"\n",
"The `return_log` can be used to obtain the log table as an object. In that case, `sat_minimize()` returns a pair, `(aut,log)` where `aut` can be `None` if the minimization failed. Also, the `log` table contains an extra column that is hidden by `display_log`: it contains the corresponding automaton in HOA format."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"507pt\" height=\"166pt\"\n",
" viewBox=\"0.00 0.00 507.48 165.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 161.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-161.8701 503.4802,-161.8701 503.4802,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"227.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"252.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"268.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"217.2401\" y=\"-129.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=\"-56\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-44.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,-56C4.3751,-56 17.3629,-56 30.7917,-56\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-56 30.8046,-59.1501 34.3045,-56 30.8045,-56.0001 30.8045,-56.0001 30.8045,-56.0001 34.3045,-56 30.8045,-52.8501 37.8045,-56 37.8045,-56\"/>\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,-81.8213C56.2072,-92.1776 58.9404,-100.8701 64.8701,-100.8701 69.3173,-100.8701 71.9666,-95.9805 72.8178,-89.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-81.8213 75.9779,-88.9252 72.9497,-85.3193 72.8297,-88.8172 72.8297,-88.8172 72.8297,-88.8172 72.9497,-85.3193 69.6816,-88.7092 73.0697,-81.8213 73.0697,-81.8213\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"342.6102\" cy=\"-62\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"338.1102\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"334.6102\" y=\"-50.8\" 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=\"M90.1822,-65.7679C96.4846,-67.8352 103.2865,-69.7637 109.7401,-71 180.0841,-84.476 199.5461,-85.8289 270.7401,-78 283.5923,-76.5867 297.5083,-73.7924 309.641,-70.9291\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"316.5569,-69.2451 310.5009,-73.9618 313.1563,-70.0732 309.7557,-70.9012 309.7557,-70.9012 309.7557,-70.9012 313.1563,-70.0732 309.0104,-67.8406 316.5569,-69.2451 316.5569,-69.2451\"/>\n",
"<text text-anchor=\"start\" x=\"248.2401\" y=\"-84.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"252.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"252.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=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.9514,-54.3245C122.6987,-51.9087 174.1223,-46.303 216.7401,-34 221.1387,-32.7302 225.6983,-31.0306 230.034,-29.2126\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"236.6077,-26.3034 231.4814,-32.0169 233.4071,-27.7199 230.2066,-29.1363 230.2066,-29.1363 230.2066,-29.1363 233.4071,-27.7199 228.9317,-26.2558 236.6077,-26.3034 236.6077,-26.3034\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-55.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=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M333.6893,-87.37C333.074,-97.9238 336.0477,-106.8701 342.6102,-106.8701 347.6346,-106.8701 350.5553,-101.6259 351.3722,-94.4312\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"351.5311,-87.37 354.5228,-94.4391 351.4523,-90.8691 351.3736,-94.3682 351.3736,-94.3682 351.3736,-94.3682 351.4523,-90.8691 348.2243,-94.2974 351.5311,-87.37 351.5311,-87.37\"/>\n",
"<text text-anchor=\"start\" x=\"289.6102\" y=\"-110.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !c) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"481.4802\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"481.4802\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M369.7154,-62C394.752,-62 431.662,-62 456.1253,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"463.2909,-62 456.2909,-65.1501 459.7909,-62 456.2909,-62.0001 456.2909,-62.0001 456.2909,-62.0001 459.7909,-62 456.2908,-58.8501 463.2909,-62 463.2909,-62\"/>\n",
"<text text-anchor=\"start\" x=\"387.4802\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c | (a &amp; b)</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=\"M235.2764,-13.4989C207.5742,-7.2516 152.3357,1.5301 109.7401,-15 101.4398,-18.2211 93.7366,-23.7728 87.1387,-29.7688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.8675,-34.8685 84.7081,-27.7373 84.383,-32.4349 86.8984,-30.0012 86.8984,-30.0012 86.8984,-30.0012 84.383,-32.4349 89.0887,-32.2651 81.8675,-34.8685 81.8675,-34.8685\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-18.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.2237,-26.0703C281.1762,-31.9222 297.6913,-40.0079 312.0282,-47.0272\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"318.438,-50.1654 310.7659,-49.9164 315.2945,-48.6263 312.1511,-47.0873 312.1511,-47.0873 312.1511,-47.0873 315.2945,-48.6263 313.5362,-44.2582 318.438,-50.1654 318.438,-50.1654\"/>\n",
"<text text-anchor=\"start\" x=\"288.7401\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M245.7089,-34.6641C244.1464,-44.625 246.4901,-54 252.7401,-54 257.4276,-54 259.9178,-48.7266 260.2108,-41.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"259.7714,-34.6641 263.3407,-41.4598 259.9839,-38.1576 260.1965,-41.6511 260.1965,-41.6511 260.1965,-41.6511 259.9839,-38.1576 257.0523,-41.8425 259.7714,-34.6641 259.7714,-34.6641\"/>\n",
"<text text-anchor=\"start\" x=\"221.7401\" y=\"-57.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=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M465.9574,-52.2643C459.8206,-48.9534 452.553,-45.6697 445.4802,-44 420.392,-38.0775 412.7904,-39.1126 387.4802,-44 383.0455,-44.8564 378.4925,-46.148 374.0669,-47.6542\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2527,-50.1658 372.7314,-44.7892 370.5368,-48.9553 373.8208,-47.7449 373.8208,-47.7449 373.8208,-47.7449 370.5368,-48.9553 374.9102,-50.7005 367.2527,-50.1658 367.2527,-50.1658\"/>\n",
"<text text-anchor=\"start\" x=\"410.9802\" y=\"-47.8\" 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=\"M470.7722,-76.7917C467.2859,-87.4165 470.8552,-98 481.4802,-98 489.615,-98 493.6139,-91.7961 493.4768,-84.1197\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"492.1882,-76.7917 496.503,-83.1403 492.7944,-80.2388 493.4006,-83.6859 493.4006,-83.6859 493.4006,-83.6859 492.7944,-80.2388 490.2982,-84.2315 492.1882,-76.7917 492.1882,-76.7917\"/>\n",
"<text text-anchor=\"start\" x=\"477.9802\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae293b40> >"
]
},
"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>6</td>\n",
" <td>19</td>\n",
" <td>48</td>\n",
" <td>3894</td>\n",
" <td>258719</td>\n",
" <td>150</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>HOA: v1 States: 6 Start: 0 AP: 3 \"a\" \"c\" \"b\" a...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>6</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>14</td>\n",
" <td>40</td>\n",
" <td>3894</td>\n",
" <td>258767</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</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>2</th>\n",
" <td>5</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>10</td>\n",
" <td>32</td>\n",
" <td>3894</td>\n",
" <td>258815</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</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>3</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>10325</td>\n",
" <td>7</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" input.states target.states reachable.states edges transitions variables \\\n",
"0 6 6 6 19 48 3894 \n",
"1 6 5 5 14 40 3894 \n",
"2 5 4 4 10 32 3894 \n",
"3 4 3 NaN NaN NaN 363 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \\\n",
"0 258719 150 2 5 0 \n",
"1 258767 0 0 1 0 \n",
"2 258815 0 0 0 0 \n",
"3 10325 7 0 0 0 \n",
"\n",
" automaton \n",
"0 HOA: v1 States: 6 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
"1 HOA: v1 States: 5 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
"2 HOA: v1 States: 4 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
"3 NaN "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"aut, log = spot.sat_minimize(large, acc='co-Buchi', sat_incr=2, state_based=True, return_log=True)\n",
"display(aut)\n",
"display(log)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here is how we can extract the automata from that log:"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"automaton from line 0:\n"
]
},
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"734pt\" height=\"170pt\"\n",
" viewBox=\"0.00 0.00 734.00 170.09\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.7458 .7458) rotate(0) translate(4 224.0799)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-224.0799 980.2203,-224.0799 980.2203,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"465.6102\" y=\"-205.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"490.6102\" y=\"-205.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"506.6102\" y=\"-205.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"455.6102\" y=\"-191.8799\" 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=\"-108.0799\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-111.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-96.8799\" 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,-108.0799C4.3751,-108.0799 17.3629,-108.0799 30.7917,-108.0799\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-108.0799 30.8046,-111.23 34.3045,-108.0799 30.8045,-108.08 30.8045,-108.08 30.8045,-108.08 34.3045,-108.0799 30.8045,-104.93 37.8045,-108.0799 37.8045,-108.0799\"/>\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,-133.9012C56.2072,-144.2574 58.9404,-152.9499 64.8701,-152.9499 69.3173,-152.9499 71.9666,-148.0604 72.8178,-141.2466\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-133.9012 75.9779,-141.0051 72.9497,-137.3991 72.8297,-140.897 72.8297,-140.897 72.8297,-140.897 72.9497,-137.3991 69.6816,-140.789 73.0697,-133.9012 73.0697,-133.9012\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-156.7499\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"611.3503\" cy=\"-119.0799\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"606.8503\" y=\"-122.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"603.3503\" y=\"-107.8799\" 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=\"M90.7033,-116.2215C116.4896,-123.8882 157.4014,-134.8135 193.7401,-139.0799 274.8394,-148.6015 229.3677,-171.5459 566.4802,-129.0799 570.2415,-128.606 574.1518,-127.9638 578.0262,-127.2319\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"584.9217,-125.8347 578.6867,-130.3122 581.4914,-126.5298 578.0611,-127.2249 578.0611,-127.2249 578.0611,-127.2249 581.4914,-126.5298 577.4355,-124.1377 584.9217,-125.8347 584.9217,-125.8347\"/>\n",
"<text text-anchor=\"start\" x=\"314.4802\" y=\"-156.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"220.6102\" cy=\"-70.0799\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"216.1102\" y=\"-73.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"<text text-anchor=\"start\" x=\"212.6102\" y=\"-58.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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=\"M91.5594,-103.9146C114.1777,-100.1162 147.365,-93.9087 175.7401,-86.0799 179.9257,-84.925 184.2816,-83.571 188.562,-82.1479\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"195.1908,-79.8737 189.5919,-85.1249 191.8802,-81.0095 188.5696,-82.1454 188.5696,-82.1454 188.5696,-82.1454 191.8802,-81.0095 187.5474,-79.1658 195.1908,-79.8737 195.1908,-79.8737\"/>\n",
"<text text-anchor=\"start\" x=\"111.7401\" y=\"-103.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"958.2203\" cy=\"-133.0799\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"958.2203\" y=\"-129.3799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M638.28,-120.1668C703.4406,-122.7967 868.9268,-129.4759 932.6581,-132.0481\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"939.9122,-132.3409 932.7909,-135.206 936.4151,-132.1997 932.9179,-132.0585 932.9179,-132.0585 932.9179,-132.0585 936.4151,-132.1997 933.045,-128.9111 939.9122,-132.3409 939.9122,-132.3409\"/>\n",
"<text text-anchor=\"start\" x=\"780.2203\" y=\"-131.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c | (a &amp; b)</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>5</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"809.2203\" cy=\"-46.0799\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"809.2203\" y=\"-42.3799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">5</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M625.1311,-95.9619C632.865,-85.0831 643.5181,-73.0048 656.2203,-66.0799 696.7212,-43.9999 751.9608,-42.5748 783.7872,-44.0079\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"790.9706,-44.3985 783.8098,-47.1637 787.4757,-44.2084 783.9809,-44.0183 783.9809,-44.0183 783.9809,-44.0183 787.4757,-44.2084 784.152,-40.873 790.9706,-44.3985 790.9706,-44.3985\"/>\n",
"<text text-anchor=\"start\" x=\"656.2203\" y=\"-69.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !c) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M194.0931,-63.7541C170.9956,-59.5342 137.0256,-56.4912 109.7401,-67.0799 101.4398,-70.301 93.7366,-75.8526 87.1387,-81.8486\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.8675,-86.9484 84.7081,-79.8172 84.383,-84.5147 86.8984,-82.0811 86.8984,-82.0811 86.8984,-82.0811 84.383,-84.5147 89.0887,-84.345 81.8675,-86.9484 81.8675,-86.9484\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-70.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; c</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;2 -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>4&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M246.0041,-78.9788C252.3039,-80.9149 259.0843,-82.7724 265.4802,-84.0799 377.9856,-107.0786 514.3103,-115.2243 576.9019,-117.8911\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"584.163,-118.1898 577.0394,-121.0493 580.6659,-118.0459 577.1689,-117.902 577.1689,-117.902 577.1689,-117.902 580.6659,-118.0459 577.2984,-114.7547 584.163,-118.1898 584.163,-118.1898\"/>\n",
"<text text-anchor=\"start\" x=\"390.4802\" y=\"-115.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; b) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge16\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M206.7811,-93.1664C204.8677,-104.68 209.4774,-114.9499 220.6102,-114.9499 229.3077,-114.9499 234.0238,-108.6816 234.7585,-100.4492\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"234.4392,-93.1664 237.8929,-100.0217 234.5926,-96.663 234.7459,-100.1597 234.7459,-100.1597 234.7459,-100.1597 234.5926,-96.663 231.5989,-100.2977 234.4392,-93.1664 234.4392,-93.1664\"/>\n",
"<text text-anchor=\"start\" x=\"200.1102\" y=\"-118.7499\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;5 -->\n",
"<g id=\"edge17\" class=\"edge\">\n",
"<title>4&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M233.3738,-46.2092C241.0256,-34.4105 251.9138,-21.2046 265.4802,-14.0799 314.7928,11.8179 334.8168,-7.0811 390.4802,-5.0799 556.202,.8784 598.334,-11.7726 762.2203,-37.0799 769.4868,-38.2019 777.3462,-39.6238 784.5201,-41.0041\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"791.4182,-42.3578 783.9426,-44.1007 787.9837,-41.6838 784.5492,-41.0097 784.5492,-41.0097 784.5492,-41.0097 787.9837,-41.6838 785.1559,-37.9187 791.4182,-42.3578 791.4182,-42.3578\"/>\n",
"<text text-anchor=\"start\" x=\"508.4802\" y=\"-12.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; 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=\"440.4802\" cy=\"-32.0799\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"440.4802\" y=\"-28.3799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>4&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M237.6076,-48.9484C245.2098,-41.1442 254.8558,-33.2029 265.4802,-29.0799 315.9939,-9.477 381.0436,-18.6384 415.871,-26.0035\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"422.828,-27.5369 415.314,-29.1063 419.41,-26.7835 415.992,-26.0301 415.992,-26.0301 415.992,-26.0301 419.41,-26.7835 416.6701,-22.9539 422.828,-27.5369 422.828,-27.5369\"/>\n",
"<text text-anchor=\"start\" x=\"287.9802\" y=\"-32.8799\" 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=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M941.7066,-140.745C935.6979,-143.1986 928.7717,-145.648 922.2203,-147.0799 806.7244,-172.3222 769.1938,-181.9151 656.2203,-147.0799 650.4182,-145.2908 644.6197,-142.5578 639.2101,-139.4879\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"633.0615,-135.7657 640.6811,-136.6961 636.0556,-137.5783 639.0498,-139.3908 639.0498,-139.3908 639.0498,-139.3908 636.0556,-137.5783 637.4185,-142.0855 633.0615,-135.7657 633.0615,-135.7657\"/>\n",
"<text text-anchor=\"start\" x=\"803.7203\" y=\"-172.8799\" 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=\"M946.9769,-147.4965C943.0507,-158.2459 946.7985,-169.0799 958.2203,-169.0799 967.1437,-169.0799 971.3831,-162.4673 970.9387,-154.4486\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"969.4638,-147.4965 973.998,-153.6903 970.1902,-150.9203 970.9166,-154.3441 970.9166,-154.3441 970.9166,-154.3441 970.1902,-150.9203 967.8352,-154.9979 969.4638,-147.4965 969.4638,-147.4965\"/>\n",
"<text text-anchor=\"start\" x=\"954.7203\" y=\"-172.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;2 -->\n",
"<g id=\"edge19\" class=\"edge\">\n",
"<title>5&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M795.8264,-58.5046C786.9254,-66.1105 774.6297,-75.4355 762.2203,-81.0799 718.339,-101.0392 702.705,-91.3077 656.2203,-104.0799 652.1613,-105.1951 647.9291,-106.465 643.7558,-107.783\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"636.829,-110.0274 642.5171,-104.873 640.1586,-108.9485 643.4882,-107.8696 643.4882,-107.8696 643.4882,-107.8696 640.1586,-108.9485 644.4592,-110.8662 636.829,-110.0274 636.829,-110.0274\"/>\n",
"<text text-anchor=\"start\" x=\"657.7203\" y=\"-107.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !c) | (b &amp; !c)</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;1 -->\n",
"<g id=\"edge18\" class=\"edge\">\n",
"<title>5&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M825.8942,-53.3374C848.4697,-63.4506 889.6756,-82.9355 922.2203,-104.0799 927.9534,-107.8047 933.8573,-112.2617 939.1835,-116.5512\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"944.7009,-121.0975 937.2954,-119.077 941.9997,-118.8718 939.2986,-116.646 939.2986,-116.646 939.2986,-116.646 941.9997,-118.8718 941.3017,-114.215 944.7009,-121.0975 944.7009,-121.0975\"/>\n",
"<text text-anchor=\"start\" x=\"856.2203\" y=\"-107.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; !b &amp; !c</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=\"M796.5092,-59.3724C791.077,-70.4768 795.3141,-82.0799 809.2203,-82.0799 820.3019,-82.0799 825.2434,-74.7118 824.0449,-66.0994\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"821.9315,-59.3724 827.0348,-65.1064 822.9806,-62.7115 824.0296,-66.0506 824.0296,-66.0506 824.0296,-66.0506 822.9806,-62.7115 821.0244,-66.9947 821.9315,-59.3724 821.9315,-59.3724\"/>\n",
"<text text-anchor=\"start\" x=\"805.7203\" y=\"-85.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</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=\"M457.1579,-38.8595C481.6335,-49.0082 528.4942,-69.2001 566.4802,-90.0799 571.8551,-93.0342 577.447,-96.3973 582.7852,-99.7607\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"588.907,-103.6848 581.3139,-102.5591 585.9604,-101.796 583.0138,-99.9072 583.0138,-99.9072 583.0138,-99.9072 585.9604,-101.796 584.7137,-97.2552 588.907,-103.6848 588.907,-103.6848\"/>\n",
"<text text-anchor=\"start\" x=\"518.9802\" y=\"-93.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M422.9585,-36.6469C409.2785,-40.1045 389.7576,-44.8023 372.4802,-48.0799 332.1338,-55.7337 285.314,-62.1465 254.4438,-66.038\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"247.3384,-66.9246 253.8944,-62.932 250.8114,-66.4912 254.2845,-66.0577 254.2845,-66.0577 254.2845,-66.0577 250.8114,-66.4912 254.6746,-69.1835 247.3384,-66.9246 247.3384,-66.9246\"/>\n",
"<text text-anchor=\"start\" x=\"265.4802\" y=\"-68.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !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=\"M458.5149,-32.7646C518.9228,-35.0581 714.2514,-42.4742 784.0977,-45.126\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"791.2203,-45.3964 784.1058,-48.2785 787.7229,-45.2636 784.2254,-45.1308 784.2254,-45.1308 784.2254,-45.1308 787.7229,-45.2636 784.3449,-41.983 791.2203,-45.3964 791.2203,-45.3964\"/>\n",
"<text text-anchor=\"start\" x=\"594.3503\" y=\"-43.8799\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M426.4353,-43.5077C418.1736,-55.1365 422.8552,-68.0799 440.4802,-68.0799 454.9382,-68.0799 460.6865,-59.3701 457.725,-49.821\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"454.5252,-43.5077 460.4996,-48.3274 456.1075,-46.6296 457.6899,-49.7515 457.6899,-49.7515 457.6899,-49.7515 456.1075,-46.6296 454.8801,-51.1756 454.5252,-43.5077 454.5252,-43.5077\"/>\n",
"<text text-anchor=\"start\" x=\"409.4802\" y=\"-71.8799\" 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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a270> >"
]
},
"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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"663pt\" height=\"209pt\"\n",
" viewBox=\"0.00 0.00 663.22 208.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 204.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-204.8701 659.2203,-204.8701 659.2203,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"305.1102\" y=\"-186.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"330.1102\" y=\"-186.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"346.1102\" y=\"-186.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"295.1102\" y=\"-172.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=\"-98\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-86.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,-98C4.3751,-98 17.3629,-98 30.7917,-98\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-98 30.8046,-101.1501 34.3045,-98 30.8045,-98.0001 30.8045,-98.0001 30.8045,-98.0001 34.3045,-98 30.8045,-94.8501 37.8045,-98 37.8045,-98\"/>\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,-123.8213C56.2072,-134.1776 58.9404,-142.8701 64.8701,-142.8701 69.3173,-142.8701 71.9666,-137.9805 72.8178,-131.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-123.8213 75.9779,-130.9252 72.9497,-127.3193 72.8297,-130.8172 72.8297,-130.8172 72.8297,-130.8172 72.9497,-127.3193 69.6816,-130.7092 73.0697,-123.8213 73.0697,-123.8213\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-146.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"498.3503\" cy=\"-105\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"493.8503\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"490.3503\" y=\"-93.8\" 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=\"M90.6932,-106.2301C116.4718,-113.964 157.3779,-124.9389 193.7401,-129 244.7546,-134.6975 354.5119,-125.8022 426.4802,-120 438.515,-119.0297 441.6146,-119.2327 453.4802,-117 457.3435,-116.2731 461.3625,-115.3878 465.3379,-114.431\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"472.4035,-112.6499 466.3858,-117.4154 469.0096,-113.5054 465.6158,-114.361 465.6158,-114.361 465.6158,-114.361 469.0096,-113.5054 464.8458,-111.3065 472.4035,-112.6499 472.4035,-112.6499\"/>\n",
"<text text-anchor=\"start\" x=\"314.4802\" y=\"-133.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"220.6102\" cy=\"-60\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"216.1102\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">4</text>\n",
"<text text-anchor=\"start\" x=\"212.6102\" y=\"-48.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</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=\"M91.5594,-93.8347C114.1777,-90.0364 147.365,-83.8289 175.7401,-76 179.9257,-74.8452 184.2816,-73.4911 188.562,-72.0681\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"195.1908,-69.7938 189.5919,-75.045 191.8802,-70.9297 188.5696,-72.0655 188.5696,-72.0655 188.5696,-72.0655 191.8802,-70.9297 187.5474,-69.086 195.1908,-69.7938 195.1908,-69.7938\"/>\n",
"<text text-anchor=\"start\" x=\"111.7401\" y=\"-94.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=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M489.4294,-130.37C488.8142,-140.9238 491.7878,-149.8701 498.3503,-149.8701 503.3747,-149.8701 506.2954,-144.6259 507.1123,-137.4312\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"507.2712,-130.37 510.2629,-137.4391 507.1924,-133.8691 507.1137,-137.3682 507.1137,-137.3682 507.1137,-137.3682 507.1924,-133.8691 503.9645,-137.2974 507.2712,-130.37 507.2712,-130.37\"/>\n",
"<text text-anchor=\"start\" x=\"445.3503\" y=\"-153.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !c) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"637.2203\" cy=\"-105\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"637.2203\" y=\"-101.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M525.4555,-105C550.4921,-105 587.4021,-105 611.8654,-105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"619.031,-105 612.031,-108.1501 615.531,-105 612.031,-105.0001 612.031,-105.0001 612.031,-105.0001 615.531,-105 612.0309,-101.8501 619.031,-105 619.031,-105\"/>\n",
"<text text-anchor=\"start\" x=\"543.2203\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c | (a &amp; b)</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M194.0931,-53.6743C170.9956,-49.4543 137.0256,-46.4113 109.7401,-57 101.4398,-60.2211 93.7366,-65.7728 87.1387,-71.7688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.8675,-76.8685 84.7081,-69.7373 84.383,-74.4349 86.8984,-72.0012 86.8984,-72.0012 86.8984,-72.0012 84.383,-74.4349 89.0887,-74.2651 81.8675,-76.8685 81.8675,-76.8685\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-60.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !b &amp; 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=\"M245.9456,-70.1209C252.2472,-72.3351 259.043,-74.4709 265.4802,-76 335.0871,-92.534 418.7737,-100.0304 464.4709,-103.1081\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"471.4709,-103.5648 464.2806,-106.2523 467.9783,-103.3369 464.4858,-103.109 464.4858,-103.109 464.4858,-103.109 467.9783,-103.3369 464.6909,-99.9656 471.4709,-103.5648 471.4709,-103.5648\"/>\n",
"<text text-anchor=\"start\" x=\"403.9802\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M206.7811,-83.0865C204.8677,-94.6001 209.4774,-104.8701 220.6102,-104.8701 229.3077,-104.8701 234.0238,-98.6018 234.7585,-90.3693\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"234.4392,-83.0865 237.8929,-89.9418 234.5926,-86.5832 234.7459,-90.0798 234.7459,-90.0798 234.7459,-90.0798 234.5926,-86.5832 231.5989,-90.2178 234.4392,-83.0865 234.4392,-83.0865\"/>\n",
"<text text-anchor=\"start\" x=\"200.1102\" y=\"-108.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"408.4802\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"408.4802\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</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=\"M247.5221,-58.2485C278.3351,-55.6744 330.0295,-49.6071 372.4802,-36 377.1299,-34.5096 381.9233,-32.4918 386.4357,-30.3455\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"392.7962,-27.1555 387.9512,-33.1095 389.6676,-28.7246 386.539,-30.2937 386.539,-30.2937 386.539,-30.2937 389.6676,-28.7246 385.1268,-27.478 392.7962,-27.1555 392.7962,-27.1555\"/>\n",
"<text text-anchor=\"start\" x=\"287.9802\" y=\"-60.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=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M621.6975,-95.2643C615.5607,-91.9534 608.2932,-88.6697 601.2203,-87 576.1321,-81.0775 568.5306,-82.1126 543.2203,-87 538.7856,-87.8564 534.2326,-89.148 529.8071,-90.6542\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"522.9928,-93.1658 528.4715,-87.7892 526.2769,-91.9553 529.5609,-90.7449 529.5609,-90.7449 529.5609,-90.7449 526.2769,-91.9553 530.6503,-93.7005 522.9928,-93.1658 522.9928,-93.1658\"/>\n",
"<text text-anchor=\"start\" x=\"566.7203\" y=\"-90.8\" 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=\"M626.5123,-119.7917C623.026,-130.4165 626.5953,-141 637.2203,-141 645.3551,-141 649.354,-134.7961 649.2169,-127.1197\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"647.9284,-119.7917 652.2431,-126.1403 648.5345,-123.2388 649.1407,-126.6859 649.1407,-126.6859 649.1407,-126.6859 648.5345,-123.2388 646.0383,-127.2315 647.9284,-119.7917 647.9284,-119.7917\"/>\n",
"<text text-anchor=\"start\" x=\"633.7203\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</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=\"M421.7409,-30.8371C435.3694,-44.0304 456.9071,-64.8803 473.6798,-81.1174\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"478.7182,-85.9948 471.4978,-83.3893 476.2035,-83.5604 473.6887,-81.126 473.6887,-81.126 473.6887,-81.126 476.2035,-83.5604 475.8797,-78.8628 478.7182,-85.9948 478.7182,-85.9948\"/>\n",
"<text text-anchor=\"start\" x=\"444.4802\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</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=\"M390.5702,-14.6022C362.7323,-10.1376 307.876,-4.6416 265.4802,-21 257.506,-24.0769 249.9955,-29.2442 243.4832,-34.8275\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"238.2594,-39.5786 241.3185,-32.5383 240.8486,-37.2236 243.4379,-34.8687 243.4379,-34.8687 243.4379,-34.8687 240.8486,-37.2236 245.5574,-37.199 238.2594,-39.5786 238.2594,-39.5786\"/>\n",
"<text text-anchor=\"start\" x=\"265.4802\" y=\"-24.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=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M401.449,-34.6641C399.8865,-44.625 402.2302,-54 408.4802,-54 413.1677,-54 415.658,-48.7266 415.9509,-41.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"415.5115,-34.6641 419.0808,-41.4598 415.7241,-38.1576 415.9366,-41.6511 415.9366,-41.6511 415.9366,-41.6511 415.7241,-38.1576 412.7925,-41.8425 415.5115,-34.6641 415.5115,-34.6641\"/>\n",
"<text text-anchor=\"start\" x=\"377.4802\" 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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a300> >"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"automaton from line 2:\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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"507pt\" height=\"166pt\"\n",
" viewBox=\"0.00 0.00 507.48 165.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 161.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-161.8701 503.4802,-161.8701 503.4802,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"227.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"252.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"268.2401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"217.2401\" y=\"-129.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=\"-56\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-44.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,-56C4.3751,-56 17.3629,-56 30.7917,-56\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-56 30.8046,-59.1501 34.3045,-56 30.8045,-56.0001 30.8045,-56.0001 30.8045,-56.0001 34.3045,-56 30.8045,-52.8501 37.8045,-56 37.8045,-56\"/>\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,-81.8213C56.2072,-92.1776 58.9404,-100.8701 64.8701,-100.8701 69.3173,-100.8701 71.9666,-95.9805 72.8178,-89.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-81.8213 75.9779,-88.9252 72.9497,-85.3193 72.8297,-88.8172 72.8297,-88.8172 72.8297,-88.8172 72.9497,-85.3193 69.6816,-88.7092 73.0697,-81.8213 73.0697,-81.8213\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-104.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"342.6102\" cy=\"-62\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"338.1102\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"334.6102\" y=\"-50.8\" 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=\"M90.1822,-65.7679C96.4846,-67.8352 103.2865,-69.7637 109.7401,-71 180.0841,-84.476 199.5461,-85.8289 270.7401,-78 283.5923,-76.5867 297.5083,-73.7924 309.641,-70.9291\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"316.5569,-69.2451 310.5009,-73.9618 313.1563,-70.0732 309.7557,-70.9012 309.7557,-70.9012 309.7557,-70.9012 313.1563,-70.0732 309.0104,-67.8406 316.5569,-69.2451 316.5569,-69.2451\"/>\n",
"<text text-anchor=\"start\" x=\"248.2401\" y=\"-84.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"252.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"252.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=\"edge4\" class=\"edge\">\n",
"<title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M91.9514,-54.3245C122.6987,-51.9087 174.1223,-46.303 216.7401,-34 221.1387,-32.7302 225.6983,-31.0306 230.034,-29.2126\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"236.6077,-26.3034 231.4814,-32.0169 233.4071,-27.7199 230.2066,-29.1363 230.2066,-29.1363 230.2066,-29.1363 233.4071,-27.7199 228.9317,-26.2558 236.6077,-26.3034 236.6077,-26.3034\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-55.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=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M333.6893,-87.37C333.074,-97.9238 336.0477,-106.8701 342.6102,-106.8701 347.6346,-106.8701 350.5553,-101.6259 351.3722,-94.4312\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"351.5311,-87.37 354.5228,-94.4391 351.4523,-90.8691 351.3736,-94.3682 351.3736,-94.3682 351.3736,-94.3682 351.4523,-90.8691 348.2243,-94.2974 351.5311,-87.37 351.5311,-87.37\"/>\n",
"<text text-anchor=\"start\" x=\"289.6102\" y=\"-110.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !c) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"481.4802\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"481.4802\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M369.7154,-62C394.752,-62 431.662,-62 456.1253,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"463.2909,-62 456.2909,-65.1501 459.7909,-62 456.2909,-62.0001 456.2909,-62.0001 456.2909,-62.0001 459.7909,-62 456.2908,-58.8501 463.2909,-62 463.2909,-62\"/>\n",
"<text text-anchor=\"start\" x=\"387.4802\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c | (a &amp; b)</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=\"M235.2764,-13.4989C207.5742,-7.2516 152.3357,1.5301 109.7401,-15 101.4398,-18.2211 93.7366,-23.7728 87.1387,-29.7688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.8675,-34.8685 84.7081,-27.7373 84.383,-32.4349 86.8984,-30.0012 86.8984,-30.0012 86.8984,-30.0012 84.383,-32.4349 89.0887,-32.2651 81.8675,-34.8685 81.8675,-34.8685\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-18.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !c)</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M269.2237,-26.0703C281.1762,-31.9222 297.6913,-40.0079 312.0282,-47.0272\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"318.438,-50.1654 310.7659,-49.9164 315.2945,-48.6263 312.1511,-47.0873 312.1511,-47.0873 312.1511,-47.0873 315.2945,-48.6263 313.5362,-44.2582 318.438,-50.1654 318.438,-50.1654\"/>\n",
"<text text-anchor=\"start\" x=\"288.7401\" y=\"-43.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M245.7089,-34.6641C244.1464,-44.625 246.4901,-54 252.7401,-54 257.4276,-54 259.9178,-48.7266 260.2108,-41.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"259.7714,-34.6641 263.3407,-41.4598 259.9839,-38.1576 260.1965,-41.6511 260.1965,-41.6511 260.1965,-41.6511 259.9839,-38.1576 257.0523,-41.8425 259.7714,-34.6641 259.7714,-34.6641\"/>\n",
"<text text-anchor=\"start\" x=\"221.7401\" y=\"-57.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=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M465.9574,-52.2643C459.8206,-48.9534 452.553,-45.6697 445.4802,-44 420.392,-38.0775 412.7904,-39.1126 387.4802,-44 383.0455,-44.8564 378.4925,-46.148 374.0669,-47.6542\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"367.2527,-50.1658 372.7314,-44.7892 370.5368,-48.9553 373.8208,-47.7449 373.8208,-47.7449 373.8208,-47.7449 370.5368,-48.9553 374.9102,-50.7005 367.2527,-50.1658 367.2527,-50.1658\"/>\n",
"<text text-anchor=\"start\" x=\"410.9802\" y=\"-47.8\" 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=\"M470.7722,-76.7917C467.2859,-87.4165 470.8552,-98 481.4802,-98 489.615,-98 493.6139,-91.7961 493.4768,-84.1197\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"492.1882,-76.7917 496.503,-83.1403 492.7944,-80.2388 493.4006,-83.6859 493.4006,-83.6859 493.4006,-83.6859 492.7944,-80.2388 490.2982,-84.2315 492.1882,-76.7917 492.1882,-76.7917\"/>\n",
"<text text-anchor=\"start\" x=\"477.9802\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a1e0> >"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for line, data in log.iterrows():\n",
" if type(data.automaton) is str:\n",
" print(\"automaton from line {}:\".format(line))\n",
" display(spot.automaton(data.automaton + \"\\n\"))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `sat_langmap`\n",
"\n",
"When using the default binary search approach, the `sat_langmap=True` can help refine the lower bound by first testing the language-equivalence of all states in the automaton. This allows to form equivalence classes of states, and clearly the minimal automaton needs at least as many states as the number of equivalence states.\n",
"\n",
"For instance in the `large` automaton we use as example, the 6 states correspond to only two different languages. This can be seen with the `highlight_language()` function, which colors states with identical languages. This information can be used by the minimization function to search a minimal automaton between 2 and 6 states."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: G 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>G</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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faa9c9f690> >"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.highlight_languages(large); large"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compare the next two logs, with and without `sat_langmap`."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>975</td>\n",
" <td>32912</td>\n",
" <td>20</td>\n",
" <td>1</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>10</td>\n",
" <td>32</td>\n",
" <td>2705</td>\n",
" <td>150257</td>\n",
" <td>87</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 975 \n",
"1 6 5 4 10 32 2705 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 32912 20 1 0 0 \n",
"1 150257 87 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"474pt\" height=\"166pt\"\n",
" viewBox=\"0.00 0.00 474.48 165.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 161.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-161.8701 470.4802,-161.8701 470.4802,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"210.7401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"235.7401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"251.7401\" y=\"-143.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"200.7401\" y=\"-129.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=\"-56\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-44.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,-56C4.3751,-56 17.3629,-56 30.7917,-56\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-56 30.8046,-59.1501 34.3045,-56 30.8045,-56.0001 30.8045,-56.0001 30.8045,-56.0001 34.3045,-56 30.8045,-52.8501 37.8045,-56 37.8045,-56\"/>\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,-81.8213C56.2072,-92.1776 58.9404,-100.8701 64.8701,-100.8701 69.3173,-100.8701 71.9666,-95.9805 72.8178,-89.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-81.8213 75.9779,-88.9252 72.9497,-85.3193 72.8297,-88.8172 72.8297,-88.8172 72.8297,-88.8172 72.9497,-85.3193 69.6816,-88.7092 73.0697,-81.8213 73.0697,-81.8213\"/>\n",
"<text text-anchor=\"start\" x=\"29.8701\" y=\"-104.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=\"333.7401\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"333.7401\" y=\"-58.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=\"M90.1822,-65.7679C96.4846,-67.8352 103.2865,-69.7637 109.7401,-71 180.0841,-84.476 199.67,-86.8838 270.7401,-78 283.815,-76.3656 298.0692,-72.8935 309.7068,-69.6001\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"316.5807,-67.5907 310.7458,-72.5783 313.2213,-68.5728 309.8619,-69.5548 309.8619,-69.5548 309.8619,-69.5548 313.2213,-68.5728 308.978,-66.5314 316.5807,-67.5907 316.5807,-67.5907\"/>\n",
"<text text-anchor=\"start\" x=\"248.2401\" y=\"-84.8\" 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=\"252.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"252.7401\" y=\"-14.3\" 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.9514,-54.3245C122.6987,-51.9087 174.1223,-46.303 216.7401,-34 221.1387,-32.7302 225.6983,-31.0306 230.034,-29.2126\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"236.6077,-26.3034 231.4814,-32.0169 233.4071,-27.7199 230.2066,-29.1363 230.2066,-29.1363 230.2066,-29.1363 233.4071,-27.7199 228.9317,-26.2558 236.6077,-26.3034 236.6077,-26.3034\"/>\n",
"<text text-anchor=\"start\" x=\"113.2401\" y=\"-55.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=\"edge5\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M326.7089,-78.6641C325.1464,-88.625 327.4901,-98 333.7401,-98 338.4276,-98 340.9178,-92.7266 341.2108,-85.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"340.7714,-78.6641 344.3407,-85.4598 340.9839,-82.1576 341.1965,-85.6511 341.1965,-85.6511 341.1965,-85.6511 340.9839,-82.1576 338.0523,-85.8425 340.7714,-78.6641 340.7714,-78.6641\"/>\n",
"<text text-anchor=\"start\" x=\"330.2401\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"439.6102\" cy=\"-62\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"435.1102\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">3</text>\n",
"<text text-anchor=\"start\" x=\"431.6102\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.1813,-62C366.7995,-62 387.6339,-62 405.2978,-62\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"412.6465,-62 405.6465,-65.1501 409.1465,-62 405.6465,-62.0001 405.6465,-62.0001 405.6465,-62.0001 409.1465,-62 405.6464,-58.8501 412.6465,-62 412.6465,-62\"/>\n",
"<text text-anchor=\"start\" x=\"376.7401\" y=\"-65.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!c</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=\"M235.2764,-13.4989C207.5742,-7.2516 152.3357,1.5301 109.7401,-15 101.4398,-18.2211 93.7366,-23.7728 87.1387,-29.7688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"81.8675,-34.8685 84.7081,-27.7373 84.383,-32.4349 86.8984,-30.0012 86.8984,-30.0012 86.8984,-30.0012 84.383,-32.4349 89.0887,-32.2651 81.8675,-34.8685 81.8675,-34.8685\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-18.8\" 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=\"edge8\" class=\"edge\">\n",
"<title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M268.7431,-26.693C280.9466,-33.322 297.9033,-42.5331 311.4372,-49.8848\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"317.7704,-53.3251 310.1157,-52.7517 314.6948,-51.6544 311.6193,-49.9837 311.6193,-49.9837 311.6193,-49.9837 314.6948,-51.6544 313.1229,-47.2157 317.7704,-53.3251 317.7704,-53.3251\"/>\n",
"<text text-anchor=\"start\" x=\"288.7401\" y=\"-44.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">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=\"M245.7089,-34.6641C244.1464,-44.625 246.4901,-54 252.7401,-54 257.4276,-54 259.9178,-48.7266 260.2108,-41.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"259.7714,-34.6641 263.3407,-41.4598 259.9839,-38.1576 260.1965,-41.6511 260.1965,-41.6511 260.1965,-41.6511 259.9839,-38.1576 257.0523,-41.8425 259.7714,-34.6641 259.7714,-34.6641\"/>\n",
"<text text-anchor=\"start\" x=\"221.7401\" y=\"-57.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=\"edge10\" class=\"edge\">\n",
"<title>3&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M415.7504,-49.3312C402.2807,-43.735 385.1146,-39.1918 369.7401,-43 364.8547,-44.2101 359.9013,-46.2174 355.2959,-48.4847\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"348.8458,-51.93 353.5361,-45.8534 351.933,-50.2809 355.0202,-48.6319 355.0202,-48.6319 355.0202,-48.6319 351.933,-50.2809 356.5043,-51.4104 348.8458,-51.93 348.8458,-51.93\"/>\n",
"<text text-anchor=\"start\" x=\"369.7401\" y=\"-46.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a | c</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M429.2358,-86.9167C428.3864,-97.6664 431.8445,-106.8701 439.6102,-106.8701 445.5557,-106.8701 448.9763,-101.475 449.8719,-94.1217\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"449.9846,-86.9167 453.0247,-93.9652 449.9298,-90.4163 449.875,-93.9159 449.875,-93.9159 449.875,-93.9159 449.9298,-90.4163 446.7254,-93.8666 449.9846,-86.9167 449.9846,-86.9167\"/>\n",
"<text text-anchor=\"start\" x=\"419.6102\" y=\"-110.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!a &amp; !c</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a6c0> >"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Binary search between 1 and 6\n",
"spot.sat_minimize(large, acc='co-Buchi', state_based=True, display_log=True)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>6</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>12</td>\n",
" <td>32</td>\n",
" <td>1732</td>\n",
" <td>77340</td>\n",
" <td>45</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>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>363</td>\n",
" <td>10496</td>\n",
" <td>6</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 1732 \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 77340 45 0 1 0 \n",
"1 3129 2 0 0 0 \n",
"2 10496 6 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",
"<!-- Title: G 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",
"<title>G</title>\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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a480> >"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Binary search between 2 and 6 thanks to sat_langmap\n",
"spot.sat_minimize(large, acc='co-Buchi', sat_langmap=True, state_based=True, display_log=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### `states`\n",
"\n",
"Sometimes we do not want a minimization loop, we just want to generate an equivalent automaton with a given number of states. In that case, we use the `states` option. However there is no constraint that all state should be reachable, so in the end, you could end with an automaton with fewer states than requested."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>input.states</th>\n",
" <th>target.states</th>\n",
" <th>reachable.states</th>\n",
" <th>edges</th>\n",
" <th>transitions</th>\n",
" <th>variables</th>\n",
" <th>clauses</th>\n",
" <th>enc.user</th>\n",
" <th>enc.sys</th>\n",
" <th>sat.user</th>\n",
" <th>sat.sys</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>7</td>\n",
" <td>5</td>\n",
" <td>14</td>\n",
" <td>40</td>\n",
" <td>1869</td>\n",
" <td>135032</td>\n",
" <td>80</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" input.states target.states reachable.states edges transitions variables \\\n",
"0 2 7 5 14 40 1869 \n",
"\n",
" clauses enc.user enc.sys sat.user sat.sys \n",
"0 135032 80 1 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",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"524pt\" height=\"307pt\"\n",
" viewBox=\"0.00 0.00 523.74 306.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 302.8701)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-302.8701 519.7401,-302.8701 519.7401,4 -4,4\"/>\n",
"<text text-anchor=\"start\" x=\"235.3701\" y=\"-284.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">Fin(</text>\n",
"<text text-anchor=\"start\" x=\"260.3701\" y=\"-284.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
"<text text-anchor=\"start\" x=\"276.3701\" y=\"-284.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">)</text>\n",
"<text text-anchor=\"start\" x=\"225.3701\" y=\"-270.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=\"-97\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-100.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">0</text>\n",
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-85.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,-97C4.3751,-97 17.3629,-97 30.7917,-97\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"37.8045,-97 30.8046,-100.1501 34.3045,-97 30.8045,-97.0001 30.8045,-97.0001 30.8045,-97.0001 34.3045,-97 30.8045,-93.8501 37.8045,-97 37.8045,-97\"/>\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,-122.8213C56.2072,-133.1776 58.9404,-141.8701 64.8701,-141.8701 69.3173,-141.8701 71.9666,-136.9805 72.8178,-130.1667\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0697,-122.8213 75.9779,-129.9252 72.9497,-126.3193 72.8297,-129.8172 72.8297,-129.8172 72.8297,-129.8172 72.9497,-126.3193 69.6816,-129.7092 73.0697,-122.8213 73.0697,-122.8213\"/>\n",
"<text text-anchor=\"start\" x=\"11.3701\" y=\"-145.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=\"265.7401\" cy=\"-203\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"261.2401\" y=\"-206.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">1</text>\n",
"<text text-anchor=\"start\" x=\"257.7401\" y=\"-191.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=\"M77.6079,-120.7614C85.3814,-133.1935 96.3921,-147.7162 109.7401,-157 146.6997,-182.7062 198.1339,-194.2353 231.6758,-199.2754\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"238.9652,-200.3109 231.5917,-202.445 235.5,-199.8186 232.0347,-199.3263 232.0347,-199.3263 232.0347,-199.3263 235.5,-199.8186 232.4778,-196.2076 238.9652,-200.3109 238.9652,-200.3109\"/>\n",
"<text text-anchor=\"start\" x=\"130.2401\" y=\"-199.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=\"401.2401\" cy=\"-152\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"396.7401\" y=\"-155.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">2</text>\n",
"<text text-anchor=\"start\" x=\"393.2401\" y=\"-140.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=\"M90.3017,-105.723C96.6004,-107.6644 103.3708,-109.5684 109.7401,-111 201.8384,-131.7002 312.7856,-143.8733 367.4378,-149.048\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"374.4518,-149.7028 367.1893,-152.1884 370.967,-149.3774 367.4821,-149.052 367.4821,-149.052 367.4821,-149.052 370.967,-149.3774 367.775,-145.9157 374.4518,-149.7028 374.4518,-149.7028\"/>\n",
"<text text-anchor=\"start\" x=\"234.7401\" y=\"-144.8\" 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=\"497.7401\" cy=\"-130\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"497.7401\" y=\"-126.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=\"M92.1887,-97.2996C153.3629,-98.2135 305.9445,-101.8459 432.7401,-116 446.2308,-117.506 461.0427,-120.5824 473.1156,-123.4688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"480.2423,-125.2257 472.6918,-126.6086 476.8441,-124.3879 473.4458,-123.5502 473.4458,-123.5502 473.4458,-123.5502 476.8441,-124.3879 474.1998,-120.4917 480.2423,-125.2257 480.2423,-125.2257\"/>\n",
"<text text-anchor=\"start\" x=\"316.2401\" y=\"-112.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"265.7401\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"265.7401\" y=\"-14.3\" 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=\"M86.9053,-80.7788C93.9393,-76.1522 101.9307,-71.4394 109.7401,-68 154.7271,-48.1867 170.3805,-56.3456 216.7401,-40 225.3971,-36.9477 234.6415,-32.9899 242.7415,-29.2743\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"249.2384,-26.2353 244.2324,-32.0545 246.0681,-27.7183 242.8978,-29.2012 242.8978,-29.2012 242.8978,-29.2012 246.0681,-27.7183 241.5631,-26.3479 249.2384,-26.2353 249.2384,-26.2353\"/>\n",
"<text text-anchor=\"start\" x=\"132.2401\" y=\"-71.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=\"edge7\" class=\"edge\">\n",
"<title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M253.6098,-227.0048C252.2865,-238.1405 256.33,-247.8701 265.7401,-247.8701 273.0918,-247.8701 277.1679,-241.9316 277.9684,-234.0236\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"277.8704,-227.0048 281.1179,-233.9601 277.9193,-230.5045 277.9682,-234.0041 277.9682,-234.0041 277.9682,-234.0041 277.9193,-230.5045 274.8185,-234.0481 277.8704,-227.0048 277.8704,-227.0048\"/>\n",
"<text text-anchor=\"start\" x=\"230.7401\" y=\"-251.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=\"M290.9091,-193.5268C312.9211,-185.2419 345.018,-173.1611 368.9238,-164.1634\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"375.7461,-161.5955 370.3045,-167.0095 372.4705,-162.8285 369.1948,-164.0614 369.1948,-164.0614 369.1948,-164.0614 372.4705,-162.8285 368.0852,-161.1133 375.7461,-161.5955 375.7461,-161.5955\"/>\n",
"<text text-anchor=\"start\" x=\"314.7401\" y=\"-186.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=\"M292.6453,-205.3903C326.6542,-207.3535 386.3527,-207.2274 432.7401,-188 452.3002,-179.8924 469.9061,-163.3063 481.8454,-149.9398\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"486.6044,-144.4426 484.4043,-151.7967 484.3136,-147.0887 482.0228,-149.7349 482.0228,-149.7349 482.0228,-149.7349 484.3136,-147.0887 479.6412,-147.6732 486.6044,-144.4426 486.6044,-144.4426\"/>\n",
"<text text-anchor=\"start\" x=\"369.7401\" y=\"-206.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b | (a &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=\"M428.3725,-151.1576C438.9227,-150.352 451.0257,-148.8335 461.7401,-146 466.1661,-144.8295 470.7389,-143.1772 475.079,-141.3751\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"481.6531,-138.4676 476.5254,-144.1798 478.4522,-139.8833 475.2513,-141.299 475.2513,-141.299 475.2513,-141.299 478.4522,-139.8833 473.9772,-138.4181 481.6531,-138.4676 481.6531,-138.4676\"/>\n",
"<text text-anchor=\"middle\" x=\"456.2401\" y=\"-151.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=\"M479.6737,-126.3757C470.8446,-125.2271 460.1256,-124.7644 450.7401,-127 443.8564,-128.6397 436.8451,-131.3986 430.3469,-134.499\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"424.0434,-137.6843 428.8703,-131.7157 427.1672,-136.1057 430.291,-134.5271 430.291,-134.5271 430.291,-134.5271 427.1672,-136.1057 431.7118,-137.3386 424.0434,-137.6843 424.0434,-137.6843\"/>\n",
"<text text-anchor=\"start\" x=\"450.7401\" y=\"-130.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=\"M490.7089,-146.6641C489.1464,-156.625 491.4901,-166 497.7401,-166 502.4276,-166 504.9178,-160.7266 505.2108,-153.8876\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"504.7714,-146.6641 508.3407,-153.4598 504.9839,-150.1576 505.1965,-153.6511 505.1965,-153.6511 505.1965,-153.6511 504.9839,-150.1576 502.0523,-153.8425 504.7714,-146.6641 504.7714,-146.6641\"/>\n",
"<text text-anchor=\"start\" x=\"494.2401\" y=\"-169.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">c</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;0 -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>4&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M248.3627,-13.2055C217.9135,-5.8555 153.9559,4.8088 109.7401,-21 93.5296,-30.4621 82.5588,-48.2709 75.5251,-64.2718\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"72.7478,-70.989 72.5114,-63.3166 74.0851,-67.7546 75.4225,-64.5201 75.4225,-64.5201 75.4225,-64.5201 74.0851,-67.7546 78.3335,-65.7237 72.7478,-70.989 72.7478,-70.989\"/>\n",
"<text text-anchor=\"start\" x=\"109.7401\" y=\"-24.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">(!a &amp; !b) | (!b &amp; !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=\"M283.8302,-19.5711C321.1581,-23.6768 407.7359,-37.7659 461.7401,-83 470.3189,-90.1856 478.1121,-99.7603 484.2363,-108.3923\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"488.1987,-114.1767 481.644,-110.1818 486.2207,-111.2892 484.2427,-108.4017 484.2427,-108.4017 484.2427,-108.4017 486.2207,-111.2892 486.8415,-106.6215 488.1987,-114.1767 488.1987,-114.1767\"/>\n",
"<text text-anchor=\"start\" x=\"396.7401\" y=\"-66.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge15\" class=\"edge\">\n",
"<title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M254.8274,-32.4167C251.0166,-43.166 254.6542,-54 265.7401,-54 274.401,-54 278.5158,-47.3875 278.0844,-39.3688\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"276.6528,-32.4167 281.15,-38.6375 277.3588,-35.8447 278.0647,-39.2728 278.0647,-39.2728 278.0647,-39.2728 277.3588,-35.8447 274.9795,-39.9082 276.6528,-32.4167 276.6528,-32.4167\"/>\n",
"<text text-anchor=\"start\" x=\"234.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.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x14faae26a3f0> >"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.sat_minimize(small, acc=\"co-Buchi\", states=7, state_based=True, display_log=True)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}