* tests/python/_partitioned_relabel.ipynb, tests/python/_product_weak.ipynb, tests/python/acc_cond.ipynb, tests/python/aliases.ipynb, tests/python/automata.ipynb, tests/python/cav22-figs.ipynb, tests/python/contains.ipynb, tests/python/decompose.ipynb, tests/python/formulas.ipynb, tests/python/games.ipynb, tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb, tests/python/parity.ipynb, tests/python/product.ipynb, tests/python/satmin.ipynb, tests/python/stutter-inv.ipynb, tests/python/synthesis.ipynb, tests/python/twagraph-internals.ipynb, tests/python/word.ipynb, tests/python/zlktree.ipynb: here
4596 lines
303 KiB
Text
4596 lines
303 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# SAT-based minimization of deterministic ω-automata\n",
|
|
"\n",
|
|
"The `spot.sat_minimize()` Python function is the main entry point for minimizing any **deterministic** ω-automaton. This notebook demonstrates how to use that function.\n",
|
|
"\n",
|
|
"**Warning:** while the automata used in this notebook are quite small, working with large automata can require a lot of RAM and take huge amount of time. In its most straightforward variant, `sat_minimize()` takes a input automaton (called *reference*) and then makes a loop to ask a SAT-solver for an equivalent automaton (called *candidate*) with 1 fewer state at each iteration. If the reference has size ($n_i$, $s_i$), i.e. $n_i$ states, $s_i$ acceptance sets, and the candidate has size $(n_o, s_o)$, the SAT encoding uses $\\mathrm{O}(n_i^2\\times n_o^2\\times 2^{s_i+s_o})$ variables and $\\mathrm{O}(n_i^2 \\times n_o^3\\times 2^{s_i+2s_o}\\times |\\Sigma|)$ clauses. Reducing the number of acceptance set the therefore the most important way to simplify a problem."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import spot\n",
|
|
"spot.setup(show_default='.b')\n",
|
|
"from IPython.display import display"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Minimizing DBA\n",
|
|
"\n",
|
|
"Let's take a simple formula and translate it into a DBA:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/latex": [
|
|
"$\\mathsf{G} \\mathsf{F} (a \\leftrightarrow \\mathsf{X} \\mathsf{X} b)$"
|
|
],
|
|
"text/plain": [
|
|
"spot.formula(\"GF(a <-> XXb)\")"
|
|
]
|
|
},
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"f = spot.formula('GF(a <-> XXb)'); f"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"572pt\" height=\"336pt\"\n",
|
|
" viewBox=\"0.00 0.00 572.00 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.0 1.0) rotate(0) translate(4 332)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-332 568,-332 568,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"261.5\" y=\"-313.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"282.5\" y=\"-313.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"298.5\" y=\"-313.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"260.5\" y=\"-299.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 6 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>6</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-151C62,-151 50,-151 50,-151 44,-151 38,-145 38,-139 38,-139 38,-125 38,-125 38,-119 44,-113 50,-113 50,-113 62,-113 62,-113 68,-113 74,-119 74,-125 74,-125 74,-139 74,-139 74,-145 68,-151 62,-151\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-135.8\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-120.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->6 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-132C2.79,-132 17.15,-132 30.63,-132\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-132 30.94,-135.15 34.44,-132 30.94,-132 30.94,-132 30.94,-132 34.44,-132 30.94,-128.85 37.94,-132 37.94,-132\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M141,-224C141,-224 129,-224 129,-224 123,-224 117,-218 117,-212 117,-212 117,-200 117,-200 117,-194 123,-188 129,-188 129,-188 141,-188 141,-188 147,-188 153,-194 153,-200 153,-200 153,-212 153,-212 153,-218 147,-224 141,-224\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"135\" y=\"-202.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->0 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>6->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.12,-150.76C79.71,-156.71 86.02,-163.23 92,-169 98.1,-174.89 104.93,-181.06 111.27,-186.65\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"116.93,-191.58 109.58,-189.35 114.29,-189.28 111.65,-186.98 111.65,-186.98 111.65,-186.98 114.29,-189.28 113.72,-184.6 116.93,-191.58 116.93,-191.58\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-178.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M336,-81C336,-81 324,-81 324,-81 318,-81 312,-75 312,-69 312,-69 312,-57 312,-57 312,-51 318,-45 324,-45 324,-45 336,-45 336,-45 342,-45 348,-51 348,-57 348,-57 348,-69 348,-69 348,-75 342,-81 336,-81\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"330\" y=\"-59.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->1 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>6->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M71.17,-112.64C76.92,-106.08 84.09,-99.33 92,-95 161.73,-56.87 259.7,-57.87 304.68,-60.8\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"311.94,-61.32 304.73,-63.96 308.45,-61.07 304.96,-60.82 304.96,-60.82 304.96,-60.82 308.45,-61.07 305.18,-57.68 311.94,-61.32 311.94,-61.32\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"171\" y=\"-71.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M224,-178C224,-178 212,-178 212,-178 206,-178 200,-172 200,-166 200,-166 200,-154 200,-154 200,-148 206,-142 212,-142 212,-142 224,-142 224,-142 230,-142 236,-148 236,-154 236,-154 236,-166 236,-166 236,-172 230,-178 224,-178\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"218\" y=\"-156.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M153.18,-196.24C164.99,-189.54 180.82,-180.55 193.76,-173.2\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"199.85,-169.74 195.32,-175.94 196.8,-171.47 193.76,-173.2 193.76,-173.2 193.76,-173.2 196.8,-171.47 192.2,-170.46 199.85,-169.74 199.85,-169.74\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"173\" y=\"-188.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M336,-264C336,-264 324,-264 324,-264 318,-264 312,-258 312,-252 312,-252 312,-240 312,-240 312,-234 318,-228 324,-228 324,-228 336,-228 336,-228 342,-228 348,-234 348,-240 348,-240 348,-252 348,-252 348,-258 342,-264 336,-264\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"330\" y=\"-242.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->5 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M153.14,-210.22C176.04,-215.8 217.94,-225.76 254,-233 270.88,-236.39 290.01,-239.7 304.72,-242.13\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"311.97,-243.31 304.56,-245.29 308.52,-242.75 305.07,-242.18 305.07,-242.18 305.07,-242.18 308.52,-242.75 305.57,-239.08 311.97,-243.31 311.97,-243.31\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"212.5\" y=\"-231.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->6 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>4->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M199.52,-156.94C170.79,-151.91 113.57,-141.9 81.05,-136.21\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.12,-135 81.56,-133.1 77.57,-135.6 81.02,-136.2 81.02,-136.2 81.02,-136.2 77.57,-135.6 80.47,-139.31 74.12,-135 74.12,-135\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"131\" y=\"-151.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M210.76,-178.15C209.65,-187.54 212.06,-196 218,-196 222.36,-196 224.82,-191.44 225.38,-185.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"225.24,-178.15 228.52,-185.09 225.31,-181.65 225.37,-185.15 225.37,-185.15 225.37,-185.15 225.31,-181.65 222.23,-185.21 225.24,-178.15 225.24,-178.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"200\" y=\"-199.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->5 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M236.17,-175.3C241.76,-180.12 248.06,-185.39 254,-190 271.15,-203.3 276.63,-204.99 294,-218 297.93,-220.95 302.06,-224.14 306.04,-227.29\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"311.73,-231.82 304.29,-229.92 308.99,-229.64 306.25,-227.46 306.25,-227.46 306.25,-227.46 308.99,-229.64 308.21,-224.99 311.73,-231.82 311.73,-231.82\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"254\" y=\"-221.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->6 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>5->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M311.84,-250.24C273.31,-258.72 178.53,-273.66 117,-233 90.36,-215.4 73.87,-181.55 65.07,-157.92\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.69,-151.24 68.01,-156.77 63.86,-154.54 65.04,-157.83 65.04,-157.83 65.04,-157.83 63.86,-154.54 62.07,-158.89 62.69,-151.24 62.69,-151.24\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"172.5\" y=\"-259.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M552,-174C552,-174 540,-174 540,-174 534,-174 528,-168 528,-162 528,-162 528,-150 528,-150 528,-144 534,-138 540,-138 540,-138 552,-138 552,-138 558,-138 564,-144 564,-150 564,-150 564,-162 564,-162 564,-168 558,-174 552,-174\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"546\" y=\"-152.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M348.05,-243.73C381.43,-238.65 456.78,-224.04 510,-190 514.82,-186.92 519.53,-183.1 523.85,-179.14\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"529.1,-174.11 526.23,-181.23 526.58,-176.53 524.05,-178.95 524.05,-178.95 524.05,-178.95 526.58,-176.53 521.87,-176.68 529.1,-174.11 529.1,-174.11\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"424\" y=\"-229.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node8\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M448,-115C448,-115 436,-115 436,-115 430,-115 424,-109 424,-103 424,-103 424,-91 424,-91 424,-85 430,-79 436,-79 436,-79 448,-79 448,-79 454,-79 460,-85 460,-91 460,-91 460,-103 460,-103 460,-109 454,-115 448,-115\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"442\" y=\"-93.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M348.22,-229.5C353.71,-224.59 359.94,-219.36 366,-215 382.65,-203.03 392.77,-207.67 406,-192 422.94,-171.93 432.02,-142.94 436.66,-122.27\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"438.12,-115.33 439.76,-122.83 437.39,-118.75 436.67,-122.18 436.67,-122.18 436.67,-122.18 437.39,-118.75 433.59,-121.53 438.12,-115.33 438.12,-115.33\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"366\" y=\"-218.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M348.22,-56.99C373.88,-49.09 423.08,-38.08 460,-55 493.85,-70.51 518.97,-107.02 532.81,-131.62\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"536.25,-137.91 530.13,-133.28 534.57,-134.84 532.89,-131.77 532.89,-131.77 532.89,-131.77 534.57,-134.84 535.65,-130.26 536.25,-137.91 536.25,-137.91\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"438.5\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M348.29,-65.76C363.7,-68.48 386.73,-73.24 406,-80 409.74,-81.31 413.61,-82.92 417.35,-84.62\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"423.89,-87.72 416.21,-87.56 420.73,-86.22 417.57,-84.72 417.57,-84.72 417.57,-84.72 420.73,-86.22 418.92,-81.87 423.89,-87.72 423.89,-87.72\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"380.5\" y=\"-83.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->6 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>2->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M541.97,-137.8C533.96,-96.65 508.2,0 443,0 134,0 134,0 134,0 85.62,0 67.1,-66.97 60.44,-105.51\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"59.26,-112.81 57.27,-105.39 59.82,-109.35 60.38,-105.9 60.38,-105.9 60.38,-105.9 59.82,-109.35 63.49,-106.4 59.26,-112.81 59.26,-112.81\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"268\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M527.71,-156.21C473.39,-156.88 306.06,-158.93 243.2,-159.7\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"236.07,-159.79 243.03,-156.55 239.57,-159.75 243.07,-159.7 243.07,-159.7 243.07,-159.7 239.57,-159.75 243.11,-162.85 236.07,-159.79 236.07,-159.79\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"370\" y=\"-161.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M544.42,-174.06C542.61,-197.46 535.68,-237.66 510,-258 464.95,-293.69 391.85,-271.7 354.54,-256.63\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"348,-253.92 355.68,-253.69 351.24,-255.26 354.47,-256.6 354.47,-256.6 354.47,-256.6 351.24,-255.26 353.26,-259.51 348,-253.92 348,-253.92\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"424\" y=\"-280.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->6 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M423.91,-100.03C402.34,-103.58 364.04,-109 331,-109 134,-109 134,-109 134,-109 115.61,-109 95.74,-115.1 80.8,-121.01\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.3,-123.7 79.57,-118.11 77.53,-122.36 80.77,-121.03 80.77,-121.03 80.77,-121.03 77.53,-122.36 81.97,-123.94 74.3,-123.7 74.3,-123.7\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"212\" y=\"-112.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M460.3,-107.01C477.11,-116.73 502.75,-131.56 521.42,-142.36\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"527.95,-146.14 520.32,-145.36 524.92,-144.39 521.89,-142.63 521.89,-142.63 521.89,-142.63 524.92,-144.39 523.47,-139.91 527.95,-146.14 527.95,-146.14\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"478\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M432.59,-115.15C431.15,-124.54 434.28,-133 442,-133 447.67,-133 450.87,-128.44 451.59,-122.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"451.41,-115.15 454.74,-122.07 451.5,-118.65 451.59,-122.15 451.59,-122.15 451.59,-122.15 451.5,-118.65 448.44,-122.23 451.41,-115.15 451.41,-115.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"424\" y=\"-136.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138232480> >"
|
|
]
|
|
},
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut = f.translate('det', 'Buchi', 'SBAcc'); 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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"387pt\" height=\"360pt\"\n",
|
|
" viewBox=\"0.00 0.00 387.44 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(0.9174311926605504 0.9174311926605504) rotate(0) translate(4 388.11)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-388.11 418,-388.11 418,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"186.5\" y=\"-369.91\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"207.5\" y=\"-369.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"223.5\" y=\"-369.91\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"185.5\" y=\"-355.91\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-142.11\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-138.41\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-142.11C2.79,-142.11 17.15,-142.11 30.63,-142.11\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-142.11 30.94,-145.26 34.44,-142.11 30.94,-142.11 30.94,-142.11 30.94,-142.11 34.44,-142.11 30.94,-138.96 37.94,-142.11 37.94,-142.11\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"168\" cy=\"-169.11\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"168\" y=\"-165.41\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M65.07,-157.9C71.04,-167.71 80.18,-179.49 92,-185.11 108.89,-193.15 129.83,-187.54 145.29,-180.85\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"151.97,-177.75 146.95,-183.55 148.79,-179.22 145.62,-180.7 145.62,-180.7 145.62,-180.7 148.79,-179.22 144.29,-177.84 151.97,-177.75 151.97,-177.75\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-206.91\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"104\" y=\"-191.91\" 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=\"black\" cx=\"396\" cy=\"-226.11\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"396\" y=\"-222.41\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M58.77,-159.97C62.58,-194.38 72.81,-267.83 92,-283.11 185.16,-357.33 256.56,-342.16 360,-283.11 372.68,-275.88 381.35,-262 386.88,-249.75\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"389.64,-243.17 389.84,-250.84 388.29,-246.4 386.94,-249.62 386.94,-249.62 386.94,-249.62 388.29,-246.4 384.03,-248.41 389.64,-243.17 389.64,-243.17\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"206\" y=\"-336.91\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"282\" cy=\"-72.11\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"282\" y=\"-68.41\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M67.53,-127.9C73.83,-120.36 82.46,-111.55 92,-106.11 145.09,-75.86 219.04,-71.5 256.76,-71.46\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"263.81,-71.51 256.79,-74.61 260.31,-71.48 256.81,-71.46 256.81,-71.46 256.81,-71.46 260.31,-71.48 256.83,-68.31 263.81,-71.51 263.81,-71.51\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"152\" y=\"-86.91\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M64.52,-125.94C70.76,-113.61 80.46,-96.67 92,-84.11 113.54,-60.69 119.72,-51.93 150,-42.11 187.69,-29.9 233.03,-47.09 259.27,-60.05\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"265.84,-63.4 258.17,-63.02 262.72,-61.81 259.6,-60.22 259.6,-60.22 259.6,-60.22 262.72,-61.81 261.03,-57.41 265.84,-63.4 265.84,-63.4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"150\" y=\"-60.91\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"160\" y=\"-45.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M150.14,-164.97C131.58,-160.42 101.61,-153.06 80.69,-147.93\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"73.71,-146.21 81.26,-144.82 77.11,-147.05 80.5,-147.88 80.5,-147.88 80.5,-147.88 77.11,-147.05 79.75,-150.94 73.71,-146.21 73.71,-146.21\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"96\" y=\"-163.91\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M161.02,-152.39C155.57,-139.91 146.18,-123.74 132,-116.11 116.34,-107.69 108.88,-110.53 92,-116.11 86.01,-118.1 80.21,-121.54 75.11,-125.29\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"69.47,-129.77 73,-122.95 72.22,-127.59 74.96,-125.41 74.96,-125.41 74.96,-125.41 72.22,-127.59 76.92,-127.88 69.47,-129.77 69.47,-129.77\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"94\" y=\"-134.91\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"104\" y=\"-119.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M158.43,-184.66C155.73,-195.02 158.92,-205.11 168,-205.11 174.95,-205.11 178.45,-199.2 178.5,-191.77\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"177.57,-184.66 181.6,-191.19 178.03,-188.13 178.48,-191.6 178.48,-191.6 178.48,-191.6 178.03,-188.13 175.35,-192 177.57,-184.66 177.57,-184.66\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"150\" y=\"-208.91\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M184.64,-161.3C205.18,-150.96 239.19,-133.53 244,-129.11 254.61,-119.38 263.51,-105.97 269.92,-94.6\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"273.41,-88.19 272.83,-95.85 271.74,-91.27 270.07,-94.34 270.07,-94.34 270.07,-94.34 271.74,-91.27 267.3,-92.84 273.41,-88.19 273.41,-88.19\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"204\" y=\"-168.91\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"216\" y=\"-153.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M380.58,-235.61C374.48,-239.18 367.13,-242.91 360,-245.11 335.24,-252.78 327.88,-249.78 302,-251.11 207.91,-255.97 166.22,-280.15 92,-222.11 74.71,-208.59 65.78,-184.78 61.29,-166.64\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"59.72,-159.75 64.35,-165.88 60.5,-163.16 61.27,-166.58 61.27,-166.58 61.27,-166.58 60.5,-163.16 58.2,-167.27 59.72,-159.75 59.72,-159.75\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"206\" y=\"-262.91\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M378.01,-228.79C343.16,-233.44 262.03,-239.88 204,-210.11 195.41,-205.71 188.06,-198.2 182.35,-190.8\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"177.94,-184.69 184.59,-188.52 179.99,-187.53 182.03,-190.37 182.03,-190.37 182.03,-190.37 179.99,-187.53 179.48,-192.21 177.94,-184.69 177.94,-184.69\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"262\" y=\"-235.91\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M379.17,-219.52C360.9,-212.19 329.79,-200.52 302,-194.11 259.24,-184.25 246.64,-192.49 204,-182.11 199.88,-181.11 195.59,-179.78 191.48,-178.34\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"184.78,-175.87 192.44,-175.34 188.07,-177.08 191.35,-178.29 191.35,-178.29 191.35,-178.29 188.07,-177.08 190.26,-181.25 184.78,-175.87 184.78,-175.87\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"278\" y=\"-212.91\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"274\" y=\"-197.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M269.68,-58.86C247.69,-34.8 197.19,12.18 150,-3.11 119.72,-12.93 111.14,-19.68 92,-45.11 75.72,-66.74 66.47,-96.65 61.61,-117.52\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"60.08,-124.5 58.51,-116.98 60.83,-121.08 61.58,-117.66 61.58,-117.66 61.58,-117.66 60.83,-121.08 64.66,-118.34 60.08,-124.5 60.08,-124.5\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"152\" y=\"-21.91\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"160\" y=\"-6.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M263.78,-73.26C246.78,-75.22 220.93,-80.57 204,-95.11 189.13,-107.88 180.13,-128.36 174.98,-144.54\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"172.88,-151.63 171.85,-144.03 173.88,-148.28 174.87,-144.92 174.87,-144.92 174.87,-144.92 173.88,-148.28 177.89,-145.82 172.88,-151.63 172.88,-151.63\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"206\" y=\"-113.91\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"<text text-anchor=\"start\" x=\"216\" y=\"-98.91\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M298.4,-80.34C315.63,-90.26 343.32,-108.47 360,-131.11 375.6,-152.29 384.92,-181.16 389.97,-201.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"391.65,-208.58 386.97,-202.49 390.84,-205.18 390.04,-201.77 390.04,-201.77 390.04,-201.77 390.84,-205.18 393.1,-201.05 391.65,-208.58 391.65,-208.58\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"320\" y=\"-134.91\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M272.19,-87.28C269.21,-97.78 272.48,-108.11 282,-108.11 289.29,-108.11 292.91,-102.06 292.87,-94.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"291.81,-87.28 295.95,-93.75 292.32,-90.74 292.83,-94.21 292.83,-94.21 292.83,-94.21 292.32,-90.74 289.71,-94.66 291.81,-87.28 291.81,-87.28\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"264\" y=\"-111.91\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe1381dadb0> >"
|
|
]
|
|
},
|
|
"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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"580pt\" height=\"360pt\"\n",
|
|
" viewBox=\"0.00 0.00 579.69 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(0.9259259259259258 0.9259259259259258) rotate(0) translate(4 386)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-386 624,-386 624,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"289.5\" y=\"-367.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"310.5\" y=\"-367.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"326.5\" y=\"-367.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"288.5\" y=\"-353.8\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-206C62,-206 50,-206 50,-206 44,-206 38,-200 38,-194 38,-194 38,-182 38,-182 38,-176 44,-170 50,-170 50,-170 62,-170 62,-170 68,-170 74,-176 74,-182 74,-182 74,-194 74,-194 74,-200 68,-206 62,-206\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-184.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-188C2.79,-188 17.15,-188 30.63,-188\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-188 30.94,-191.15 34.44,-188 30.94,-188 30.94,-188 30.94,-188 34.44,-188 30.94,-184.85 37.94,-188 37.94,-188\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.49,-206.15C48.49,-215.54 50.66,-224 56,-224 59.92,-224 62.14,-219.44 62.64,-213.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.51,-206.15 65.79,-213.1 62.57,-209.65 62.64,-213.15 62.64,-213.15 62.64,-213.15 62.57,-209.65 59.49,-213.21 62.51,-206.15 62.51,-206.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"38\" y=\"-227.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M164,-207C164,-207 152,-207 152,-207 146,-207 140,-201 140,-195 140,-195 140,-181 140,-181 140,-175 146,-169 152,-169 152,-169 164,-169 164,-169 170,-169 176,-175 176,-181 176,-181 176,-195 176,-195 176,-201 170,-207 164,-207\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"153.5\" y=\"-191.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"150\" y=\"-176.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.42,-188C90.48,-188 114.48,-188 132.48,-188\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"139.78,-188 132.78,-191.15 136.28,-188 132.78,-188 132.78,-188 132.78,-188 136.28,-188 132.78,-184.85 139.78,-188 139.78,-188\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-191.8\" font-family=\"Lato\" font-size=\"14.00\">a | !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M148.9,-207.04C147.64,-216.53 150.68,-225 158,-225 163.38,-225 166.44,-220.43 167.19,-214.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"167.1,-207.04 170.34,-214 167.14,-210.54 167.19,-214.04 167.19,-214.04 167.19,-214.04 167.14,-210.54 164.04,-214.08 167.1,-207.04 167.1,-207.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"142\" y=\"-228.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M274,-293C274,-293 262,-293 262,-293 256,-293 250,-287 250,-281 250,-281 250,-269 250,-269 250,-263 256,-257 262,-257 262,-257 274,-257 274,-257 280,-257 286,-263 286,-269 286,-269 286,-281 286,-281 286,-287 280,-293 274,-293\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"268\" y=\"-271.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M164.8,-207.13C170.16,-221.69 179.51,-241.16 194,-253 207.83,-264.3 227.36,-269.8 242.74,-272.47\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"249.91,-273.57 242.52,-275.62 246.45,-273.04 242.99,-272.51 242.99,-272.51 242.99,-272.51 246.45,-273.04 243.47,-269.4 249.91,-273.57 249.91,-273.57\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"194\" y=\"-272.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M390,-242C390,-242 378,-242 378,-242 372,-242 366,-236 366,-230 366,-230 366,-218 366,-218 366,-212 372,-206 378,-206 378,-206 390,-206 390,-206 396,-206 402,-212 402,-218 402,-218 402,-230 402,-230 402,-236 396,-242 390,-242\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"384\" y=\"-220.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->5 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M176.3,-185.77C201.23,-183.04 248.6,-179.6 288,-187 313.25,-191.74 340.42,-203.01 359.2,-211.87\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"365.72,-215.01 358.05,-214.81 362.57,-213.49 359.42,-211.97 359.42,-211.97 359.42,-211.97 362.57,-213.49 360.78,-209.13 365.72,-215.01 365.72,-215.01\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"262.5\" y=\"-190.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M249.86,-282.67C234.86,-288.31 212.62,-294.02 194,-288 147.7,-273.03 104.09,-235.72 78.99,-211.15\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"73.92,-206.11 81.11,-208.81 76.4,-208.58 78.88,-211.04 78.88,-211.04 78.88,-211.04 76.4,-208.58 76.66,-213.28 73.92,-206.11 73.92,-206.11\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"140\" y=\"-283.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M253.09,-256.93C246.62,-249.27 238.48,-240.59 230,-234 215.72,-222.89 209.22,-224.78 194,-215 189.92,-212.38 185.73,-209.41 181.72,-206.42\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"176.02,-202.07 183.49,-203.81 178.8,-204.19 181.58,-206.31 181.58,-206.31 181.58,-206.31 178.8,-204.19 179.67,-208.82 176.02,-202.07 176.02,-202.07\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"196\" y=\"-237.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M257.87,-293.15C256.31,-302.54 259.69,-311 268,-311 274.1,-311 277.55,-306.44 278.33,-300.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"278.13,-293.15 281.47,-300.06 278.23,-296.65 278.32,-300.15 278.32,-300.15 278.32,-300.15 278.23,-296.65 275.18,-300.24 278.13,-293.15 278.13,-293.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"250\" y=\"-314.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M286.29,-266.99C292.5,-264.13 299.55,-260.9 306,-258 323.79,-249.98 343.98,-241.08 359.21,-234.39\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"365.84,-231.49 360.69,-237.18 362.64,-232.89 359.43,-234.3 359.43,-234.3 359.43,-234.3 362.64,-232.89 358.17,-231.41 365.84,-231.49 365.84,-231.49\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"306\" y=\"-261.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->0 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>5->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M371.42,-242.24C364.48,-252.74 355.23,-265.99 346,-277 322.59,-304.94 321.68,-321.05 288,-335 271.58,-341.8 265.55,-337.85 248,-335 169.85,-322.32 139.47,-312.36 92,-249 83.49,-237.65 75.5,-224.03 69.3,-212.55\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"65.87,-206.07 71.93,-210.78 67.51,-209.16 69.15,-212.25 69.15,-212.25 69.15,-212.25 67.51,-209.16 66.36,-213.73 65.87,-206.07 65.87,-206.07\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"194\" y=\"-334.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->1 -->\n",
|
|
"<g id=\"edge20\" class=\"edge\">\n",
|
|
"<title>5->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M365.74,-221.23C326.18,-214.87 228.91,-199.24 183.32,-191.91\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"176.2,-190.77 183.62,-188.77 179.66,-191.32 183.12,-191.88 183.12,-191.88 183.12,-191.88 179.66,-191.32 182.62,-194.99 176.2,-190.77 176.2,-190.77\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"252\" y=\"-211.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M608,-179C608,-179 596,-179 596,-179 590,-179 584,-173 584,-167 584,-167 584,-155 584,-155 584,-149 590,-143 596,-143 596,-143 608,-143 608,-143 614,-143 620,-149 620,-155 620,-155 620,-167 620,-167 620,-173 614,-179 608,-179\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"602\" y=\"-157.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge21\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M402.31,-218.95C440.72,-207.75 533.12,-180.8 577.04,-167.99\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"583.91,-165.99 578.07,-170.97 580.55,-166.97 577.19,-167.95 577.19,-167.95 577.19,-167.95 580.55,-166.97 576.3,-164.92 583.91,-165.99 583.91,-165.99\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"480\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M504,-69C504,-69 492,-69 492,-69 486,-69 480,-63 480,-57 480,-57 480,-45 480,-45 480,-39 486,-33 492,-33 492,-33 504,-33 504,-33 510,-33 516,-39 516,-45 516,-45 516,-57 516,-57 516,-63 510,-69 504,-69\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"498\" y=\"-47.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge22\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M396.02,-205.79C403.29,-193.84 413.09,-177.92 422,-164 441.72,-133.18 465.13,-98.14 480.49,-75.36\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"484.6,-69.27 483.29,-76.84 482.64,-72.18 480.68,-75.08 480.68,-75.08 480.68,-75.08 482.64,-72.18 478.07,-73.31 484.6,-69.27 484.6,-69.27\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"422\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M598.28,-142.84C590.83,-100.74 566,0 499,0 157,0 157,0 157,0 84.06,0 64.15,-111.67 58.86,-162.88\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"58.18,-169.97 55.71,-162.71 58.51,-166.49 58.85,-163.01 58.85,-163.01 58.85,-163.01 58.51,-166.49 61.98,-163.31 58.18,-169.97 58.18,-169.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"308\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M583.94,-158.23C557.79,-154.15 506.17,-146.69 462,-144 342.16,-136.7 311.35,-152.6 194,-178 190.46,-178.77 186.76,-179.69 183.13,-180.66\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"176.33,-182.56 182.23,-177.64 179.7,-181.62 183.07,-180.68 183.07,-180.68 183.07,-180.68 179.7,-181.62 183.92,-183.71 176.33,-182.56 176.33,-182.56\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"364\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M595.24,-179.12C589.78,-193.74 580.27,-213.96 566,-227 548.21,-243.26 539.22,-241.53 516,-248 436.65,-270.12 338.25,-274.26 293.37,-274.94\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"286.13,-275.03 293.09,-271.79 289.63,-274.98 293.13,-274.94 293.13,-274.94 293.13,-274.94 289.63,-274.98 293.17,-278.09 286.13,-275.03 286.13,-275.03\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"426\" y=\"-268.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M591.91,-179.3C585.96,-189.23 577.21,-200.73 566,-207 515.98,-234.98 445.86,-231.82 409.31,-227.62\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"402.04,-226.72 409.38,-224.45 405.52,-227.15 408.99,-227.58 408.99,-227.58 408.99,-227.58 405.52,-227.15 408.6,-230.7 402.04,-226.72 402.04,-226.72\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"480\" y=\"-232.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->0 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>4->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M479.93,-49.76C457.98,-48.28 418.67,-46 385,-46 157,-46 157,-46 157,-46 100.54,-46 73.17,-121.98 62.55,-162.78\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"60.81,-169.73 59.45,-162.17 61.66,-166.33 62.51,-162.94 62.51,-162.94 62.51,-162.94 61.66,-166.33 65.56,-163.7 60.81,-169.73 60.81,-169.73\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"248\" y=\"-49.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->1 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>4->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M479.96,-55.59C474.26,-57.07 467.87,-58.67 462,-60 343.6,-86.91 289.57,-38.11 194,-113 178.56,-125.1 169.64,-145.62 164.67,-162.14\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"162.77,-168.94 161.62,-161.35 163.71,-165.57 164.65,-162.19 164.65,-162.19 164.65,-162.19 163.71,-165.57 167.69,-163.04 162.77,-168.94 162.77,-168.94\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"308\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->3 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>4->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M516.2,-61.08C530.72,-70.19 551.4,-84.65 566,-101 575.4,-111.53 583.52,-124.97 589.57,-136.46\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"592.88,-142.96 586.9,-138.16 591.29,-139.85 589.7,-136.73 589.7,-136.73 589.7,-136.73 591.29,-139.85 592.51,-135.3 592.88,-142.96 592.88,-142.96\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"534\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M488.59,-69.15C487.15,-78.54 490.28,-87 498,-87 503.67,-87 506.87,-82.44 507.59,-76.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"507.41,-69.15 510.74,-76.07 507.5,-72.65 507.59,-76.15 507.59,-76.15 507.59,-76.15 507.5,-72.65 504.44,-76.23 507.41,-69.15 507.41,-69.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"480\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138232030> >"
|
|
]
|
|
},
|
|
"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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Title: & | F G a F b F G c Pages: 1 -->\n",
|
|
"<svg width=\"729pt\" height=\"272pt\"\n",
|
|
" viewBox=\"0.00 0.00 729.00 271.77\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(0.9174311926605504 0.9174311926605504) rotate(0) translate(4 292)\">\n",
|
|
"<title>& | F G a F b F G c</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-292 790,-292 790,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"278.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"305.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"321.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"363.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"379.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"425.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"441.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"483.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"499.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"365.5\" y=\"-259.8\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M74,-194C74,-194 50,-194 50,-194 44,-194 38,-188 38,-182 38,-182 38,-170 38,-170 38,-164 44,-158 50,-158 50,-158 74,-158 74,-158 80,-158 86,-164 86,-170 86,-170 86,-182 86,-182 86,-188 80,-194 74,-194\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"57.5\" y=\"-179.8\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
|
|
"<text text-anchor=\"start\" x=\"46\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"62\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->5 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.04,-176C1.93,-176 16.35,-176 30.83,-176\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.88,-176 30.88,-179.15 34.38,-176 30.88,-176 30.88,-176 30.88,-176 34.38,-176 30.88,-172.85 37.88,-176 37.88,-176\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5->5 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>5->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M54.4,-194.15C53.23,-203.54 55.77,-212 62,-212 66.58,-212 69.16,-207.44 69.75,-201.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"69.6,-194.15 72.89,-201.09 69.67,-197.65 69.74,-201.15 69.74,-201.15 69.74,-201.15 69.67,-197.65 66.59,-201.22 69.6,-194.15 69.6,-194.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"9.5\" y=\"-215.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M679,-166C679,-166 655,-166 655,-166 649,-166 643,-160 643,-154 643,-154 643,-142 643,-142 643,-136 649,-130 655,-130 655,-130 679,-130 679,-130 685,-130 691,-136 691,-142 691,-142 691,-154 691,-154 691,-160 685,-166 679,-166\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"662.5\" y=\"-151.8\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
|
"<text text-anchor=\"start\" x=\"651\" y=\"-137.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"667\" y=\"-137.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.25,-179.69C121.55,-184.95 190.8,-194 250,-194 250,-194 250,-194 573,-194 596.42,-194 620.04,-182.13 637.62,-170.45\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"643.81,-166.18 639.84,-172.75 640.93,-168.17 638.05,-170.16 638.05,-170.16 638.05,-170.16 640.93,-168.17 636.26,-167.56 643.81,-166.18 643.81,-166.18\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"373\" y=\"-197.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M774,-204C774,-204 750,-204 750,-204 744,-204 738,-198 738,-192 738,-192 738,-180 738,-180 738,-174 744,-168 750,-168 750,-168 774,-168 774,-168 780,-168 786,-174 786,-180 786,-180 786,-192 786,-192 786,-198 780,-204 774,-204\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"757.5\" y=\"-189.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"746\" y=\"-175.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"762\" y=\"-175.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.19,-191.83C91.85,-195.2 98,-198.5 104,-201 165.69,-226.7 183.17,-237 250,-237 250,-237 250,-237 668,-237 693.31,-237 718.26,-222.3 735.93,-208.68\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"741.63,-204.12 738.13,-210.95 738.9,-206.31 736.16,-208.49 736.16,-208.49 736.16,-208.49 738.9,-206.31 734.2,-206.03 741.63,-204.12 741.63,-204.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"465.5\" y=\"-240.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M263,-133C263,-133 239,-133 239,-133 233,-133 227,-127 227,-121 227,-121 227,-109 227,-109 227,-103 233,-97 239,-97 239,-97 263,-97 263,-97 269,-97 275,-103 275,-109 275,-109 275,-121 275,-121 275,-127 269,-133 263,-133\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"246.5\" y=\"-118.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"235\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"251\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.4,-169.64C92.15,-168.1 98.29,-166.47 104,-165 150.55,-152.99 164.46,-157.11 209,-139 212.82,-137.45 216.71,-135.59 220.5,-133.6\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"226.74,-130.16 222.13,-136.29 223.68,-131.85 220.61,-133.53 220.61,-133.53 220.61,-133.53 223.68,-131.85 219.09,-130.77 226.74,-130.16 226.74,-130.16\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"126.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M403,-87C403,-87 379,-87 379,-87 373,-87 367,-81 367,-75 367,-75 367,-63 367,-63 367,-57 373,-51 379,-51 379,-51 403,-51 403,-51 409,-51 415,-57 415,-63 415,-63 415,-75 415,-75 415,-81 409,-87 403,-87\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"386.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"375\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"391\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M378.34,-87.15C376.39,-96.54 380.61,-105 391,-105 398.63,-105 402.93,-100.44 403.91,-94.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"403.66,-87.15 407.05,-94.04 403.78,-90.65 403.91,-94.15 403.91,-94.15 403.91,-94.15 403.78,-90.65 400.76,-94.26 403.66,-87.15 403.66,-87.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"375.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M584,-36C584,-36 560,-36 560,-36 554,-36 548,-30 548,-24 548,-24 548,-12 548,-12 548,-6 554,0 560,0 560,0 584,0 584,0 590,0 596,-6 596,-12 596,-12 596,-24 596,-24 596,-30 590,-36 584,-36\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"567.5\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"556\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"572\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M415.03,-62.44C447.17,-53.28 505.49,-36.67 540.99,-26.55\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"547.77,-24.62 541.9,-29.57 544.4,-25.58 541.04,-26.54 541.04,-26.54 541.04,-26.54 544.4,-25.58 540.17,-23.51 547.77,-24.62 547.77,-24.62\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"464\" y=\"-60.8\" font-family=\"Lato\" font-size=\"14.00\">!a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M415.27,-73.5C453.48,-81.15 531.72,-97.94 596,-119 609.4,-123.39 623.84,-129.18 636.11,-134.44\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"642.68,-137.29 635.01,-137.39 639.47,-135.9 636.26,-134.51 636.26,-134.51 636.26,-134.51 639.47,-135.9 637.52,-131.62 642.68,-137.29 642.68,-137.29\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"566.5\" y=\"-122.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M563.68,-36.15C562.4,-45.54 565.17,-54 572,-54 577.01,-54 579.84,-49.44 580.48,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"580.32,-36.15 583.63,-43.08 580.4,-39.65 580.48,-43.15 580.48,-43.15 580.48,-43.15 580.4,-39.65 577.33,-43.22 580.32,-36.15 580.32,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"568.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M591.17,-36.21C601.68,-47.23 614.8,-61.84 625,-76 635.86,-91.08 646.21,-109.28 653.79,-123.61\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"657.07,-129.89 651.03,-125.15 655.45,-126.79 653.83,-123.69 653.83,-123.69 653.83,-123.69 655.45,-126.79 656.62,-122.23 657.07,-129.89 657.07,-129.89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"614\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M658.68,-166.15C657.4,-175.54 660.17,-184 667,-184 672.01,-184 674.84,-179.44 675.48,-173.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"675.32,-166.15 678.63,-173.08 675.4,-169.65 675.48,-173.15 675.48,-173.15 675.48,-173.15 675.4,-169.65 672.33,-173.22 675.32,-166.15 675.32,-166.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"661.5\" y=\"-187.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>4->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M691.47,-157.59C703.56,-162.53 718.44,-168.61 731.33,-173.88\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"737.86,-176.55 730.19,-176.81 734.62,-175.22 731.38,-173.9 731.38,-173.9 731.38,-173.9 734.62,-175.22 732.57,-170.98 737.86,-176.55 737.86,-176.55\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"711\" y=\"-171.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M746.15,-167.8C739.08,-160.53 729.99,-152.95 720,-149 713.26,-146.33 705.64,-145.24 698.35,-145\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"691.21,-145.01 698.21,-141.85 694.71,-145 698.21,-145 698.21,-145 698.21,-145 694.71,-145 698.22,-148.15 691.21,-145.01 691.21,-145.01\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"709\" y=\"-152.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M753.68,-204.15C752.4,-213.54 755.17,-222 762,-222 767.01,-222 769.84,-217.44 770.48,-211.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"770.32,-204.15 773.63,-211.08 770.4,-207.65 770.48,-211.15 770.48,-211.15 770.48,-211.15 770.4,-207.65 767.33,-211.22 770.32,-204.15 770.32,-204.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"758.5\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M226.97,-110.91C196.83,-106.73 143.26,-103.44 104,-124 92.17,-130.2 82.63,-141.48 75.74,-151.96\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"71.99,-157.99 73.01,-150.38 73.84,-155.02 75.69,-152.04 75.69,-152.04 75.69,-152.04 73.84,-155.02 78.36,-153.7 71.99,-157.99 71.99,-157.99\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"104\" y=\"-127.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M275.1,-107.3C298.38,-99.54 334.43,-87.52 359.93,-79.02\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"366.83,-76.72 361.18,-81.93 363.51,-77.83 360.19,-78.94 360.19,-78.94 360.19,-78.94 363.51,-77.83 359.19,-75.95 366.83,-76.72 366.83,-76.72\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"293\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M275.3,-118.24C298.51,-121.37 335.16,-126.05 367,-129 464.94,-138.06 581.34,-144.1 635.48,-146.64\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"642.7,-146.98 635.56,-149.8 639.21,-146.81 635.71,-146.65 635.71,-146.65 635.71,-146.65 639.21,-146.81 635.86,-143.51 642.7,-146.98 642.7,-146.98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"433\" y=\"-143.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M238.34,-133.15C236.39,-142.54 240.61,-151 251,-151 258.63,-151 262.93,-146.44 263.91,-140.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"263.66,-133.15 267.05,-140.04 263.78,-136.65 263.91,-140.15 263.91,-140.15 263.91,-140.15 263.78,-136.65 260.76,-140.26 263.66,-133.15 263.66,-133.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"221\" y=\"-154.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe1382323f0> >"
|
|
]
|
|
},
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"large = spot.automaton('''\n",
|
|
"HOA: v1 States: 6 properties: implicit-labels trans-labels no-univ-branch\n",
|
|
"deterministic complete stutter-invariant tool: \"ltl2dstar\" \"0.5.4\"\n",
|
|
"name: \"& | F G a F b F G c\" comment: \"Safra[NBA=4]\" acc-name: Rabin 2\n",
|
|
"Acceptance: 4 (Fin(0)&Inf(1))|(Fin(2)&Inf(3)) Start: 5 AP: 3 \"a\" \"b\"\n",
|
|
"\"c\" --BODY-- State: 0 {1 3} 4 4 4 4 1 0 1 0 State: 1 {0 3} 4 4 4 4 1 1\n",
|
|
"1 1 State: 2 {1 2} 4 4 4 4 2 2 2 2 State: 3 {1 2} 5 5 4 4 5 3 4 0 State:\n",
|
|
"4 {0 2} 4 4 4 4 2 2 2 2 State: 5 {0 2} 5 5 4 4 5 3 2 2 --END--''')\n",
|
|
"large.merge_edges()\n",
|
|
"large"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"It can be minimized as a 2-state transition-based Rabin automaton:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"253pt\" height=\"236pt\"\n",
|
|
" viewBox=\"0.00 0.00 253.00 235.97\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 231.97)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-231.97 249,-231.97 249,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"8\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"35\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"51\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"93\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"109\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"155\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"171\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"213\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"229\" y=\"-213.77\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"95\" y=\"-199.77\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"60.25\" cy=\"-31.97\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"60.25\" y=\"-28.27\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M5.4,-31.97C7.04,-31.97 21.4,-31.97 34.88,-31.97\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"42.19,-31.97 35.19,-35.12 38.69,-31.97 35.19,-31.97 35.19,-31.97 35.19,-31.97 38.69,-31.97 35.19,-28.82 42.19,-31.97 42.19,-31.97\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M58.08,-50.12C57.75,-59.51 58.47,-67.97 60.25,-67.97 61.56,-67.97 62.3,-63.41 62.46,-57.27\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.42,-50.12 65.61,-57.11 62.44,-53.62 62.46,-57.12 62.46,-57.12 62.46,-57.12 62.44,-53.62 59.31,-57.14 62.42,-50.12 62.42,-50.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"28.25\" y=\"-86.77\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"52.25\" y=\"-71.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M56.88,-49.88C54.62,-70.97 55.75,-97.97 60.25,-97.97 64.26,-97.97 65.59,-76.56 64.24,-56.97\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"63.62,-49.88 67.37,-56.58 63.93,-53.37 64.23,-56.85 64.23,-56.85 64.23,-56.85 63.93,-53.37 61.09,-57.13 63.62,-49.88 63.62,-49.88\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"40.25\" y=\"-115.77\" font-family=\"Lato\" font-size=\"14.00\">!b & !c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"44.25\" y=\"-101.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"60.25\" y=\"-101.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M56.14,-49.56C51.57,-79.76 52.94,-125.97 60.25,-125.97 67.02,-125.97 68.7,-86.37 65.28,-56.52\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"64.36,-49.56 68.4,-56.09 64.82,-53.03 65.28,-56.5 65.28,-56.5 65.28,-56.5 64.82,-53.03 62.16,-56.91 64.36,-49.56 64.36,-49.56\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"30.25\" y=\"-144.77\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"52.25\" y=\"-129.77\" 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=\"black\" cx=\"168.25\" cy=\"-31.97\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"168.25\" y=\"-28.27\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M78.31,-34.32C84,-34.99 90.39,-35.64 96.25,-35.97 112.22,-36.88 116.28,-36.88 132.25,-35.97 135.73,-35.77 139.4,-35.47 142.99,-35.11\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"150.19,-34.32 143.58,-38.21 146.71,-34.7 143.24,-35.08 143.24,-35.08 143.24,-35.08 146.71,-34.7 142.89,-31.95 150.19,-34.32 150.19,-34.32\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"96.25\" y=\"-53.77\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"98.25\" y=\"-39.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"114.25\" y=\"-39.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M73.24,-18.98C79.47,-13.2 87.59,-7.01 96.25,-3.97 111.35,1.32 117.15,1.32 132.25,-3.97 138.61,-6.2 144.68,-10.13 149.92,-14.36\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"155.26,-18.98 147.9,-16.78 152.61,-16.69 149.97,-14.4 149.97,-14.4 149.97,-14.4 152.61,-16.69 152.03,-12.02 155.26,-18.98 155.26,-18.98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"98.25\" y=\"-21.77\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"98.25\" y=\"-7.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"114.25\" y=\"-7.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M165.01,-49.75C164.46,-59.29 165.54,-67.97 168.25,-67.97 170.24,-67.97 171.35,-63.29 171.58,-57.02\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"171.49,-49.75 174.73,-56.71 171.53,-53.25 171.58,-56.75 171.58,-56.75 171.58,-56.75 171.53,-53.25 168.43,-56.79 171.49,-49.75 171.49,-49.75\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"162.75\" y=\"-85.77\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"152.25\" y=\"-71.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"168.25\" y=\"-71.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M163.19,-49.57C159.81,-70.1 161.5,-95.97 168.25,-95.97 174.24,-95.97 176.24,-75.63 174.26,-56.7\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"173.31,-49.57 177.36,-56.09 173.78,-53.04 174.24,-56.5 174.24,-56.5 174.24,-56.5 173.78,-53.04 171.12,-56.92 173.31,-49.57 173.31,-49.57\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"95.75\" y=\"-113.77\" font-family=\"Lato\" font-size=\"14.00\">(!a & b & c) | (a & !b & c)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"152.25\" y=\"-99.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"168.25\" y=\"-99.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M162.18,-48.95C155.21,-78.65 157.23,-123.97 168.25,-123.97 178.41,-123.97 180.92,-85.45 175.79,-56.17\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"174.32,-48.95 178.8,-55.18 175.02,-52.38 175.72,-55.81 175.72,-55.81 175.72,-55.81 175.02,-52.38 172.63,-56.43 174.32,-48.95 174.32,-48.95\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"95.75\" y=\"-141.77\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b & c) | (a & b & c)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"152.25\" y=\"-127.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"168.25\" y=\"-127.77\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe1382325d0> >"
|
|
]
|
|
},
|
|
"execution_count": 7,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"small = spot.sat_minimize(large); small"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Or as a 4-state state-based Rabin automaton:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"511pt\" height=\"203pt\"\n",
|
|
" viewBox=\"0.00 0.00 511.00 203.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.0 1.0) rotate(0) translate(4 199)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-199 507,-199 507,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"137\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"164\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"180\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"222\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"238\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"284\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"300\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"342\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"358\" y=\"-180.8\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"224\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M74,-105C74,-105 50,-105 50,-105 44,-105 38,-99 38,-93 38,-93 38,-81 38,-81 38,-75 44,-69 50,-69 50,-69 74,-69 74,-69 80,-69 86,-75 86,-81 86,-81 86,-93 86,-93 86,-99 80,-105 74,-105\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"57.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"46\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"62\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.04,-87C1.93,-87 16.35,-87 30.83,-87\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.88,-87 30.88,-90.15 34.38,-87 30.88,-87 30.88,-87 30.88,-87 34.38,-87 30.88,-83.85 37.88,-87 37.88,-87\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M54.4,-105.15C53.23,-114.54 55.77,-123 62,-123 66.58,-123 69.16,-118.44 69.75,-112.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"69.6,-105.15 72.89,-112.09 69.67,-108.65 69.74,-112.15 69.74,-112.15 69.74,-112.15 69.67,-108.65 66.59,-112.22 69.6,-105.15 69.6,-105.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"9.5\" y=\"-126.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M359,-89C359,-89 347,-89 347,-89 341,-89 335,-83 335,-77 335,-77 335,-63 335,-63 335,-57 341,-51 347,-51 347,-51 359,-51 359,-51 365,-51 371,-57 371,-63 371,-63 371,-77 371,-77 371,-83 365,-89 359,-89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"348.5\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"345\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.35,-91.02C92.1,-91.84 98.26,-92.58 104,-93 150.54,-96.39 162.48,-96.72 209,-93 251.11,-89.64 299.53,-80.78 327.85,-75.09\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"334.94,-73.65 328.71,-78.13 331.51,-74.35 328.08,-75.05 328.08,-75.05 328.08,-75.05 331.51,-74.35 327.45,-71.96 334.94,-73.65 334.94,-73.65\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"229\" y=\"-94.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M491,-97C491,-97 467,-97 467,-97 461,-97 455,-91 455,-85 455,-85 455,-73 455,-73 455,-67 461,-61 467,-61 467,-61 491,-61 491,-61 497,-61 503,-67 503,-73 503,-73 503,-85 503,-85 503,-91 497,-97 491,-97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"474.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"463\" y=\"-68.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"479\" y=\"-68.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.22,-100.78C91.87,-103.6 98.02,-106.24 104,-108 218.26,-141.64 254.93,-157.71 371,-131 398.91,-124.58 427.97,-109.86 448.76,-97.71\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"454.93,-94.04 450.53,-100.33 451.92,-95.83 448.92,-97.62 448.92,-97.62 448.92,-97.62 451.92,-95.83 447.3,-94.91 454.93,-94.04 454.93,-94.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"281\" y=\"-147.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M251,-38C251,-38 239,-38 239,-38 233,-38 227,-32 227,-26 227,-26 227,-12 227,-12 227,-6 233,0 239,0 239,0 251,0 251,0 257,0 263,-6 263,-12 263,-12 263,-26 263,-26 263,-32 257,-38 251,-38\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"237\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.23,-80.94C121.58,-71.55 187.1,-53.5 209,-43 213.01,-41.08 217.08,-38.73 220.95,-36.26\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"226.84,-32.32 222.77,-38.83 223.93,-34.27 221.02,-36.21 221.02,-36.21 221.02,-36.21 223.93,-34.27 219.27,-33.59 226.84,-32.32 226.84,-32.32\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"126.5\" y=\"-78.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M343.17,-89.04C341.81,-98.53 345.09,-107 353,-107 358.81,-107 362.12,-102.43 362.93,-96.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"362.83,-89.04 366.08,-95.99 362.88,-92.54 362.93,-96.04 362.93,-96.04 362.93,-96.04 362.88,-92.54 359.78,-96.08 362.83,-89.04 362.83,-89.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"321\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M371.28,-64.64C376.88,-63.15 383.15,-61.74 389,-61 410.16,-58.32 416.12,-56.62 437,-61 440.71,-61.78 444.49,-62.91 448.19,-64.24\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"454.71,-66.8 447.04,-67.17 451.45,-65.52 448.19,-64.24 448.19,-64.24 448.19,-64.24 451.45,-65.52 449.34,-61.31 454.71,-66.8 454.71,-66.8\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"389\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">a | !b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M454.89,-79.08C436.89,-78.94 411.3,-78.28 389,-76 385.41,-75.63 381.64,-75.12 377.95,-74.55\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"371.03,-73.4 378.45,-71.44 374.48,-73.97 377.93,-74.55 377.93,-74.55 377.93,-74.55 374.48,-73.97 377.41,-77.65 371.03,-73.4 371.03,-73.4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"407.5\" y=\"-81.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M467.06,-97.15C465.22,-106.54 469.2,-115 479,-115 486.19,-115 490.25,-110.44 491.17,-104.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"490.94,-97.15 494.32,-104.05 491.05,-100.65 491.17,-104.15 491.17,-104.15 491.17,-104.15 491.05,-100.65 488.02,-104.25 490.94,-97.15 490.94,-97.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.5\" y=\"-118.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M226.7,-14.83C198.84,-9.1 143.16,-1.85 104,-24 89.26,-32.34 78.93,-48.41 72.32,-62.23\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"69.38,-68.8 69.37,-61.12 70.81,-65.6 72.25,-62.41 72.25,-62.41 72.25,-62.41 70.81,-65.6 75.12,-63.7 69.38,-68.8 69.38,-68.8\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"104\" y=\"-27.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M263.03,-27.19C280.7,-35.69 308.46,-49.05 328.27,-58.58\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"334.66,-61.66 326.99,-61.46 331.51,-60.14 328.35,-58.62 328.35,-58.62 328.35,-58.62 331.51,-60.14 329.72,-55.78 334.66,-61.66 334.66,-61.66\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"281\" y=\"-55.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M263.24,-18.36C287.58,-17.84 333.28,-18.32 371,-27 401.89,-34.11 408.71,-39.7 437,-54 440.91,-55.97 444.93,-58.19 448.87,-60.47\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"454.95,-64.06 447.32,-63.21 451.94,-62.28 448.93,-60.5 448.93,-60.5 448.93,-60.5 451.94,-62.28 450.53,-57.79 454.95,-64.06 454.95,-64.06\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"337\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M235.17,-38.04C233.81,-47.53 237.09,-56 245,-56 250.81,-56 254.12,-51.43 254.93,-45.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"254.83,-38.04 258.08,-44.99 254.88,-41.54 254.93,-45.04 254.93,-45.04 254.93,-45.04 254.88,-41.54 251.78,-45.08 254.83,-38.04 254.83,-38.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe1382327e0> >"
|
|
]
|
|
},
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, state_based=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"But do we really need 2 Rabin pairs? Let's ask if we can get an equivalent with only one pair. (Note that reducing the number of pairs might require more state, but the `sat_minimize()` function will never attempt to add state unless explicitly instructed to do so. In this case we are therefore looking for a state-based Rabin-1 automaton with at most 4 states.)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"581pt\" height=\"196pt\"\n",
|
|
" viewBox=\"0.00 0.00 580.50 196.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.0 1.0) rotate(0) translate(4 192)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-192 576.5,-192 576.5,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"235.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"258.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"274.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"316.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"332.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"258.75\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 1]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-98C62,-98 50,-98 50,-98 44,-98 38,-92 38,-86 38,-86 38,-72 38,-72 38,-66 44,-60 50,-60 50,-60 62,-60 62,-60 68,-60 74,-66 74,-72 74,-72 74,-86 74,-86 74,-92 68,-98 62,-98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-79C2.79,-79 17.15,-79 30.63,-79\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-79 30.94,-82.15 34.44,-79 30.94,-79 30.94,-79 30.94,-79 34.44,-79 30.94,-75.85 37.94,-79 37.94,-79\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M266,-89C266,-89 254,-89 254,-89 248,-89 242,-83 242,-77 242,-77 242,-63 242,-63 242,-57 248,-51 254,-51 254,-51 266,-51 266,-51 272,-51 278,-57 278,-63 278,-63 278,-77 278,-77 278,-83 272,-89 266,-89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"255.5\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"252\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.17,-68.12C79.65,-65.22 85.89,-62.48 92,-61 141.59,-49 201.78,-57.71 234.66,-64.36\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"241.63,-65.82 234.13,-67.47 238.21,-65.1 234.78,-64.38 234.78,-64.38 234.78,-64.38 238.21,-65.1 235.43,-61.3 241.63,-65.82 241.63,-65.82\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"138.5\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M545,-106C545,-106 533,-106 533,-106 527,-106 521,-100 521,-94 521,-94 521,-80 521,-80 521,-74 527,-68 533,-68 533,-68 545,-68 545,-68 551,-68 557,-74 557,-80 557,-80 557,-94 557,-94 557,-100 551,-106 545,-106\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"534.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"531\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.12,-88.69C79.71,-91.62 86.02,-94.66 92,-97 144.83,-117.63 158.8,-123.38 215,-131 342.57,-148.31 378.44,-132.53 503,-100 506.59,-99.06 510.33,-97.89 513.97,-96.64\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"520.77,-94.18 515.26,-99.52 517.48,-95.37 514.19,-96.56 514.19,-96.56 514.19,-96.56 517.48,-95.37 513.12,-93.6 520.77,-94.18 520.77,-94.18\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"323\" y=\"-140.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M429,-38C429,-38 417,-38 417,-38 411,-38 405,-32 405,-26 405,-26 405,-12 405,-12 405,-6 411,0 417,0 417,0 429,0 429,0 435,0 441,-6 441,-12 441,-12 441,-26 441,-26 441,-32 435,-38 429,-38\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"418.5\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"415\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.05,-62.66C79.43,-58.28 85.65,-53.94 92,-51 197.22,-2.27 341.2,-10.42 397.77,-16.1\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"404.85,-16.85 397.56,-19.25 401.37,-16.48 397.89,-16.11 397.89,-16.11 397.89,-16.11 401.37,-16.48 398.22,-12.98 404.85,-16.85 404.85,-16.85\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M241.92,-72C229.48,-73.37 212.22,-75.1 197,-76 156.45,-78.39 109.2,-78.94 81.27,-79.03\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.26,-79.05 81.25,-75.88 77.76,-79.04 81.26,-79.03 81.26,-79.03 81.26,-79.03 77.76,-79.04 81.27,-82.18 74.26,-79.05 74.26,-79.05\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-81.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M242.9,-89.04C240.53,-98.53 246.23,-107 260,-107 270.11,-107 275.87,-102.43 277.28,-96.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"277.1,-89.04 280.43,-95.96 277.19,-92.54 277.28,-96.04 277.28,-96.04 277.28,-96.04 277.19,-92.54 274.13,-96.11 277.1,-89.04 277.1,-89.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M278.19,-71.79C312.51,-75.26 392,-82.87 459,-86 477.25,-86.85 497.9,-87.09 513.51,-87.12\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"520.73,-87.12 513.73,-90.27 517.23,-87.12 513.73,-87.12 513.73,-87.12 513.73,-87.12 517.23,-87.12 513.73,-83.97 520.73,-87.12 520.73,-87.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"405\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M278.23,-65.18C302.59,-58.27 348.45,-44.96 387,-32 390.69,-30.76 394.57,-29.39 398.35,-28.01\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"404.99,-25.56 399.51,-30.94 401.7,-26.78 398.42,-27.99 398.42,-27.99 398.42,-27.99 401.7,-26.78 397.33,-25.03 404.99,-25.56 404.99,-25.56\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"339\" y=\"-54.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M528.45,-106.04C526.99,-115.53 530.5,-124 539,-124 545.24,-124 548.79,-119.43 549.66,-113.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"549.55,-106.04 552.81,-112.99 549.61,-109.54 549.66,-113.04 549.66,-113.04 549.66,-113.04 549.61,-109.54 546.51,-113.08 549.55,-106.04 549.55,-106.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"505.5\" y=\"-127.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M520.78,-78.01C504.6,-69.41 479.82,-55.9 459,-43 455.14,-40.61 451.1,-37.97 447.2,-35.35\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"441.24,-31.29 448.79,-32.63 444.13,-33.26 447.02,-35.23 447.02,-35.23 447.02,-35.23 444.13,-33.26 445.25,-37.83 441.24,-31.29 441.24,-31.29\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"459\" y=\"-70.8\" font-family=\"Lato\" font-size=\"14.00\">a | b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M441.15,-15.63C458.2,-13.24 484.41,-12.26 503,-24 516.24,-32.37 524.9,-47.61 530.3,-61.01\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"532.82,-67.8 527.43,-62.34 531.6,-64.53 530.38,-61.25 530.38,-61.25 530.38,-61.25 531.6,-64.53 533.33,-60.15 532.82,-67.8 532.82,-67.8\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.5\" y=\"-27.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M412.45,-38.04C410.99,-47.53 414.5,-56 423,-56 429.24,-56 432.79,-51.43 433.66,-45.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"433.55,-38.04 436.81,-44.99 433.61,-41.54 433.66,-45.04 433.66,-45.04 433.66,-45.04 433.61,-41.54 430.51,-45.08 433.55,-38.04 433.55,-38.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"419.5\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138232a20> >"
|
|
]
|
|
},
|
|
"execution_count": 9,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, state_based=True, acc='Rabin 1')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Using the `display_log` option, we can have a hint of what is going on under the hood. Each line in the table shows one call to the SAT solver. The column labeled `target.states` gives the size of the equivalent automaton we ask the SAT-solver to produce, but some of these states may actually be unreachable in the result. The `variables` and `clauses` columns give an indication of the size of the SAT problem. The `enc.*` and `sat.*` columns give the user and system time taken to encode and solve the SAT problem (the unit is \"ticks\", which usually is 1/100 of seconds).\n",
|
|
"\n",
|
|
"Below we see that the minimization procedure first tried to squeeze the 6-state input into a 3-state automaton, which failed, and then into a 5-state automaton, which was successful. This 5-state automaton was used as input to produce a smaller 4-state automaton.. Essentially this procedure is doing a binary search towards the minimal size. \n",
|
|
"\n",
|
|
"(In this case it does not matter, but be aware that the number of states displayed in the log table are those of complete automata, while the output of `sat_minimize()` is trimmed by default.)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>996</td>\n",
|
|
" <td>48806</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2760</td>\n",
|
|
" <td>224707</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>9</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>11</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2008</td>\n",
|
|
" <td>155020</td>\n",
|
|
" <td>8</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 3 NaN NaN NaN 996 \n",
|
|
"1 6 5 5 16 40 2760 \n",
|
|
"2 5 4 4 11 32 2008 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 48806 3 1 1 0 \n",
|
|
"1 224707 12 0 9 0 \n",
|
|
"2 155020 8 0 7 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"581pt\" height=\"196pt\"\n",
|
|
" viewBox=\"0.00 0.00 580.50 196.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.0 1.0) rotate(0) translate(4 192)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-192 576.5,-192 576.5,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"235.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"258.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"274.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"316.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"332.75\" y=\"-173.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"258.75\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 1]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-98C62,-98 50,-98 50,-98 44,-98 38,-92 38,-86 38,-86 38,-72 38,-72 38,-66 44,-60 50,-60 50,-60 62,-60 62,-60 68,-60 74,-66 74,-72 74,-72 74,-86 74,-86 74,-92 68,-98 62,-98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-79C2.79,-79 17.15,-79 30.63,-79\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-79 30.94,-82.15 34.44,-79 30.94,-79 30.94,-79 30.94,-79 34.44,-79 30.94,-75.85 37.94,-79 37.94,-79\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M266,-89C266,-89 254,-89 254,-89 248,-89 242,-83 242,-77 242,-77 242,-63 242,-63 242,-57 248,-51 254,-51 254,-51 266,-51 266,-51 272,-51 278,-57 278,-63 278,-63 278,-77 278,-77 278,-83 272,-89 266,-89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"255.5\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"252\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.17,-68.12C79.65,-65.22 85.89,-62.48 92,-61 141.59,-49 201.78,-57.71 234.66,-64.36\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"241.63,-65.82 234.13,-67.47 238.21,-65.1 234.78,-64.38 234.78,-64.38 234.78,-64.38 238.21,-65.1 235.43,-61.3 241.63,-65.82 241.63,-65.82\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"138.5\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M545,-106C545,-106 533,-106 533,-106 527,-106 521,-100 521,-94 521,-94 521,-80 521,-80 521,-74 527,-68 533,-68 533,-68 545,-68 545,-68 551,-68 557,-74 557,-80 557,-80 557,-94 557,-94 557,-100 551,-106 545,-106\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"534.5\" y=\"-90.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"531\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.12,-88.69C79.71,-91.62 86.02,-94.66 92,-97 144.83,-117.63 158.8,-123.38 215,-131 342.57,-148.31 378.44,-132.53 503,-100 506.59,-99.06 510.33,-97.89 513.97,-96.64\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"520.77,-94.18 515.26,-99.52 517.48,-95.37 514.19,-96.56 514.19,-96.56 514.19,-96.56 517.48,-95.37 513.12,-93.6 520.77,-94.18 520.77,-94.18\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"323\" y=\"-140.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M429,-38C429,-38 417,-38 417,-38 411,-38 405,-32 405,-26 405,-26 405,-12 405,-12 405,-6 411,0 417,0 417,0 429,0 429,0 435,0 441,-6 441,-12 441,-12 441,-26 441,-26 441,-32 435,-38 429,-38\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"418.5\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"415\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.05,-62.66C79.43,-58.28 85.65,-53.94 92,-51 197.22,-2.27 341.2,-10.42 397.77,-16.1\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"404.85,-16.85 397.56,-19.25 401.37,-16.48 397.89,-16.11 397.89,-16.11 397.89,-16.11 401.37,-16.48 398.22,-12.98 404.85,-16.85 404.85,-16.85\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M241.92,-72C229.48,-73.37 212.22,-75.1 197,-76 156.45,-78.39 109.2,-78.94 81.27,-79.03\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.26,-79.05 81.25,-75.88 77.76,-79.04 81.26,-79.03 81.26,-79.03 81.26,-79.03 77.76,-79.04 81.27,-82.18 74.26,-79.05 74.26,-79.05\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-81.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M242.9,-89.04C240.53,-98.53 246.23,-107 260,-107 270.11,-107 275.87,-102.43 277.28,-96.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"277.1,-89.04 280.43,-95.96 277.19,-92.54 277.28,-96.04 277.28,-96.04 277.28,-96.04 277.19,-92.54 274.13,-96.11 277.1,-89.04 277.1,-89.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M278.19,-71.79C312.51,-75.26 392,-82.87 459,-86 477.25,-86.85 497.9,-87.09 513.51,-87.12\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"520.73,-87.12 513.73,-90.27 517.23,-87.12 513.73,-87.12 513.73,-87.12 513.73,-87.12 517.23,-87.12 513.73,-83.97 520.73,-87.12 520.73,-87.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"405\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M278.23,-65.18C302.59,-58.27 348.45,-44.96 387,-32 390.69,-30.76 394.57,-29.39 398.35,-28.01\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"404.99,-25.56 399.51,-30.94 401.7,-26.78 398.42,-27.99 398.42,-27.99 398.42,-27.99 401.7,-26.78 397.33,-25.03 404.99,-25.56 404.99,-25.56\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"339\" y=\"-54.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M528.45,-106.04C526.99,-115.53 530.5,-124 539,-124 545.24,-124 548.79,-119.43 549.66,-113.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"549.55,-106.04 552.81,-112.99 549.61,-109.54 549.66,-113.04 549.66,-113.04 549.66,-113.04 549.61,-109.54 546.51,-113.08 549.55,-106.04 549.55,-106.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"505.5\" y=\"-127.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M520.78,-78.01C504.6,-69.41 479.82,-55.9 459,-43 455.14,-40.61 451.1,-37.97 447.2,-35.35\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"441.24,-31.29 448.79,-32.63 444.13,-33.26 447.02,-35.23 447.02,-35.23 447.02,-35.23 444.13,-33.26 445.25,-37.83 441.24,-31.29 441.24,-31.29\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"459\" y=\"-70.8\" font-family=\"Lato\" font-size=\"14.00\">a | b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M441.15,-15.63C458.2,-13.24 484.41,-12.26 503,-24 516.24,-32.37 524.9,-47.61 530.3,-61.01\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"532.82,-67.8 527.43,-62.34 531.6,-64.53 530.38,-61.25 530.38,-61.25 530.38,-61.25 531.6,-64.53 533.33,-60.15 532.82,-67.8 532.82,-67.8\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.5\" y=\"-27.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M412.45,-38.04C410.99,-47.53 414.5,-56 423,-56 429.24,-56 432.79,-51.43 433.66,-45.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"433.55,-38.04 436.81,-44.99 433.61,-41.54 433.66,-45.04 433.66,-45.04 433.66,-45.04 433.61,-41.54 430.51,-45.08 433.55,-38.04 433.55,-38.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"419.5\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138232750> >"
|
|
]
|
|
},
|
|
"execution_count": 10,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, state_based=True, acc='Rabin 1', display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Note that we already had a smaller transition-based automaton for this language (in the `small` variable), and that it actually is more efficient to work from that, as seen in problem sizes displayed in the following log."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>348</td>\n",
|
|
" <td>15974</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>17</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>960</td>\n",
|
|
" <td>73187</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>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>11</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>616</td>\n",
|
|
" <td>37620</td>\n",
|
|
" <td>3</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 3 NaN NaN NaN 348 \n",
|
|
"1 2 5 5 17 40 960 \n",
|
|
"2 2 4 4 11 32 616 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 15974 1 0 1 0 \n",
|
|
"1 73187 4 0 3 0 \n",
|
|
"2 37620 3 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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"565pt\" height=\"157pt\"\n",
|
|
" viewBox=\"0.00 0.00 565.00 157.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.0 1.0) rotate(0) translate(4 153)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-153 561,-153 561,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"228\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"251\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"267\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"309\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"325\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"251\" y=\"-120.8\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 1]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-64C62,-64 50,-64 50,-64 44,-64 38,-58 38,-52 38,-52 38,-38 38,-38 38,-32 44,-26 50,-26 50,-26 62,-26 62,-26 68,-26 74,-32 74,-38 74,-38 74,-52 74,-52 74,-58 68,-64 62,-64\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-48.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-33.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-45C2.79,-45 17.15,-45 30.63,-45\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-45 30.94,-48.15 34.44,-45 30.94,-45 30.94,-45 30.94,-45 34.44,-45 30.94,-41.85 37.94,-45 37.94,-45\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-64.04C48.54,-73.53 50.73,-82 56,-82 59.87,-82 62.08,-77.43 62.62,-71.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-64.04 65.77,-71.01 62.58,-67.54 62.62,-71.04 62.62,-71.04 62.62,-71.04 62.58,-67.54 59.47,-71.07 62.55,-64.04 62.55,-64.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"36\" y=\"-85.8\" font-family=\"Lato\" font-size=\"14.00\">!b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M429,-70C429,-70 417,-70 417,-70 411,-70 405,-64 405,-58 405,-58 405,-44 405,-44 405,-38 411,-32 417,-32 417,-32 429,-32 429,-32 435,-32 441,-38 441,-44 441,-44 441,-58 441,-58 441,-64 435,-70 429,-70\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"418.5\" y=\"-54.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"415\" y=\"-39.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.02,-55.39C79.61,-58.48 85.94,-61.66 92,-64 170.53,-94.3 195.5,-104.65 279,-94 328.19,-87.73 340.08,-82.03 387,-66 390.68,-64.74 394.51,-63.27 398.23,-61.76\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"404.76,-59 399.53,-64.63 401.53,-60.36 398.31,-61.72 398.31,-61.72 398.31,-61.72 401.53,-60.36 397.08,-58.82 404.76,-59 404.76,-59\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-101.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M253,-52C253,-52 241,-52 241,-52 235,-52 229,-46 229,-40 229,-40 229,-26 229,-26 229,-20 235,-14 241,-14 241,-14 253,-14 253,-14 259,-14 265,-20 265,-26 265,-26 265,-40 265,-40 265,-46 259,-52 253,-52\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"242.5\" y=\"-36.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"239\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.3,-45.52C100.79,-46.11 152.98,-46.48 197,-42 205.17,-41.17 214.02,-39.71 221.92,-38.22\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"228.86,-36.84 222.61,-41.29 225.43,-37.52 222,-38.2 222,-38.2 222,-38.2 225.43,-37.52 221.38,-35.11 228.86,-36.84 228.86,-36.84\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"126.5\" y=\"-48.8\" font-family=\"Lato\" font-size=\"14.00\">!b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M545,-38C545,-38 533,-38 533,-38 527,-38 521,-32 521,-26 521,-26 521,-12 521,-12 521,-6 527,0 533,0 533,0 545,0 545,0 551,0 557,-6 557,-12 557,-12 557,-26 557,-26 557,-32 551,-38 545,-38\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"534.5\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"531\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M72.65,-25.81C78.15,-20.38 84.79,-15.1 92,-12 142.29,9.65 160.27,-6.56 215,-5 296.06,-2.7 466.71,0.61 503,-6 506.65,-6.66 510.42,-7.68 514.08,-8.86\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"520.89,-11.28 513.24,-11.91 517.59,-10.11 514.3,-8.94 514.3,-8.94 514.3,-8.94 517.59,-10.11 515.35,-5.97 520.89,-11.28 520.89,-11.28\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"297\" y=\"-6.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M412.45,-70.04C410.99,-79.53 414.5,-88 423,-88 429.24,-88 432.79,-83.43 433.66,-77.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"433.55,-70.04 436.81,-76.99 433.61,-73.54 433.66,-77.04 433.66,-77.04 433.66,-77.04 433.61,-73.54 430.51,-77.08 433.55,-70.04 433.55,-70.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"389.5\" y=\"-91.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M441.24,-48.67C457.44,-46.21 482.24,-41.75 503,-35 506.73,-33.79 510.6,-32.29 514.33,-30.7\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"520.87,-27.78 515.76,-33.51 517.67,-29.21 514.47,-30.63 514.47,-30.63 514.47,-30.63 517.67,-29.21 513.19,-27.76 520.87,-27.78 520.87,-27.78\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"459\" y=\"-48.8\" font-family=\"Lato\" font-size=\"14.00\">a | b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M228.96,-28.19C200.12,-20.86 140.14,-9.13 92,-23 88.02,-24.15 84.06,-25.89 80.31,-27.91\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.23,-31.5 78.66,-25.23 77.25,-29.72 80.26,-27.94 80.26,-27.94 80.26,-27.94 77.25,-29.72 81.86,-30.65 74.23,-31.5 74.23,-31.5\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265,-34.76C296.06,-37.97 362.05,-44.8 397.79,-48.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"404.93,-49.23 397.64,-51.65 401.45,-48.87 397.97,-48.51 397.97,-48.51 397.97,-48.51 401.45,-48.87 398.29,-45.38 404.93,-49.23 404.93,-49.23\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"338\" y=\"-50.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M229.9,-52.04C227.53,-61.53 233.23,-70 247,-70 257.11,-70 262.87,-65.43 264.28,-59.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"264.1,-52.04 267.43,-58.96 264.19,-55.54 264.28,-59.04 264.28,-59.04 264.28,-59.04 264.19,-55.54 261.13,-59.11 264.1,-52.04 264.1,-52.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"217\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M520.94,-14.37C504.43,-10.79 479.04,-7.7 459,-16 453.18,-18.41 447.82,-22.31 443.14,-26.65\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"437.97,-31.88 440.65,-24.69 440.43,-29.39 442.89,-26.91 442.89,-26.91 442.89,-26.91 440.43,-29.39 445.13,-29.12 437.97,-31.88 437.97,-31.88\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"475.5\" y=\"-19.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M528.45,-38.04C526.99,-47.53 530.5,-56 539,-56 545.24,-56 548.79,-51.43 549.66,-45.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"549.55,-38.04 552.81,-44.99 549.61,-41.54 549.66,-45.04 549.66,-45.04 549.66,-45.04 549.61,-41.54 546.51,-45.08 549.55,-38.04 549.55,-38.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"535.5\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138b8ac30> >"
|
|
]
|
|
},
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(small, state_based=True, acc='Rabin 1', display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"How did the procedure look for a complete automaton of size 5 when the input had only 2 states? It's because the input uses transition-based acceptance: to estimate an upper bound of the size of the state-based output, the `sat_minimize()` procedure converted its transition-based input to state-based acceptance (using the `spot.sbacc()` function) and counted the number of states in the result.\n",
|
|
"\n",
|
|
"Such an estimate is not necessarily correct if 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 transitions to belong to exactly one set, as customary in parity automata."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>19</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2300</td>\n",
|
|
" <td>288887</td>\n",
|
|
" <td>19</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>25</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>368</td>\n",
|
|
" <td>18569</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>92</td>\n",
|
|
" <td>2337</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 2 5 5 19 40 2300 \n",
|
|
"1 2 2 2 6 16 368 \n",
|
|
"2 2 1 NaN NaN NaN 92 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 288887 19 0 25 0 \n",
|
|
"1 18569 1 0 1 0 \n",
|
|
"2 2337 0 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"190pt\" height=\"191pt\"\n",
|
|
" viewBox=\"0.00 0.00 190.00 191.07\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 187.07)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-187.07 186,-187.07 186,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"9.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"32.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\">) & (Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"94.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"110.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\">) | Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"148.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"164.5\" y=\"-168.87\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"37\" y=\"-154.87\" font-family=\"Lato\" font-size=\"14.00\">[parity min odd 3]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-33.07\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-29.37\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-33.07C2.79,-33.07 17.15,-33.07 30.63,-33.07\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-33.07 30.94,-36.22 34.44,-33.07 30.94,-33.07 30.94,-33.07 30.94,-33.07 34.44,-33.07 30.94,-29.92 37.94,-33.07 37.94,-33.07\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M52.76,-50.85C52.21,-60.38 53.29,-69.07 56,-69.07 57.99,-69.07 59.1,-64.39 59.33,-58.12\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"59.24,-50.85 62.48,-57.81 59.28,-54.35 59.33,-57.85 59.33,-57.85 59.33,-57.85 59.28,-54.35 56.18,-57.89 59.24,-50.85 59.24,-50.85\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-87.87\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-72.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M50.99,-50.65C47.55,-71.79 49.21,-99.07 56,-99.07 62.04,-99.07 64.03,-77.43 61.96,-57.76\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"61.01,-50.65 65.06,-57.17 61.47,-54.12 61.93,-57.59 61.93,-57.59 61.93,-57.59 61.47,-54.12 58.81,-58 61.01,-50.65 61.01,-50.65\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"26\" y=\"-117.87\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-102.87\" 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=\"black\" cx=\"164\" cy=\"-33.07\" rx=\"18\" ry=\"18\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"164\" y=\"-29.37\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.04,-36C79.73,-36.84 86.12,-37.65 92,-38.07 107.96,-39.2 112.04,-39.2 128,-38.07 131.49,-37.82 135.16,-37.44 138.76,-36.99\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"145.96,-36 139.46,-40.07 142.49,-36.47 139.03,-36.95 139.03,-36.95 139.03,-36.95 142.49,-36.47 138.6,-33.83 145.96,-36 145.96,-36\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-56.87\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"102\" y=\"-41.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M68.6,-19.93C74.84,-13.85 83.09,-7.28 92,-4.07 107.05,1.36 112.95,1.36 128,-4.07 134.54,-6.43 140.73,-10.6 146.03,-15.05\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"151.4,-19.93 144.1,-17.56 148.81,-17.58 146.22,-15.23 146.22,-15.23 146.22,-15.23 148.81,-17.58 148.33,-12.89 151.4,-19.93 151.4,-19.93\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"94\" y=\"-22.87\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"102\" y=\"-7.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M159.18,-50.48C158.28,-60.16 159.89,-69.07 164,-69.07 167.02,-69.07 168.69,-64.26 169.01,-57.88\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"168.82,-50.48 172.15,-57.4 168.91,-53.98 169,-57.48 169,-57.48 169,-57.48 168.91,-53.98 165.85,-57.56 168.82,-50.48 168.82,-50.48\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"158.5\" y=\"-87.87\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"156\" y=\"-72.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M156.73,-49.67C151.24,-70.93 153.66,-99.07 164,-99.07 173.25,-99.07 176.16,-76.55 172.74,-56.58\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"171.27,-49.67 175.81,-55.86 172,-53.09 172.73,-56.51 172.73,-56.51 172.73,-56.51 172,-53.09 169.64,-57.17 171.27,-49.67 171.27,-49.67\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"160.5\" y=\"-117.87\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"<text text-anchor=\"start\" x=\"156\" y=\"-102.87\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138232f60> >"
|
|
]
|
|
},
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(small, max_states=9, acc='parity min odd 3', colored=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"There are a couple of ways in which we can influence the search for the minimum automaton. We can disable the binary search with `sat_naive`. In this case, the procedure will try to remove one state at a time. This is not necessary slower than the default binary search, because satisfiable problems are often solved more quickly than unsatisfiable ones."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173183</td>\n",
|
|
" <td>9</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>11</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>964</td>\n",
|
|
" <td>45412</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>363</td>\n",
|
|
" <td>10496</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 6 5 13 40 2742 \n",
|
|
"1 5 4 4 11 32 964 \n",
|
|
"2 4 3 NaN NaN NaN 363 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 173183 9 0 7 0 \n",
|
|
"1 45412 2 0 2 0 \n",
|
|
"2 10496 1 0 0 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"531pt\" height=\"193pt\"\n",
|
|
" viewBox=\"0.00 0.00 531.00 193.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.0 1.0) rotate(0) translate(4 189)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-189 527,-189 527,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"240\" y=\"-170.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"263\" y=\"-170.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"279\" y=\"-170.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-156.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-98C62,-98 50,-98 50,-98 44,-98 38,-92 38,-86 38,-86 38,-72 38,-72 38,-66 44,-60 50,-60 50,-60 62,-60 62,-60 68,-60 74,-66 74,-72 74,-72 74,-86 74,-86 74,-92 68,-98 62,-98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-79C2.79,-79 17.15,-79 30.63,-79\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-79 30.94,-82.15 34.44,-79 30.94,-79 30.94,-79 30.94,-79 34.44,-79 30.94,-75.85 37.94,-79 37.94,-79\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-98.04C48.54,-107.53 50.73,-116 56,-116 59.87,-116 62.08,-111.43 62.62,-105.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-98.04 65.77,-105.01 62.58,-101.54 62.62,-105.04 62.62,-105.04 62.62,-105.04 62.58,-101.54 59.47,-105.07 62.55,-98.04 62.55,-98.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M249,-87C249,-87 237,-87 237,-87 231,-87 225,-81 225,-75 225,-75 225,-63 225,-63 225,-57 231,-51 237,-51 237,-51 249,-51 249,-51 255,-51 261,-57 261,-63 261,-63 261,-75 261,-75 261,-81 255,-87 249,-87\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"243\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.17,-68.12C79.65,-65.22 85.89,-62.48 92,-61 135.23,-50.54 187.43,-57.56 217.47,-63.42\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"224.61,-64.88 217.12,-66.57 221.18,-64.18 217.75,-63.48 217.75,-63.48 217.75,-63.48 221.18,-64.18 218.38,-60.39 224.61,-64.88 224.61,-64.88\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"114.5\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M511,-104C511,-104 499,-104 499,-104 493,-104 487,-98 487,-92 487,-92 487,-78 487,-78 487,-72 493,-66 499,-66 499,-66 511,-66 511,-66 517,-66 523,-72 523,-78 523,-78 523,-92 523,-92 523,-98 517,-104 511,-104\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"500.5\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"497\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.04,-89.36C79.62,-92.45 85.95,-95.64 92,-98 144.52,-118.5 159.05,-122.06 215,-129 327.81,-143 359.31,-128.82 469,-99 472.71,-97.99 476.56,-96.71 480.29,-95.33\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"486.82,-92.78 481.44,-98.26 483.56,-94.06 480.3,-95.33 480.3,-95.33 480.3,-95.33 483.56,-94.06 479.16,-92.39 486.82,-92.78 486.82,-92.78\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"289\" y=\"-137.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M428,-36C428,-36 416,-36 416,-36 410,-36 404,-30 404,-24 404,-24 404,-12 404,-12 404,-6 410,0 416,0 416,0 428,0 428,0 434,0 440,-6 440,-12 440,-12 440,-24 440,-24 440,-30 434,-36 428,-36\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"422\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.05,-62.66C79.43,-58.28 85.65,-53.94 92,-51 196.94,-2.4 340.46,-9.85 396.85,-15.24\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"403.91,-15.94 396.63,-18.38 400.42,-15.6 396.94,-15.25 396.94,-15.25 396.94,-15.25 400.42,-15.6 397.26,-12.11 403.91,-15.94 403.91,-15.94\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M224.97,-72.2C216.58,-73.63 206.29,-75.18 197,-76 156.54,-79.56 109.26,-79.75 81.3,-79.46\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.28,-79.37 81.32,-76.31 77.78,-79.41 81.28,-79.46 81.28,-79.46 81.28,-79.46 77.78,-79.41 81.24,-82.61 74.28,-79.37 74.28,-79.37\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M225.99,-87.15C223.38,-96.54 229.05,-105 243,-105 253.25,-105 259.03,-100.44 260.34,-94.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"260.01,-87.15 263.48,-94 260.17,-90.65 260.33,-94.15 260.33,-94.15 260.33,-94.15 260.17,-90.65 257.18,-94.29 260.01,-87.15 260.01,-87.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"213\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M261.02,-72.6C269.4,-74.23 279.69,-76 289,-77 357.77,-84.36 439.53,-85.26 479.52,-85.19\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"486.94,-85.17 479.95,-88.34 483.44,-85.18 479.94,-85.19 479.94,-85.19 479.94,-85.19 483.44,-85.18 479.93,-82.04 486.94,-85.17 486.94,-85.17\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"406\" y=\"-87.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M261.25,-65.24C288.18,-59.21 341.71,-46.56 386,-32 389.65,-30.8 393.47,-29.41 397.19,-27.99\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"403.71,-25.41 398.36,-30.91 400.46,-26.7 397.2,-27.98 397.2,-27.98 397.2,-27.98 400.46,-26.7 396.04,-25.05 403.71,-25.41 403.71,-25.41\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"319.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M486.85,-70.81C474.93,-60.96 458.92,-47.71 445.92,-36.96\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"440.18,-32.21 447.58,-34.24 442.87,-34.44 445.57,-36.67 445.57,-36.67 445.57,-36.67 442.87,-34.44 443.56,-39.1 440.18,-32.21 440.18,-32.21\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"463.5\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M440.04,-18.51C449.33,-19.53 460.6,-22.04 469,-28 479.93,-35.75 488.11,-48.09 493.81,-59.31\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"496.88,-65.74 491.02,-60.78 495.37,-62.58 493.86,-59.43 493.86,-59.43 493.86,-59.43 495.37,-62.58 496.71,-58.07 496.88,-65.74 496.88,-65.74\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"458\" y=\"-31.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M414.76,-36.15C413.65,-45.54 416.06,-54 422,-54 426.36,-54 428.82,-49.44 429.38,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"429.24,-36.15 432.52,-43.09 429.31,-39.65 429.37,-43.15 429.37,-43.15 429.37,-43.15 429.31,-39.65 426.23,-43.21 429.24,-36.15 429.24,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"418.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138b8a1b0> >"
|
|
]
|
|
},
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_naive=True, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Variant for incremental SAT solving\n",
|
|
"\n",
|
|
"Using `sat_incr=1`, we encode the problem of finding an equivalent automaton with $n$ states, and add 6 additional variables and some additional constraints to the problem:\n",
|
|
"\n",
|
|
"| variable | implied constraints |\n",
|
|
"| :--- | ---: |\n",
|
|
"| $v_1$ | transitions to state $(n-1)$ must not be used | \n",
|
|
"| $v_2$ | $v_1\\land{}$ transitions to state $(n-2)$ must not be used |\n",
|
|
"| ... | |\n",
|
|
"| $v_6$ | $v_5\\land{}$ transitions to state $(n-5)$ must not be used |\n",
|
|
"\n",
|
|
"Now using `assume` directives on variable $v_i$ amounts to testing whether the problem is solved with $n-i$ states, but we do not have to reencode the problem for each test, and the solver can (probably) reuse some of the knowledge it gathered during a previous attempt. We do a binary search on these 6 assumptions, to find some $i$ such that the problem is satisfiable with assumption $v_i$ but not with $v_{i+1}$. If such cast exists, we have found the minimal automaton. If assumption $v_6$ is satisfiable, we re-encode the problem with $n-7$ states and start over. Watch how the number of variables and clauses do not change in the following log.\n",
|
|
"\n",
|
|
"The number of assumption variables to use in a one encoding can be set with the `sat_incr_steps` argument. Its default value of 6 was chosen empirically by benchmarking different values."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2747</td>\n",
|
|
" <td>173427</td>\n",
|
|
" <td>8</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>1</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2747</td>\n",
|
|
" <td>173427</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2747</td>\n",
|
|
" <td>173427</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>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 2747 \n",
|
|
"1 6 3 NaN NaN NaN 2747 \n",
|
|
"2 6 4 4 12 32 2747 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 173427 8 0 6 1 \n",
|
|
"1 173427 0 0 2 0 \n",
|
|
"2 173427 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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"623pt\" height=\"200pt\"\n",
|
|
" viewBox=\"0.00 0.00 623.00 200.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.0 1.0) rotate(0) translate(4 196)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-196 619,-196 619,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"286\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"309\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"325\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"276\" y=\"-163.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-100C62,-100 50,-100 50,-100 44,-100 38,-94 38,-88 38,-88 38,-74 38,-74 38,-68 44,-62 50,-62 50,-62 62,-62 62,-62 68,-62 74,-68 74,-74 74,-74 74,-88 74,-88 74,-94 68,-100 62,-100\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-84.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-69.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-81C2.79,-81 17.15,-81 30.63,-81\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-81 30.94,-84.15 34.44,-81 30.94,-81 30.94,-81 30.94,-81 34.44,-81 30.94,-77.85 37.94,-81 37.94,-81\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-100.04C48.54,-109.53 50.73,-118 56,-118 59.87,-118 62.08,-113.43 62.62,-107.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-100.04 65.77,-107.01 62.58,-103.54 62.62,-107.04 62.62,-107.04 62.62,-107.04 62.58,-103.54 59.47,-107.07 62.55,-100.04 62.55,-100.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-121.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M266,-89C266,-89 254,-89 254,-89 248,-89 242,-83 242,-77 242,-77 242,-65 242,-65 242,-59 248,-53 254,-53 254,-53 266,-53 266,-53 272,-53 278,-59 278,-65 278,-65 278,-77 278,-77 278,-83 272,-89 266,-89\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"260\" y=\"-67.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.17,-70.12C79.65,-67.22 85.89,-64.48 92,-63 141.57,-51 201.77,-59.24 234.65,-65.59\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"241.63,-66.99 234.14,-68.7 238.2,-66.3 234.76,-65.61 234.76,-65.61 234.76,-65.61 238.2,-66.3 235.38,-62.53 241.63,-66.99 241.63,-66.99\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"114.5\" y=\"-66.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M603,-105C603,-105 591,-105 591,-105 585,-105 579,-99 579,-93 579,-93 579,-81 579,-81 579,-75 585,-69 591,-69 591,-69 603,-69 603,-69 609,-69 615,-75 615,-81 615,-81 615,-93 615,-93 615,-99 609,-105 603,-105\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"597\" y=\"-83.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.04,-91.36C79.62,-94.45 85.95,-97.64 92,-100 144.52,-120.5 159.05,-124.06 215,-131 368.11,-150 412.26,-143.98 561,-103 564.78,-101.96 568.67,-100.55 572.42,-99\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"578.97,-96.11 573.84,-101.82 575.76,-97.52 572.56,-98.94 572.56,-98.94 572.56,-98.94 575.76,-97.52 571.29,-96.06 578.97,-96.11 578.97,-96.11\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"323\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M456,-38C456,-38 444,-38 444,-38 438,-38 432,-32 432,-26 432,-26 432,-12 432,-12 432,-6 438,0 444,0 444,0 456,0 456,0 462,0 468,-6 468,-12 468,-12 468,-26 468,-26 468,-32 462,-38 456,-38\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"445.5\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"442\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.31,-63.73C79.61,-59.3 85.71,-54.95 92,-52 206.85,1.84 365.07,-9.12 424.84,-15.84\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"431.95,-16.67 424.63,-18.99 428.48,-16.26 425,-15.86 425,-15.86 425,-15.86 428.48,-16.26 425.37,-12.73 431.95,-16.67 431.95,-16.67\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M241.93,-73.35C229.5,-74.96 212.24,-76.98 197,-78 156.47,-80.72 109.22,-81.16 81.27,-81.15\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.26,-81.13 81.27,-78 77.76,-81.14 81.26,-81.15 81.26,-81.15 81.26,-81.15 77.76,-81.14 81.26,-84.3 74.26,-81.13 74.26,-81.13\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-84.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M242.99,-89.15C240.38,-98.54 246.05,-107 260,-107 270.25,-107 276.03,-102.44 277.34,-96.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"277.01,-89.15 280.48,-96 277.17,-92.65 277.33,-96.15 277.33,-96.15 277.33,-96.15 277.17,-92.65 274.18,-96.29 277.01,-89.15 277.01,-89.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"230\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M278.09,-72.64C318.75,-76.46 424.46,-85.84 513,-89 534.32,-89.76 539.68,-89.61 561,-89 564.47,-88.9 568.13,-88.75 571.72,-88.57\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"578.92,-88.17 572.1,-91.7 575.42,-88.36 571.93,-88.56 571.93,-88.56 571.93,-88.56 575.42,-88.36 571.76,-85.41 578.92,-88.17 578.92,-88.17\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"405\" y=\"-91.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M278.02,-66.29C311.63,-57 386.61,-36.26 425.14,-25.6\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"431.89,-23.73 425.98,-28.64 428.51,-24.67 425.14,-25.6 425.14,-25.6 425.14,-25.6 428.51,-24.67 424.3,-22.56 431.89,-23.73 431.89,-23.73\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"323\" y=\"-55.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M586.15,-105.15C584.48,-114.54 588.09,-123 597,-123 603.54,-123 607.23,-118.44 608.07,-112.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"607.85,-105.15 611.21,-112.06 607.96,-108.65 608.06,-112.15 608.06,-112.15 608.06,-112.15 607.96,-108.65 604.91,-112.24 607.85,-105.15 607.85,-105.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"593.5\" y=\"-126.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M578.82,-78.94C553,-66.83 504.1,-43.9 474.84,-30.18\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"468.2,-27.07 475.88,-27.19 471.37,-28.55 474.54,-30.04 474.54,-30.04 474.54,-30.04 471.37,-28.55 473.2,-32.89 468.2,-27.07 468.2,-27.07\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"531.5\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M468.13,-16.07C491.13,-13.08 532.39,-11.09 561,-29 573.2,-36.63 581.73,-50.22 587.31,-62.32\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"590.12,-68.85 584.46,-63.66 588.74,-65.63 587.35,-62.42 587.35,-62.42 587.35,-62.42 588.74,-65.63 590.25,-61.17 590.12,-68.85 590.12,-68.85\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"513\" y=\"-32.8\" font-family=\"Lato\" font-size=\"14.00\">a | !b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M434.35,-38.04C432.19,-47.53 437.4,-56 450,-56 459.25,-56 464.52,-51.43 465.81,-45.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"465.65,-38.04 468.96,-44.96 465.73,-41.54 465.81,-45.04 465.81,-45.04 465.81,-45.04 465.73,-41.54 462.66,-45.11 465.65,-38.04 465.65,-38.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"418\" y=\"-59.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe120556e10> >"
|
|
]
|
|
},
|
|
"execution_count": 14,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_incr=1, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Another incremental variant consists is the equivalent of forcing $v_1$, $v_2$, ... in order. But to do that we do not need to use any assumption. We just add the constraints that transitions going to state $n-i$ are forbidden. This variant is enabled by option `sat_incr=2`. As in the previous case, we do a few of those incremental steps (2 by default, but that can be changed with the `sat_incr_steps` parameter) and then we reencode the problem to reduce its size.\n",
|
|
"\n",
|
|
"In the log below, line 0 corresponds to the search of an equivalent automaton with the same size, but the simpler co-Büchi acceptance. It works, and most of the time was spent encoding the problem. Then for the next two lines, the minimization function looks for automata of size 5 and 4 without reencoding the problem but simply adding a few constraints to disable the relevant transitions."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 15,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173183</td>\n",
|
|
" <td>9</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173279</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173327</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>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 5 13 40 2742 \n",
|
|
"1 5 4 4 12 32 2742 \n",
|
|
"2 4 3 NaN NaN NaN 2742 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 173183 9 0 6 0 \n",
|
|
"1 173279 0 0 2 0 \n",
|
|
"2 173327 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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"593pt\" height=\"221pt\"\n",
|
|
" viewBox=\"0.00 0.00 593.00 221.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.0 1.0) rotate(0) translate(4 217)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-217 589,-217 589,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"294\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"310\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"261\" y=\"-184.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-104C62,-104 50,-104 50,-104 44,-104 38,-98 38,-92 38,-92 38,-78 38,-78 38,-72 44,-66 50,-66 50,-66 62,-66 62,-66 68,-66 74,-72 74,-78 74,-78 74,-92 74,-92 74,-98 68,-104 62,-104\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-85C2.79,-85 17.15,-85 30.63,-85\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-85 30.94,-88.15 34.44,-85 30.94,-85 30.94,-85 30.94,-85 34.44,-85 30.94,-81.85 37.94,-85 37.94,-85\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-104.04C48.54,-113.53 50.73,-122 56,-122 59.87,-122 62.08,-117.43 62.62,-111.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-104.04 65.77,-111.01 62.58,-107.54 62.62,-111.04 62.62,-111.04 62.62,-111.04 62.58,-107.54 59.47,-111.07 62.55,-104.04 62.55,-104.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-125.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M459.5,-87C459.5,-87 447.5,-87 447.5,-87 441.5,-87 435.5,-81 435.5,-75 435.5,-75 435.5,-63 435.5,-63 435.5,-57 441.5,-51 447.5,-51 447.5,-51 459.5,-51 459.5,-51 465.5,-51 471.5,-57 471.5,-63 471.5,-63 471.5,-75 471.5,-75 471.5,-81 465.5,-87 459.5,-87\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"453.5\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.02,-88.51C79.71,-89.53 86.1,-90.5 92,-91 138.5,-94.96 150.38,-93 197,-91 282.32,-87.33 383.23,-76.81 428.46,-71.76\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"435.49,-70.97 428.89,-74.89 432.01,-71.36 428.53,-71.76 428.53,-71.76 428.53,-71.76 432.01,-71.36 428.18,-68.63 435.49,-70.97 435.49,-70.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-93.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M573,-98C573,-98 561,-98 561,-98 555,-98 549,-92 549,-86 549,-86 549,-72 549,-72 549,-66 555,-60 561,-60 561,-60 573,-60 573,-60 579,-60 585,-66 585,-72 585,-72 585,-86 585,-86 585,-92 579,-98 573,-98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"562.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"559\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.04,-97.39C79.52,-100.76 85.79,-104.03 92,-106 265.98,-161.13 329.43,-188.42 502,-129 517.58,-123.64 532.28,-112.75 543.64,-102.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"548.95,-97.54 545.98,-104.62 546.39,-99.93 543.83,-102.32 543.83,-102.32 543.83,-102.32 546.39,-99.93 541.68,-100.02 548.95,-97.54 548.95,-97.54\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"297\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M253,-36C253,-36 241,-36 241,-36 235,-36 229,-30 229,-24 229,-24 229,-12 229,-12 229,-6 235,0 241,0 241,0 253,0 253,0 259,0 265,-6 265,-12 265,-12 265,-24 265,-24 265,-30 259,-36 253,-36\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"247\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.1,-80.68C100.78,-73.74 153.73,-59.12 197,-42 205.4,-38.68 214.33,-34.5 222.24,-30.57\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"228.61,-27.35 223.79,-33.32 225.49,-28.93 222.37,-30.51 222.37,-30.51 222.37,-30.51 225.49,-28.93 220.94,-27.7 228.61,-27.35 228.61,-27.35\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"114.5\" y=\"-78.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M440.47,-87.15C438.47,-96.54 442.81,-105 453.5,-105 461.35,-105 465.77,-100.44 466.78,-94.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"466.53,-87.15 469.92,-94.04 466.65,-90.65 466.77,-94.15 466.77,-94.15 466.77,-94.15 466.65,-90.65 463.63,-94.26 466.53,-87.15 466.53,-87.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"450\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M471.74,-63.9C487.39,-60.04 511.01,-56.16 531,-61 534.82,-61.92 538.69,-63.34 542.39,-64.98\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"548.83,-68.12 541.16,-67.89 545.69,-66.59 542.54,-65.06 542.54,-65.06 542.54,-65.06 545.69,-66.59 543.92,-62.23 548.83,-68.12 548.83,-68.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"520\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M548.95,-78.06C540.27,-77.53 529.57,-76.82 520,-76 506.41,-74.83 491.27,-73.23 478.97,-71.86\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"471.72,-71.04 479.03,-68.69 475.2,-71.43 478.68,-71.82 478.68,-71.82 478.68,-71.82 475.2,-71.43 478.32,-74.95 471.72,-71.04 471.72,-71.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"522\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M559.72,-98.04C558.71,-107.53 561.14,-116 567,-116 571.3,-116 573.75,-111.43 574.35,-105.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"574.28,-98.04 577.5,-105 574.32,-101.54 574.35,-105.04 574.35,-105.04 574.35,-105.04 574.32,-101.54 571.2,-105.07 574.28,-98.04 574.28,-98.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"561.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M228.76,-13.47C198.57,-6.56 135.24,3.2 92,-23 78.77,-31.02 70.11,-46.02 64.71,-59.26\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.18,-65.97 61.7,-58.31 63.41,-62.7 64.65,-59.42 64.65,-59.42 64.65,-59.42 63.41,-62.7 67.6,-60.53 62.18,-65.97 62.18,-65.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265.18,-23.11C274.56,-25.85 286.39,-29.22 297,-32 343.23,-44.1 397.62,-56.66 428.28,-63.59\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"435.18,-65.14 427.66,-66.68 431.76,-64.38 428.35,-63.61 428.35,-63.61 428.35,-63.61 431.76,-64.38 429.04,-60.53 435.18,-65.14 435.18,-65.14\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"314\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265.06,-15C307.01,-8.38 417.93,4.54 502,-27 517.67,-32.88 532.37,-44.23 543.72,-54.83\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"549.01,-59.94 541.79,-57.34 546.5,-57.51 543.98,-55.08 543.98,-55.08 543.98,-55.08 546.5,-57.51 546.17,-52.81 549.01,-59.94 549.01,-59.94\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"405\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M229.99,-36.15C227.38,-45.54 233.05,-54 247,-54 257.25,-54 263.03,-49.44 264.34,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"264.01,-36.15 267.48,-43 264.17,-39.65 264.33,-43.15 264.33,-43.15 264.33,-43.15 264.17,-39.65 261.18,-43.29 264.01,-36.15 264.01,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"217\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138232bd0> >"
|
|
]
|
|
},
|
|
"execution_count": 15,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_incr=2, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Miscellaneous options\n",
|
|
"\n",
|
|
"### `return_log`\n",
|
|
"\n",
|
|
"The `return_log` can be used to obtain the log table as an object. In that case, `sat_minimize()` returns a pair, `(aut,log)` where `aut` can be `None` if the minimization failed. Also, the `log` table contains an extra column that is hidden by `display_log`: it contains the corresponding automaton in HOA format."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"593pt\" height=\"221pt\"\n",
|
|
" viewBox=\"0.00 0.00 593.00 221.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.0 1.0) rotate(0) translate(4 217)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-217 589,-217 589,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"294\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"310\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"261\" y=\"-184.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-104C62,-104 50,-104 50,-104 44,-104 38,-98 38,-92 38,-92 38,-78 38,-78 38,-72 44,-66 50,-66 50,-66 62,-66 62,-66 68,-66 74,-72 74,-78 74,-78 74,-92 74,-92 74,-98 68,-104 62,-104\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-85C2.79,-85 17.15,-85 30.63,-85\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-85 30.94,-88.15 34.44,-85 30.94,-85 30.94,-85 30.94,-85 34.44,-85 30.94,-81.85 37.94,-85 37.94,-85\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-104.04C48.54,-113.53 50.73,-122 56,-122 59.87,-122 62.08,-117.43 62.62,-111.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-104.04 65.77,-111.01 62.58,-107.54 62.62,-111.04 62.62,-111.04 62.62,-111.04 62.58,-107.54 59.47,-111.07 62.55,-104.04 62.55,-104.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-125.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M459.5,-87C459.5,-87 447.5,-87 447.5,-87 441.5,-87 435.5,-81 435.5,-75 435.5,-75 435.5,-63 435.5,-63 435.5,-57 441.5,-51 447.5,-51 447.5,-51 459.5,-51 459.5,-51 465.5,-51 471.5,-57 471.5,-63 471.5,-63 471.5,-75 471.5,-75 471.5,-81 465.5,-87 459.5,-87\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"453.5\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.02,-88.51C79.71,-89.53 86.1,-90.5 92,-91 138.5,-94.96 150.38,-93 197,-91 282.32,-87.33 383.23,-76.81 428.46,-71.76\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"435.49,-70.97 428.89,-74.89 432.01,-71.36 428.53,-71.76 428.53,-71.76 428.53,-71.76 432.01,-71.36 428.18,-68.63 435.49,-70.97 435.49,-70.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-93.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M573,-98C573,-98 561,-98 561,-98 555,-98 549,-92 549,-86 549,-86 549,-72 549,-72 549,-66 555,-60 561,-60 561,-60 573,-60 573,-60 579,-60 585,-66 585,-72 585,-72 585,-86 585,-86 585,-92 579,-98 573,-98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"562.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"559\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.04,-97.39C79.52,-100.76 85.79,-104.03 92,-106 265.98,-161.13 329.43,-188.42 502,-129 517.58,-123.64 532.28,-112.75 543.64,-102.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"548.95,-97.54 545.98,-104.62 546.39,-99.93 543.83,-102.32 543.83,-102.32 543.83,-102.32 546.39,-99.93 541.68,-100.02 548.95,-97.54 548.95,-97.54\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"297\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M253,-36C253,-36 241,-36 241,-36 235,-36 229,-30 229,-24 229,-24 229,-12 229,-12 229,-6 235,0 241,0 241,0 253,0 253,0 259,0 265,-6 265,-12 265,-12 265,-24 265,-24 265,-30 259,-36 253,-36\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"247\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.1,-80.68C100.78,-73.74 153.73,-59.12 197,-42 205.4,-38.68 214.33,-34.5 222.24,-30.57\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"228.61,-27.35 223.79,-33.32 225.49,-28.93 222.37,-30.51 222.37,-30.51 222.37,-30.51 225.49,-28.93 220.94,-27.7 228.61,-27.35 228.61,-27.35\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"114.5\" y=\"-78.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M440.47,-87.15C438.47,-96.54 442.81,-105 453.5,-105 461.35,-105 465.77,-100.44 466.78,-94.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"466.53,-87.15 469.92,-94.04 466.65,-90.65 466.77,-94.15 466.77,-94.15 466.77,-94.15 466.65,-90.65 463.63,-94.26 466.53,-87.15 466.53,-87.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"450\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M471.74,-63.9C487.39,-60.04 511.01,-56.16 531,-61 534.82,-61.92 538.69,-63.34 542.39,-64.98\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"548.83,-68.12 541.16,-67.89 545.69,-66.59 542.54,-65.06 542.54,-65.06 542.54,-65.06 545.69,-66.59 543.92,-62.23 548.83,-68.12 548.83,-68.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"520\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M548.95,-78.06C540.27,-77.53 529.57,-76.82 520,-76 506.41,-74.83 491.27,-73.23 478.97,-71.86\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"471.72,-71.04 479.03,-68.69 475.2,-71.43 478.68,-71.82 478.68,-71.82 478.68,-71.82 475.2,-71.43 478.32,-74.95 471.72,-71.04 471.72,-71.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"522\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M559.72,-98.04C558.71,-107.53 561.14,-116 567,-116 571.3,-116 573.75,-111.43 574.35,-105.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"574.28,-98.04 577.5,-105 574.32,-101.54 574.35,-105.04 574.35,-105.04 574.35,-105.04 574.32,-101.54 571.2,-105.07 574.28,-98.04 574.28,-98.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"561.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M228.76,-13.47C198.57,-6.56 135.24,3.2 92,-23 78.77,-31.02 70.11,-46.02 64.71,-59.26\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.18,-65.97 61.7,-58.31 63.41,-62.7 64.65,-59.42 64.65,-59.42 64.65,-59.42 63.41,-62.7 67.6,-60.53 62.18,-65.97 62.18,-65.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265.18,-23.11C274.56,-25.85 286.39,-29.22 297,-32 343.23,-44.1 397.62,-56.66 428.28,-63.59\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"435.18,-65.14 427.66,-66.68 431.76,-64.38 428.35,-63.61 428.35,-63.61 428.35,-63.61 431.76,-64.38 429.04,-60.53 435.18,-65.14 435.18,-65.14\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"314\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265.06,-15C307.01,-8.38 417.93,4.54 502,-27 517.67,-32.88 532.37,-44.23 543.72,-54.83\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"549.01,-59.94 541.79,-57.34 546.5,-57.51 543.98,-55.08 543.98,-55.08 543.98,-55.08 546.5,-57.51 546.17,-52.81 549.01,-59.94 549.01,-59.94\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"405\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M229.99,-36.15C227.38,-45.54 233.05,-54 247,-54 257.25,-54 263.03,-49.44 264.34,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"264.01,-36.15 267.48,-43 264.17,-39.65 264.33,-43.15 264.33,-43.15 264.33,-43.15 264.17,-39.65 261.18,-43.29 264.01,-36.15 264.01,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"217\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe120556d50> >"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" <th>automaton</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>13</td>\n",
|
|
" <td>40</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173183</td>\n",
|
|
" <td>9</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>HOA: v1 States: 5 Start: 0 AP: 3 \"a\" \"c\" \"b\" a...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173279</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>HOA: v1 States: 4 Start: 0 AP: 3 \"a\" \"c\" \"b\" a...</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>2742</td>\n",
|
|
" <td>173327</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 6 5 13 40 2742 \n",
|
|
"1 5 4 4 12 32 2742 \n",
|
|
"2 4 3 NaN NaN NaN 2742 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \\\n",
|
|
"0 173183 9 0 7 0 \n",
|
|
"1 173279 0 0 2 0 \n",
|
|
"2 173327 1 0 0 0 \n",
|
|
"\n",
|
|
" automaton \n",
|
|
"0 HOA: v1 States: 5 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
|
|
"1 HOA: v1 States: 4 Start: 0 AP: 3 \"a\" \"c\" \"b\" a... \n",
|
|
"2 NaN "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut, log = spot.sat_minimize(large, acc='co-Buchi', sat_incr=2, state_based=True, return_log=True)\n",
|
|
"display(aut)\n",
|
|
"display(log)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Here is how we can extract the automata from that log:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 17,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"automaton from line 0:\n"
|
|
]
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"553pt\" height=\"226pt\"\n",
|
|
" viewBox=\"0.00 0.00 553.00 226.08\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 222.08)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-222.08 549,-222.08 549,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"251\" y=\"-203.88\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"274\" y=\"-203.88\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"290\" y=\"-203.88\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"241\" y=\"-189.88\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-104.08C62,-104.08 50,-104.08 50,-104.08 44,-104.08 38,-98.08 38,-92.08 38,-92.08 38,-78.08 38,-78.08 38,-72.08 44,-66.08 50,-66.08 50,-66.08 62,-66.08 62,-66.08 68,-66.08 74,-72.08 74,-78.08 74,-78.08 74,-92.08 74,-92.08 74,-98.08 68,-104.08 62,-104.08\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-88.88\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-73.88\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-85.08C2.79,-85.08 17.15,-85.08 30.63,-85.08\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-85.08 30.94,-88.23 34.44,-85.08 30.94,-85.08 30.94,-85.08 30.94,-85.08 34.44,-85.08 30.94,-81.93 37.94,-85.08 37.94,-85.08\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-104.11C48.54,-113.61 50.73,-122.08 56,-122.08 59.87,-122.08 62.08,-117.51 62.62,-111.32\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-104.11 65.77,-111.08 62.58,-107.61 62.62,-111.11 62.62,-111.11 62.62,-111.11 62.58,-107.61 59.47,-111.14 62.55,-104.11 62.55,-104.11\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-125.88\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M251,-66.08C251,-66.08 239,-66.08 239,-66.08 233,-66.08 227,-60.08 227,-54.08 227,-54.08 227,-40.08 227,-40.08 227,-34.08 233,-28.08 239,-28.08 239,-28.08 251,-28.08 251,-28.08 257,-28.08 263,-34.08 263,-40.08 263,-40.08 263,-54.08 263,-54.08 263,-60.08 257,-66.08 251,-66.08\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"240.5\" y=\"-50.88\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"237\" y=\"-35.88\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.28,-71.36C79.67,-67.75 85.83,-64.26 92,-62.08 134.87,-46.92 188.5,-45.34 219.25,-45.94\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"226.55,-46.14 219.47,-49.1 223.05,-46.05 219.55,-45.95 219.55,-45.95 219.55,-45.95 223.05,-46.05 219.64,-42.8 226.55,-46.14 226.55,-46.14\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"112.5\" y=\"-65.88\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M251,-120.08C251,-120.08 239,-120.08 239,-120.08 233,-120.08 227,-114.08 227,-108.08 227,-108.08 227,-96.08 227,-96.08 227,-90.08 233,-84.08 239,-84.08 239,-84.08 251,-84.08 251,-84.08 257,-84.08 263,-90.08 263,-96.08 263,-96.08 263,-108.08 263,-108.08 263,-114.08 257,-120.08 251,-120.08\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"245\" y=\"-98.38\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.4,-83.43C101.02,-81.3 153.38,-78.69 197,-86.08 204.65,-87.37 212.73,-89.73 219.99,-92.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"226.93,-94.79 219.28,-95.34 223.65,-93.59 220.36,-92.39 220.36,-92.39 220.36,-92.39 223.65,-93.59 221.44,-89.43 226.93,-94.79 226.93,-94.79\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"114.5\" y=\"-89.88\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M533,-131.08C533,-131.08 521,-131.08 521,-131.08 515,-131.08 509,-125.08 509,-119.08 509,-119.08 509,-107.08 509,-107.08 509,-101.08 515,-95.08 521,-95.08 521,-95.08 533,-95.08 533,-95.08 539,-95.08 545,-101.08 545,-107.08 545,-107.08 545,-119.08 545,-119.08 545,-125.08 539,-131.08 533,-131.08\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"527\" y=\"-109.38\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M69.73,-104.41C75.68,-112.12 83.36,-120.48 92,-126.08 139.82,-157.03 158.62,-153.99 215,-162.08 325.1,-177.86 355.22,-160.24 464,-137.08 476.24,-134.47 479.28,-133.47 491,-129.08 494.68,-127.7 498.51,-126.11 502.23,-124.48\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"508.76,-121.54 503.67,-127.29 505.57,-122.98 502.37,-124.42 502.37,-124.42 502.37,-124.42 505.57,-122.98 501.08,-121.55 508.76,-121.54 508.76,-121.54\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"325.5\" y=\"-170.88\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M442,-92.08C442,-92.08 430,-92.08 430,-92.08 424,-92.08 418,-86.08 418,-80.08 418,-80.08 418,-68.08 418,-68.08 418,-62.08 424,-56.08 430,-56.08 430,-56.08 442,-56.08 442,-56.08 448,-56.08 454,-62.08 454,-68.08 454,-68.08 454,-80.08 454,-80.08 454,-86.08 448,-92.08 442,-92.08\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"436\" y=\"-70.38\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M68.54,-65.69C74.56,-57.06 82.63,-47.43 92,-41.08 139.26,-9.05 158.52,-12.39 215,-4.08 293.93,7.54 318.56,-8.56 390,-44.08 397.34,-47.72 404.9,-52.37 411.69,-56.91\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"417.67,-61.02 410.12,-59.66 414.79,-59.04 411.9,-57.06 411.9,-57.06 411.9,-57.06 414.79,-59.04 413.68,-54.46 417.67,-61.02 417.67,-61.02\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-7.88\" font-family=\"Lato\" font-size=\"14.00\">a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M263.01,-47.45C290.13,-48.3 344.7,-51.09 390,-60.08 396.84,-61.43 404.11,-63.44 410.76,-65.51\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"417.7,-67.75 410.07,-68.59 414.37,-66.67 411.04,-65.59 411.04,-65.59 411.04,-65.59 414.37,-66.67 412.01,-62.6 417.7,-67.75 417.7,-67.75\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"341.5\" y=\"-63.88\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M226.87,-104.27C198.45,-107.4 139.93,-111.68 92,-101.08 88.25,-100.25 84.42,-98.98 80.73,-97.52\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.3,-94.73 81.97,-94.63 77.51,-96.12 80.72,-97.52 80.72,-97.52 80.72,-97.52 77.51,-96.12 79.46,-100.4 74.3,-94.73 74.3,-94.73\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-110.88\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M227.63,-120.23C224.96,-129.61 230.75,-138.08 245,-138.08 255.46,-138.08 261.37,-133.51 262.71,-127.37\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"262.37,-120.23 265.84,-127.07 262.53,-123.72 262.7,-127.22 262.7,-127.22 262.7,-127.22 262.53,-123.72 259.55,-127.37 262.37,-120.23 262.37,-120.23\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-141.88\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M263.24,-107.09C272.06,-109.4 283.01,-111.9 293,-113.08 368.79,-122.03 459.43,-117.79 501.86,-114.93\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"508.96,-114.44 502.2,-118.07 505.47,-114.68 501.98,-114.93 501.98,-114.93 501.98,-114.93 505.47,-114.68 501.76,-111.78 508.96,-114.44 508.96,-114.44\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"408\" y=\"-121.88\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M263.11,-99.54C296.76,-94.56 371.65,-83.46 410.52,-77.7\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"417.8,-76.62 411.33,-80.77 414.33,-77.14 410.87,-77.65 410.87,-77.65 410.87,-77.65 414.33,-77.14 410.41,-74.53 417.8,-76.62 417.8,-76.62\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"293\" y=\"-97.88\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M518.17,-94.91C508.6,-75.29 490.36,-45.09 464,-32.08 399.85,-0.39 311.91,-23.53 270.04,-37.91\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"263.25,-40.31 268.81,-35.01 266.55,-39.14 269.85,-37.98 269.85,-37.98 269.85,-37.98 266.55,-39.14 270.9,-40.95 263.25,-40.31 263.25,-40.31\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"430.5\" y=\"-35.88\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M519.76,-131.23C518.65,-140.61 521.06,-149.08 527,-149.08 531.36,-149.08 533.82,-144.51 534.38,-138.37\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"534.24,-131.23 537.52,-138.16 534.31,-134.73 534.37,-138.23 534.37,-138.23 534.37,-138.23 534.31,-134.73 531.23,-138.29 534.24,-131.23 534.24,-131.23\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"523.5\" y=\"-152.88\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->3 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M454.16,-81.6C467.83,-87.58 487.11,-96.03 502.26,-102.67\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"508.89,-105.58 501.22,-105.65 505.69,-104.17 502.48,-102.77 502.48,-102.77 502.48,-102.77 505.69,-104.17 503.75,-99.88 508.89,-105.58 508.89,-105.58\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"486.5\" y=\"-99.88\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe1205266c0> >"
|
|
]
|
|
},
|
|
"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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"593pt\" height=\"221pt\"\n",
|
|
" viewBox=\"0.00 0.00 593.00 221.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.0 1.0) rotate(0) translate(4 217)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-217 589,-217 589,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"294\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"310\" y=\"-198.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"261\" y=\"-184.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-104C62,-104 50,-104 50,-104 44,-104 38,-98 38,-92 38,-92 38,-78 38,-78 38,-72 44,-66 50,-66 50,-66 62,-66 62,-66 68,-66 74,-72 74,-78 74,-78 74,-92 74,-92 74,-98 68,-104 62,-104\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-85C2.79,-85 17.15,-85 30.63,-85\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-85 30.94,-88.15 34.44,-85 30.94,-85 30.94,-85 30.94,-85 34.44,-85 30.94,-81.85 37.94,-85 37.94,-85\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-104.04C48.54,-113.53 50.73,-122 56,-122 59.87,-122 62.08,-117.43 62.62,-111.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-104.04 65.77,-111.01 62.58,-107.54 62.62,-111.04 62.62,-111.04 62.62,-111.04 62.58,-107.54 59.47,-111.07 62.55,-104.04 62.55,-104.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"3.5\" y=\"-125.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M459.5,-87C459.5,-87 447.5,-87 447.5,-87 441.5,-87 435.5,-81 435.5,-75 435.5,-75 435.5,-63 435.5,-63 435.5,-57 441.5,-51 447.5,-51 447.5,-51 459.5,-51 459.5,-51 465.5,-51 471.5,-57 471.5,-63 471.5,-63 471.5,-75 471.5,-75 471.5,-81 465.5,-87 459.5,-87\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"453.5\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.02,-88.51C79.71,-89.53 86.1,-90.5 92,-91 138.5,-94.96 150.38,-93 197,-91 282.32,-87.33 383.23,-76.81 428.46,-71.76\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"435.49,-70.97 428.89,-74.89 432.01,-71.36 428.53,-71.76 428.53,-71.76 428.53,-71.76 432.01,-71.36 428.18,-68.63 435.49,-70.97 435.49,-70.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-93.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M573,-98C573,-98 561,-98 561,-98 555,-98 549,-92 549,-86 549,-86 549,-72 549,-72 549,-66 555,-60 561,-60 561,-60 573,-60 573,-60 579,-60 585,-66 585,-72 585,-72 585,-86 585,-86 585,-92 579,-98 573,-98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"562.5\" y=\"-82.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"559\" y=\"-67.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.04,-97.39C79.52,-100.76 85.79,-104.03 92,-106 265.98,-161.13 329.43,-188.42 502,-129 517.58,-123.64 532.28,-112.75 543.64,-102.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"548.95,-97.54 545.98,-104.62 546.39,-99.93 543.83,-102.32 543.83,-102.32 543.83,-102.32 546.39,-99.93 541.68,-100.02 548.95,-97.54 548.95,-97.54\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"297\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M253,-36C253,-36 241,-36 241,-36 235,-36 229,-30 229,-24 229,-24 229,-12 229,-12 229,-6 235,0 241,0 241,0 253,0 253,0 259,0 265,-6 265,-12 265,-12 265,-24 265,-24 265,-30 259,-36 253,-36\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"247\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.1,-80.68C100.78,-73.74 153.73,-59.12 197,-42 205.4,-38.68 214.33,-34.5 222.24,-30.57\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"228.61,-27.35 223.79,-33.32 225.49,-28.93 222.37,-30.51 222.37,-30.51 222.37,-30.51 225.49,-28.93 220.94,-27.7 228.61,-27.35 228.61,-27.35\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"114.5\" y=\"-78.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M440.47,-87.15C438.47,-96.54 442.81,-105 453.5,-105 461.35,-105 465.77,-100.44 466.78,-94.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"466.53,-87.15 469.92,-94.04 466.65,-90.65 466.77,-94.15 466.77,-94.15 466.77,-94.15 466.65,-90.65 463.63,-94.26 466.53,-87.15 466.53,-87.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"450\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M471.74,-63.9C487.39,-60.04 511.01,-56.16 531,-61 534.82,-61.92 538.69,-63.34 542.39,-64.98\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"548.83,-68.12 541.16,-67.89 545.69,-66.59 542.54,-65.06 542.54,-65.06 542.54,-65.06 545.69,-66.59 543.92,-62.23 548.83,-68.12 548.83,-68.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"520\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M548.95,-78.06C540.27,-77.53 529.57,-76.82 520,-76 506.41,-74.83 491.27,-73.23 478.97,-71.86\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"471.72,-71.04 479.03,-68.69 475.2,-71.43 478.68,-71.82 478.68,-71.82 478.68,-71.82 475.2,-71.43 478.32,-74.95 471.72,-71.04 471.72,-71.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"522\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M559.72,-98.04C558.71,-107.53 561.14,-116 567,-116 571.3,-116 573.75,-111.43 574.35,-105.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"574.28,-98.04 577.5,-105 574.32,-101.54 574.35,-105.04 574.35,-105.04 574.35,-105.04 574.32,-101.54 571.2,-105.07 574.28,-98.04 574.28,-98.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"561.5\" y=\"-119.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M228.76,-13.47C198.57,-6.56 135.24,3.2 92,-23 78.77,-31.02 70.11,-46.02 64.71,-59.26\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.18,-65.97 61.7,-58.31 63.41,-62.7 64.65,-59.42 64.65,-59.42 64.65,-59.42 63.41,-62.7 67.6,-60.53 62.18,-65.97 62.18,-65.97\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265.18,-23.11C274.56,-25.85 286.39,-29.22 297,-32 343.23,-44.1 397.62,-56.66 428.28,-63.59\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"435.18,-65.14 427.66,-66.68 431.76,-64.38 428.35,-63.61 428.35,-63.61 428.35,-63.61 431.76,-64.38 429.04,-60.53 435.18,-65.14 435.18,-65.14\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"314\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M265.06,-15C307.01,-8.38 417.93,4.54 502,-27 517.67,-32.88 532.37,-44.23 543.72,-54.83\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"549.01,-59.94 541.79,-57.34 546.5,-57.51 543.98,-55.08 543.98,-55.08 543.98,-55.08 546.5,-57.51 546.17,-52.81 549.01,-59.94 549.01,-59.94\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"405\" y=\"-30.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M229.99,-36.15C227.38,-45.54 233.05,-54 247,-54 257.25,-54 263.03,-49.44 264.34,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"264.01,-36.15 267.48,-43 264.17,-39.65 264.33,-43.15 264.33,-43.15 264.33,-43.15 264.17,-39.65 261.18,-43.29 264.01,-36.15 264.01,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"217\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe120526cc0> >"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"for line, data in log.iterrows():\n",
|
|
" if type(data.automaton) is str:\n",
|
|
" print(\"automaton from line {}:\".format(line))\n",
|
|
" display(spot.automaton(data.automaton + \"\\n\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## `sat_langmap`\n",
|
|
"\n",
|
|
"When using the default binary search approach, the `sat_langmap=True` can help refine the lower bound by first testing the language-equivalence of all states in the automaton. This allows to form equivalence classes of states, and clearly the minimal automaton needs at least as many states as the number of equivalence states.\n",
|
|
"\n",
|
|
"For instance in the `large` automaton we use as example, the 6 states correspond to only two different languages. This can be seen with the `highlight_language()` function, which colors states with identical languages. This information can be used by the minimization function to search a minimal automaton between 2 and 6 states."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 18,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Title: & | F G a F b F G c Pages: 1 -->\n",
|
|
"<svg width=\"729pt\" height=\"272pt\"\n",
|
|
" viewBox=\"0.00 0.00 729.00 271.77\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(0.9174311926605504 0.9174311926605504) rotate(0) translate(4 292)\">\n",
|
|
"<title>& | F G a F b F G c</title>\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-292 790,-292 790,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"278.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">(Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"305.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"321.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"363.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"379.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">)) | (Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"425.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"<text text-anchor=\"start\" x=\"441.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"483.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"<text text-anchor=\"start\" x=\"499.5\" y=\"-273.8\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
|
|
"<text text-anchor=\"start\" x=\"365.5\" y=\"-259.8\" font-family=\"Lato\" font-size=\"14.00\">[Rabin 2]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M74,-194C74,-194 50,-194 50,-194 44,-194 38,-188 38,-182 38,-182 38,-170 38,-170 38,-164 44,-158 50,-158 50,-158 74,-158 74,-158 80,-158 86,-164 86,-170 86,-170 86,-182 86,-182 86,-188 80,-194 74,-194\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"57.5\" y=\"-179.8\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
|
|
"<text text-anchor=\"start\" x=\"46\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"62\" y=\"-165.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->5 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.04,-176C1.93,-176 16.35,-176 30.83,-176\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.88,-176 30.88,-179.15 34.38,-176 30.88,-176 30.88,-176 30.88,-176 34.38,-176 30.88,-172.85 37.88,-176 37.88,-176\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5->5 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>5->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M54.4,-194.15C53.23,-203.54 55.77,-212 62,-212 66.58,-212 69.16,-207.44 69.75,-201.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"69.6,-194.15 72.89,-201.09 69.67,-197.65 69.74,-201.15 69.74,-201.15 69.74,-201.15 69.67,-197.65 66.59,-201.22 69.6,-194.15 69.6,-194.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"9.5\" y=\"-215.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" d=\"M679,-166C679,-166 655,-166 655,-166 649,-166 643,-160 643,-154 643,-154 643,-142 643,-142 643,-136 649,-130 655,-130 655,-130 679,-130 679,-130 685,-130 691,-136 691,-142 691,-142 691,-154 691,-154 691,-160 685,-166 679,-166\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"662.5\" y=\"-151.8\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
|
"<text text-anchor=\"start\" x=\"651\" y=\"-137.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"667\" y=\"-137.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.25,-179.69C121.55,-184.95 190.8,-194 250,-194 250,-194 250,-194 573,-194 596.42,-194 620.04,-182.13 637.62,-170.45\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"643.81,-166.18 639.84,-172.75 640.93,-168.17 638.05,-170.16 638.05,-170.16 638.05,-170.16 640.93,-168.17 636.26,-167.56 643.81,-166.18 643.81,-166.18\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"373\" y=\"-197.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" d=\"M774,-204C774,-204 750,-204 750,-204 744,-204 738,-198 738,-192 738,-192 738,-180 738,-180 738,-174 744,-168 750,-168 750,-168 774,-168 774,-168 780,-168 786,-174 786,-180 786,-180 786,-192 786,-192 786,-198 780,-204 774,-204\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"757.5\" y=\"-189.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"746\" y=\"-175.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"762\" y=\"-175.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.19,-191.83C91.85,-195.2 98,-198.5 104,-201 165.69,-226.7 183.17,-237 250,-237 250,-237 250,-237 668,-237 693.31,-237 718.26,-222.3 735.93,-208.68\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"741.63,-204.12 738.13,-210.95 738.9,-206.31 736.16,-208.49 736.16,-208.49 736.16,-208.49 738.9,-206.31 734.2,-206.03 741.63,-204.12 741.63,-204.12\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"465.5\" y=\"-240.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"#ff4da0\" stroke-width=\"2\" d=\"M263,-133C263,-133 239,-133 239,-133 233,-133 227,-127 227,-121 227,-121 227,-109 227,-109 227,-103 233,-97 239,-97 239,-97 263,-97 263,-97 269,-97 275,-103 275,-109 275,-109 275,-121 275,-121 275,-127 269,-133 263,-133\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"246.5\" y=\"-118.8\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"235\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"251\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>5->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M86.4,-169.64C92.15,-168.1 98.29,-166.47 104,-165 150.55,-152.99 164.46,-157.11 209,-139 212.82,-137.45 216.71,-135.59 220.5,-133.6\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"226.74,-130.16 222.13,-136.29 223.68,-131.85 220.61,-133.53 220.61,-133.53 220.61,-133.53 223.68,-131.85 219.09,-130.77 226.74,-130.16 226.74,-130.16\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"126.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" d=\"M403,-87C403,-87 379,-87 379,-87 373,-87 367,-81 367,-75 367,-75 367,-63 367,-63 367,-57 373,-51 379,-51 379,-51 403,-51 403,-51 409,-51 415,-57 415,-63 415,-63 415,-75 415,-75 415,-81 409,-87 403,-87\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"386.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"375\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
"<text text-anchor=\"start\" x=\"391\" y=\"-58.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M378.34,-87.15C376.39,-96.54 380.61,-105 391,-105 398.63,-105 402.93,-100.44 403.91,-94.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"403.66,-87.15 407.05,-94.04 403.78,-90.65 403.91,-94.15 403.91,-94.15 403.91,-94.15 403.78,-90.65 400.76,-94.26 403.66,-87.15 403.66,-87.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"375.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"#1f78b4\" stroke-width=\"2\" d=\"M584,-36C584,-36 560,-36 560,-36 554,-36 548,-30 548,-24 548,-24 548,-12 548,-12 548,-6 554,0 560,0 560,0 584,0 584,0 590,0 596,-6 596,-12 596,-12 596,-24 596,-24 596,-30 590,-36 584,-36\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"567.5\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"556\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"572\" y=\"-7.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M415.03,-62.44C447.17,-53.28 505.49,-36.67 540.99,-26.55\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"547.77,-24.62 541.9,-29.57 544.4,-25.58 541.04,-26.54 541.04,-26.54 541.04,-26.54 544.4,-25.58 540.17,-23.51 547.77,-24.62 547.77,-24.62\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"464\" y=\"-60.8\" font-family=\"Lato\" font-size=\"14.00\">!a & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M415.27,-73.5C453.48,-81.15 531.72,-97.94 596,-119 609.4,-123.39 623.84,-129.18 636.11,-134.44\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"642.68,-137.29 635.01,-137.39 639.47,-135.9 636.26,-134.51 636.26,-134.51 636.26,-134.51 639.47,-135.9 637.52,-131.62 642.68,-137.29 642.68,-137.29\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"566.5\" y=\"-122.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M563.68,-36.15C562.4,-45.54 565.17,-54 572,-54 577.01,-54 579.84,-49.44 580.48,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"580.32,-36.15 583.63,-43.08 580.4,-39.65 580.48,-43.15 580.48,-43.15 580.48,-43.15 580.4,-39.65 577.33,-43.22 580.32,-36.15 580.32,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"568.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M591.17,-36.21C601.68,-47.23 614.8,-61.84 625,-76 635.86,-91.08 646.21,-109.28 653.79,-123.61\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"657.07,-129.89 651.03,-125.15 655.45,-126.79 653.83,-123.69 653.83,-123.69 653.83,-123.69 655.45,-126.79 656.62,-122.23 657.07,-129.89 657.07,-129.89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"614\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M658.68,-166.15C657.4,-175.54 660.17,-184 667,-184 672.01,-184 674.84,-179.44 675.48,-173.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"675.32,-166.15 678.63,-173.08 675.4,-169.65 675.48,-173.15 675.48,-173.15 675.48,-173.15 675.4,-169.65 672.33,-173.22 675.32,-166.15 675.32,-166.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"661.5\" y=\"-187.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->2 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>4->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M691.47,-157.59C703.56,-162.53 718.44,-168.61 731.33,-173.88\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"737.86,-176.55 730.19,-176.81 734.62,-175.22 731.38,-173.9 731.38,-173.9 731.38,-173.9 734.62,-175.22 732.57,-170.98 737.86,-176.55 737.86,-176.55\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"711\" y=\"-171.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M746.15,-167.8C739.08,-160.53 729.99,-152.95 720,-149 713.26,-146.33 705.64,-145.24 698.35,-145\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"691.21,-145.01 698.21,-141.85 694.71,-145 698.21,-145 698.21,-145 698.21,-145 694.71,-145 698.22,-148.15 691.21,-145.01 691.21,-145.01\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"709\" y=\"-152.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M753.68,-204.15C752.4,-213.54 755.17,-222 762,-222 767.01,-222 769.84,-217.44 770.48,-211.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"770.32,-204.15 773.63,-211.08 770.4,-207.65 770.48,-211.15 770.48,-211.15 770.48,-211.15 770.4,-207.65 767.33,-211.22 770.32,-204.15 770.32,-204.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"758.5\" y=\"-225.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->5 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M226.97,-110.91C196.83,-106.73 143.26,-103.44 104,-124 92.17,-130.2 82.63,-141.48 75.74,-151.96\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"71.99,-157.99 73.01,-150.38 73.84,-155.02 75.69,-152.04 75.69,-152.04 75.69,-152.04 73.84,-155.02 78.36,-153.7 71.99,-157.99 71.99,-157.99\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"104\" y=\"-127.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M275.1,-107.3C298.38,-99.54 334.43,-87.52 359.93,-79.02\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"366.83,-76.72 361.18,-81.93 363.51,-77.83 360.19,-78.94 360.19,-78.94 360.19,-78.94 363.51,-77.83 359.19,-75.95 366.83,-76.72 366.83,-76.72\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"293\" y=\"-104.8\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>3->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M275.3,-118.24C298.51,-121.37 335.16,-126.05 367,-129 464.94,-138.06 581.34,-144.1 635.48,-146.64\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"642.7,-146.98 635.56,-149.8 639.21,-146.81 635.71,-146.65 635.71,-146.65 635.71,-146.65 639.21,-146.81 635.86,-143.51 642.7,-146.98 642.7,-146.98\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"433\" y=\"-143.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M238.34,-133.15C236.39,-142.54 240.61,-151 251,-151 258.63,-151 262.93,-146.44 263.91,-140.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"263.66,-133.15 267.05,-140.04 263.78,-136.65 263.91,-140.15 263.91,-140.15 263.91,-140.15 263.78,-136.65 260.76,-140.26 263.66,-133.15 263.66,-133.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"221\" y=\"-154.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe1382323f0> >"
|
|
]
|
|
},
|
|
"execution_count": 18,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.highlight_languages(large); large"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Compare the next two logs, with and without `sat_langmap`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 19,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>687</td>\n",
|
|
" <td>21896</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>1905</td>\n",
|
|
" <td>100457</td>\n",
|
|
" <td>6</td>\n",
|
|
" <td>1</td>\n",
|
|
" <td>5</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" input.states target.states reachable.states edges transitions variables \\\n",
|
|
"0 6 3 NaN NaN NaN 687 \n",
|
|
"1 6 5 4 12 32 1905 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 21896 2 0 0 0 \n",
|
|
"1 100457 6 1 5 0 "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"729pt\" height=\"182pt\"\n",
|
|
" viewBox=\"0.00 0.00 729.00 181.89\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(0.970873786407767 0.970873786407767) rotate(0) translate(4 184.25)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-184.25 750.5,-184.25 750.5,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"351.75\" y=\"-166.05\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"374.75\" y=\"-166.05\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"390.75\" y=\"-166.05\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"341.75\" y=\"-152.05\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-63.25C62,-63.25 50,-63.25 50,-63.25 44,-63.25 38,-57.25 38,-51.25 38,-51.25 38,-37.25 38,-37.25 38,-31.25 44,-25.25 50,-25.25 50,-25.25 62,-25.25 62,-25.25 68,-25.25 74,-31.25 74,-37.25 74,-37.25 74,-51.25 74,-51.25 74,-57.25 68,-63.25 62,-63.25\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-48.05\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-33.05\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-44.25C2.79,-44.25 17.15,-44.25 30.63,-44.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-44.25 30.94,-47.4 34.44,-44.25 30.94,-44.25 30.94,-44.25 30.94,-44.25 34.44,-44.25 30.94,-41.1 37.94,-44.25 37.94,-44.25\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-63.29C48.54,-72.79 50.73,-81.25 56,-81.25 59.87,-81.25 62.08,-76.69 62.62,-70.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-63.29 65.77,-70.26 62.58,-66.79 62.62,-70.29 62.62,-70.29 62.62,-70.29 62.58,-66.79 59.47,-70.32 62.55,-63.29 62.55,-63.29\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"22.5\" y=\"-85.05\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M479,-111.25C479,-111.25 467,-111.25 467,-111.25 461,-111.25 455,-105.25 455,-99.25 455,-99.25 455,-87.25 455,-87.25 455,-81.25 461,-75.25 467,-75.25 467,-75.25 479,-75.25 479,-75.25 485,-75.25 491,-81.25 491,-87.25 491,-87.25 491,-99.25 491,-99.25 491,-105.25 485,-111.25 479,-111.25\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"473\" y=\"-89.55\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.3,-55.48C79.79,-58.68 86,-61.92 92,-64.25 191.51,-103.02 223.24,-94.94 330,-97.25 373.1,-98.19 383.93,-99.17 427,-97.25 433.79,-96.95 441.14,-96.4 447.89,-95.79\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"454.93,-95.13 448.26,-98.92 451.44,-95.46 447.96,-95.79 447.96,-95.79 447.96,-95.79 451.44,-95.46 447.66,-92.65 454.93,-95.13 454.93,-95.13\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"215\" y=\"-100.05\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M269.5,-50.25C269.5,-50.25 257.5,-50.25 257.5,-50.25 251.5,-50.25 245.5,-44.25 245.5,-38.25 245.5,-38.25 245.5,-26.25 245.5,-26.25 245.5,-20.25 251.5,-14.25 257.5,-14.25 257.5,-14.25 269.5,-14.25 269.5,-14.25 275.5,-14.25 281.5,-20.25 281.5,-26.25 281.5,-26.25 281.5,-38.25 281.5,-38.25 281.5,-44.25 275.5,-50.25 269.5,-50.25\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"263.5\" y=\"-28.55\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.27,-44.52C100.74,-44.79 152.89,-44.75 197,-41.25 210.65,-40.17 225.79,-38.15 238.08,-36.29\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"245.32,-35.17 238.89,-39.35 241.86,-35.7 238.4,-36.24 238.4,-36.24 238.4,-36.24 241.86,-35.7 237.92,-33.13 245.32,-35.17 245.32,-35.17\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"96\" y=\"-49.05\" font-family=\"Lato\" font-size=\"14.00\">(a & !b) | (!b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M676,-67.25C676,-67.25 664,-67.25 664,-67.25 658,-67.25 652,-61.25 652,-55.25 652,-55.25 652,-41.25 652,-41.25 652,-35.25 658,-29.25 664,-29.25 664,-29.25 676,-29.25 676,-29.25 682,-29.25 688,-35.25 688,-41.25 688,-41.25 688,-55.25 688,-55.25 688,-61.25 682,-67.25 676,-67.25\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"665.5\" y=\"-52.05\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"662\" y=\"-37.05\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M72.63,-25.03C78.14,-19.59 84.78,-14.33 92,-11.25 142.36,10.18 160.28,-6.59 215,-5.25 401.74,-0.7 450.64,-2.59 634,-38.25 637.55,-38.95 641.27,-39.83 644.9,-40.78\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"651.7,-42.67 644.11,-43.83 648.32,-41.73 644.95,-40.8 644.95,-40.8 644.95,-40.8 648.32,-41.73 645.8,-37.76 651.7,-42.67 651.7,-42.67\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"350.5\" y=\"-11.05\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M455.99,-111.41C453.38,-120.79 459.05,-129.25 473,-129.25 483.25,-129.25 489.03,-124.69 490.34,-118.55\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"490.01,-111.41 493.48,-118.25 490.17,-114.9 490.33,-118.4 490.33,-118.4 490.33,-118.4 490.17,-114.9 487.18,-118.55 490.01,-111.41 490.01,-111.41\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"469.5\" y=\"-133.05\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M491.24,-95.59C521.58,-98.92 585.83,-102.5 634,-81.25 639.05,-79.03 643.83,-75.75 648.13,-72.11\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"653.32,-67.37 650.28,-74.42 650.74,-69.73 648.15,-72.09 648.15,-72.09 648.15,-72.09 650.74,-69.73 646.03,-69.77 653.32,-67.37 653.32,-67.37\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"571\" y=\"-101.05\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M245.14,-27.49C213.83,-19.72 146.13,-6.65 92,-22.25 88.02,-23.4 84.06,-25.15 80.31,-27.16\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.23,-30.76 78.66,-24.48 77.25,-28.98 80.26,-27.19 80.26,-27.19 80.26,-27.19 77.25,-28.98 81.86,-29.91 74.23,-30.76 74.23,-30.76\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-26.05\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M281.83,-37.35C318.85,-48.23 405.68,-73.76 447.98,-86.19\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"454.86,-88.22 447.26,-89.26 451.5,-87.23 448.15,-86.24 448.15,-86.24 448.15,-86.24 451.5,-87.23 449.03,-83.22 454.86,-88.22 454.86,-88.22\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"330\" y=\"-82.05\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M245.39,-45.55C237.65,-56.65 243.68,-68.25 263.5,-68.25 279.45,-68.25 286.47,-60.74 284.57,-52.02\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"281.61,-45.55 287.39,-50.6 283.07,-48.73 284.52,-51.91 284.52,-51.91 284.52,-51.91 283.07,-48.73 281.66,-53.22 281.61,-45.55 281.61,-45.55\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"233.5\" y=\"-72.05\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M281.82,-32.79C334.64,-34.46 498.38,-39.81 634,-46.25 637.47,-46.42 641.12,-46.61 644.71,-46.81\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"651.91,-47.21 644.75,-49.96 648.42,-47.02 644.92,-46.82 644.92,-46.82 644.92,-46.82 648.42,-47.02 645.1,-43.67 651.91,-47.21 651.91,-47.21\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"445\" y=\"-45.05\" font-family=\"Lato\" font-size=\"14.00\">a & b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M651.74,-47.1C623.19,-45.79 564.73,-45.66 519,-62.25 511.35,-65.03 503.78,-69.42 497.09,-74.04\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"491.22,-78.3 495.03,-71.64 494.05,-76.25 496.88,-74.19 496.88,-74.19 496.88,-74.19 494.05,-76.25 498.73,-76.74 491.22,-78.3 491.22,-78.3\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"519\" y=\"-66.05\" font-family=\"Lato\" font-size=\"14.00\">c | (!a & !b) | (a & b)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M653.26,-67.29C650.94,-76.79 656.52,-85.25 670,-85.25 679.9,-85.25 685.54,-80.69 686.91,-74.5\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"686.74,-67.29 690.06,-74.21 686.83,-70.79 686.91,-74.29 686.91,-74.29 686.91,-74.29 686.83,-70.79 683.76,-74.37 686.74,-67.29 686.74,-67.29\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"593.5\" y=\"-89.05\" font-family=\"Lato\" font-size=\"14.00\">(!a & b & !c) | (a & !b & !c)</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe138b8aa50> >"
|
|
]
|
|
},
|
|
"execution_count": 19,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"# Binary search between 1 and 6\n",
|
|
"spot.sat_minimize(large, acc='co-Buchi', state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 20,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>6</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>4</td>\n",
|
|
" <td>12</td>\n",
|
|
" <td>32</td>\n",
|
|
" <td>1220</td>\n",
|
|
" <td>51612</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>2</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>162</td>\n",
|
|
" <td>3129</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>4</td>\n",
|
|
" <td>3</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>NaN</td>\n",
|
|
" <td>363</td>\n",
|
|
" <td>10496</td>\n",
|
|
" <td>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 4 4 12 32 1220 \n",
|
|
"1 4 2 NaN NaN NaN 162 \n",
|
|
"2 4 3 NaN NaN NaN 363 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 51612 3 0 2 0 \n",
|
|
"1 3129 0 0 0 0 \n",
|
|
"2 10496 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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"469pt\" height=\"190pt\"\n",
|
|
" viewBox=\"0.00 0.00 469.00 190.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 186)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-186 465,-186 465,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"209\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"232\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"248\" y=\"-167.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"199\" y=\"-153.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-96C62,-96 50,-96 50,-96 44,-96 38,-90 38,-84 38,-84 38,-72 38,-72 38,-66 44,-60 50,-60 50,-60 62,-60 62,-60 68,-60 74,-66 74,-72 74,-72 74,-84 74,-84 74,-90 68,-96 62,-96\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-74.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-78C2.79,-78 17.15,-78 30.63,-78\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-78 30.94,-81.15 34.44,-78 30.94,-78 30.94,-78 30.94,-78 34.44,-78 30.94,-74.85 37.94,-78 37.94,-78\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.49,-96.15C48.49,-105.54 50.66,-114 56,-114 59.92,-114 62.14,-109.44 62.64,-103.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.51,-96.15 65.79,-103.1 62.57,-99.65 62.64,-103.15 62.64,-103.15 62.64,-103.15 62.57,-99.65 59.49,-103.21 62.51,-96.15 62.51,-96.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"26\" y=\"-117.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M239,-88C239,-88 227,-88 227,-88 221,-88 215,-82 215,-76 215,-76 215,-62 215,-62 215,-56 221,-50 227,-50 227,-50 239,-50 239,-50 245,-50 251,-56 251,-62 251,-62 251,-76 251,-76 251,-82 245,-88 239,-88\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"228.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"225\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.17,-67.12C79.65,-64.22 85.89,-61.48 92,-60 137.36,-49.02 150.7,-54.14 197,-60 200.57,-60.45 204.29,-61.15 207.92,-61.97\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"214.72,-63.64 207.17,-65.03 211.32,-62.8 207.92,-61.97 207.92,-61.97 207.92,-61.97 211.32,-62.8 208.68,-58.91 214.72,-63.64 214.72,-63.64\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M449,-104C449,-104 437,-104 437,-104 431,-104 425,-98 425,-92 425,-92 425,-78 425,-78 425,-72 431,-66 437,-66 437,-66 449,-66 449,-66 455,-66 461,-72 461,-78 461,-78 461,-92 461,-92 461,-98 455,-104 449,-104\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"438.5\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"435\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.06,-88.3C79.64,-91.39 85.96,-94.59 92,-97 144.57,-117.98 158.89,-122.6 215,-130 289.74,-139.85 376.87,-111.08 418.08,-95.02\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"424.76,-92.37 419.41,-97.88 421.5,-93.66 418.25,-94.95 418.25,-94.95 418.25,-94.95 421.5,-93.66 417.09,-92.02 424.76,-92.37 424.76,-92.37\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"269\" y=\"-134.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M347,-36C347,-36 335,-36 335,-36 329,-36 323,-30 323,-24 323,-24 323,-12 323,-12 323,-6 329,0 335,0 335,0 347,0 347,0 353,0 359,-6 359,-12 359,-12 359,-24 359,-24 359,-30 353,-36 347,-36\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"341\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.31,-60.73C79.61,-56.3 85.71,-51.95 92,-49 167.55,-13.58 269.53,-13.88 315.61,-16.22\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"322.77,-16.63 315.6,-19.38 319.27,-16.43 315.78,-16.23 315.78,-16.23 315.78,-16.23 319.27,-16.43 315.96,-13.09 322.77,-16.63 322.77,-16.63\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"217\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M214.98,-72.44C209.29,-73.45 202.89,-74.44 197,-75 156.57,-78.88 109.28,-78.97 81.31,-78.57\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.29,-78.45 81.34,-75.42 77.79,-78.51 81.29,-78.57 81.29,-78.57 81.29,-78.57 77.79,-78.51 81.24,-81.72 74.29,-78.45 74.29,-78.45\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"94\" y=\"-81.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M223.17,-88.04C221.81,-97.53 225.09,-106 233,-106 238.81,-106 242.12,-101.43 242.93,-95.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"242.83,-88.04 246.08,-94.99 242.88,-91.54 242.93,-95.04 242.93,-95.04 242.93,-95.04 242.88,-91.54 239.78,-95.08 242.83,-88.04 242.83,-88.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"201\" y=\"-109.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M251.04,-70.94C268.94,-72.92 297.92,-76 323,-78 355.72,-80.62 393.57,-82.68 417.64,-83.87\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"424.64,-84.21 417.5,-87.01 421.15,-84.04 417.65,-83.87 417.65,-83.87 417.65,-83.87 421.15,-84.04 417.8,-80.72 424.64,-84.21 424.64,-84.21\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"323\" y=\"-83.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M251.03,-60.81C268.7,-52.31 296.46,-38.95 316.27,-29.42\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"322.66,-26.34 317.72,-32.22 319.51,-27.86 316.35,-29.38 316.35,-29.38 316.35,-29.38 319.51,-27.86 314.99,-26.54 322.66,-26.34 322.66,-26.34\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"271\" y=\"-54.8\" font-family=\"Lato\" font-size=\"14.00\">b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M433.9,-104.04C432.64,-113.53 435.68,-122 443,-122 448.38,-122 451.44,-117.43 452.19,-111.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"452.1,-104.04 455.34,-111 452.14,-107.54 452.19,-111.04 452.19,-111.04 452.19,-111.04 452.14,-107.54 449.04,-111.08 452.1,-104.04 452.1,-104.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"425\" y=\"-125.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->3 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M424.84,-73.76C411.71,-65.13 393.16,-52.88 377,-42 373.06,-39.35 368.88,-36.5 364.84,-33.74\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"359.05,-29.78 366.61,-31.13 361.94,-31.75 364.83,-33.73 364.83,-33.73 364.83,-33.73 361.94,-31.75 363.05,-36.33 359.05,-29.78 359.05,-29.78\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"377\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\">!b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M359.12,-15.14C373.09,-13.74 392.77,-13.94 407,-23 419.96,-31.25 428.59,-46.11 434.04,-59.22\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"436.6,-65.86 431.14,-60.47 435.34,-62.6 434.08,-59.33 434.08,-59.33 434.08,-59.33 435.34,-62.6 437.02,-58.2 436.6,-65.86 436.6,-65.86\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"386.5\" y=\"-26.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M331.95,-36.15C330.56,-45.54 333.58,-54 341,-54 346.45,-54 349.52,-49.44 350.22,-43.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"350.05,-36.15 353.37,-43.07 350.13,-39.65 350.22,-43.15 350.22,-43.15 350.22,-43.15 350.13,-39.65 347.07,-43.23 350.05,-36.15 350.05,-36.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"337.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe120526990> >"
|
|
]
|
|
},
|
|
"execution_count": 20,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"# Binary search between 2 and 6 thanks to sat_langmap\n",
|
|
"spot.sat_minimize(large, acc='co-Buchi', sat_langmap=True, state_based=True, display_log=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### `states`\n",
|
|
"\n",
|
|
"Sometimes we do not want a minimization loop, we just want to generate an equivalent automaton with a given number of states. In that case, we use the `states` option. However there is no constraint that all states should be reachable, so in the end, you could end with an automaton with fewer states than requested."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 21,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>input.states</th>\n",
|
|
" <th>target.states</th>\n",
|
|
" <th>reachable.states</th>\n",
|
|
" <th>edges</th>\n",
|
|
" <th>transitions</th>\n",
|
|
" <th>variables</th>\n",
|
|
" <th>clauses</th>\n",
|
|
" <th>enc.user</th>\n",
|
|
" <th>enc.sys</th>\n",
|
|
" <th>sat.user</th>\n",
|
|
" <th>sat.sys</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>7</td>\n",
|
|
" <td>23</td>\n",
|
|
" <td>56</td>\n",
|
|
" <td>1379</td>\n",
|
|
" <td>89168</td>\n",
|
|
" <td>5</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 2 7 7 23 56 1379 \n",
|
|
"\n",
|
|
" clauses enc.user enc.sys sat.user sat.sys \n",
|
|
"0 89168 5 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.43.0 (0)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"689pt\" height=\"360pt\"\n",
|
|
" viewBox=\"0.00 0.00 689.43 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(0.8474576271186441 0.8474576271186441) rotate(0) translate(4 420)\">\n",
|
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-420 808,-420 808,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"380.5\" y=\"-401.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
"<text text-anchor=\"start\" x=\"403.5\" y=\"-401.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"<text text-anchor=\"start\" x=\"419.5\" y=\"-401.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
|
"<text text-anchor=\"start\" x=\"370.5\" y=\"-387.8\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M62,-137C62,-137 50,-137 50,-137 44,-137 38,-131 38,-125 38,-125 38,-111 38,-111 38,-105 44,-99 50,-99 50,-99 62,-99 62,-99 68,-99 74,-105 74,-111 74,-111 74,-125 74,-125 74,-131 68,-137 62,-137\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"51.5\" y=\"-121.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"48\" y=\"-106.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-118C2.79,-118 17.15,-118 30.63,-118\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-118 30.94,-121.15 34.44,-118 30.94,-118 30.94,-118 30.94,-118 34.44,-118 30.94,-114.85 37.94,-118 37.94,-118\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 0->0 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M49.45,-137.04C48.54,-146.53 50.73,-155 56,-155 59.87,-155 62.08,-150.43 62.62,-144.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"62.55,-137.04 65.77,-144.01 62.58,-140.54 62.62,-144.04 62.62,-144.04 62.62,-144.04 62.58,-140.54 59.47,-144.07 62.55,-137.04 62.55,-137.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"22.5\" y=\"-158.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M607,-340C607,-340 595,-340 595,-340 589,-340 583,-334 583,-328 583,-328 583,-314 583,-314 583,-308 589,-302 595,-302 595,-302 607,-302 607,-302 613,-302 619,-308 619,-314 619,-314 619,-328 619,-328 619,-334 613,-340 607,-340\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"596.5\" y=\"-324.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"593\" y=\"-309.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M64.75,-137.07C70.58,-149.22 79.69,-164.43 92,-174 246.82,-294.39 496.96,-316.22 575.56,-320.15\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"582.62,-320.47 575.48,-323.3 579.13,-320.31 575.63,-320.15 575.63,-320.15 575.63,-320.15 579.13,-320.31 575.78,-317 582.62,-320.47 582.62,-320.47\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"318.5\" y=\"-297.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M287,-175C287,-175 275,-175 275,-175 269,-175 263,-169 263,-163 263,-163 263,-149 263,-149 263,-143 269,-137 275,-137 275,-137 287,-137 287,-137 293,-137 299,-143 299,-149 299,-149 299,-163 299,-163 299,-169 293,-175 287,-175\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"276.5\" y=\"-159.8\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"273\" y=\"-144.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.25,-113.77C108.5,-106.29 186.76,-93.74 245,-119 251.31,-121.74 257.03,-126.23 261.92,-131.16\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"266.89,-136.62 259.85,-133.57 264.53,-134.03 262.17,-131.45 262.17,-131.45 262.17,-131.45 264.53,-134.03 264.5,-129.32 266.89,-136.62 266.89,-136.62\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"92\" y=\"-122.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b & c) | (a & !b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M709,-259C709,-259 697,-259 697,-259 691,-259 685,-253 685,-247 685,-247 685,-235 685,-235 685,-229 691,-223 697,-223 697,-223 709,-223 709,-223 715,-223 721,-229 721,-235 721,-235 721,-247 721,-247 721,-253 715,-259 709,-259\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"703\" y=\"-237.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->4 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>0->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.13,-101.34C109.47,-68.82 194.37,0 280,0 280,0 280,0 602,0 694.72,0 703.1,-154.06 702.73,-215.83\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"702.65,-222.89 699.58,-215.85 702.69,-219.39 702.73,-215.89 702.73,-215.89 702.73,-215.89 702.69,-219.39 705.88,-215.92 702.65,-222.89 702.65,-222.89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"409.5\" y=\"-3.8\" font-family=\"Lato\" font-size=\"14.00\">(a & b) | (b & c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M607,-158C607,-158 595,-158 595,-158 589,-158 583,-152 583,-146 583,-146 583,-134 583,-134 583,-128 589,-122 595,-122 595,-122 607,-122 607,-122 613,-122 619,-128 619,-134 619,-134 619,-146 619,-146 619,-152 613,-158 607,-158\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"601\" y=\"-136.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->5 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>0->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M74.1,-106.53C79.58,-103.46 85.83,-100.57 92,-99 157.91,-82.26 177.03,-97.05 245,-99 361.64,-102.35 390.76,-105.74 507,-116 532.81,-118.28 540.16,-114.61 565,-122 568.77,-123.12 572.61,-124.64 576.3,-126.34\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"582.73,-129.51 575.06,-129.24 579.59,-127.96 576.45,-126.41 576.45,-126.41 576.45,-126.41 579.59,-127.96 577.85,-123.59 582.73,-129.51 582.73,-129.51\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"320.5\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M619.24,-310.69C632.75,-302.29 651.75,-289.78 667,-277 671.61,-273.14 676.28,-268.74 680.64,-264.38\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"685.59,-259.31 682.95,-266.52 683.15,-261.82 680.7,-264.32 680.7,-264.32 680.7,-264.32 683.15,-261.82 678.45,-262.12 685.59,-259.31 685.59,-259.31\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"637\" y=\"-301.8\" font-family=\"Lato\" font-size=\"14.00\">!b | c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M792,-347C792,-347 780,-347 780,-347 774,-347 768,-341 768,-335 768,-335 768,-323 768,-323 768,-317 774,-311 780,-311 780,-311 792,-311 792,-311 798,-311 804,-317 804,-323 804,-323 804,-335 804,-335 804,-341 798,-347 792,-347\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"786\" y=\"-325.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M619.22,-321.75C652,-323.19 723.45,-326.31 760.94,-327.95\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"767.96,-328.26 760.83,-331.1 764.47,-328.1 760.97,-327.95 760.97,-327.95 760.97,-327.95 764.47,-328.1 761.11,-324.8 767.96,-328.26 767.96,-328.26\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"685\" y=\"-329.8\" font-family=\"Lato\" font-size=\"14.00\">b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->0 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>2->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M262.8,-155.77C229.31,-154.93 153.24,-151.12 92,-134 88.22,-132.94 84.33,-131.53 80.58,-129.98\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"74.04,-127.08 81.72,-127.03 77.24,-128.5 80.44,-129.91 80.44,-129.91 80.44,-129.91 77.24,-128.5 79.17,-132.79 74.04,-127.08 74.04,-127.08\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"138.5\" y=\"-158.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->2 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>2->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M268.63,-175.04C266.91,-184.53 271.04,-193 281,-193 288.32,-193 292.48,-188.43 293.5,-182.25\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"293.37,-175.04 296.65,-181.98 293.44,-178.54 293.5,-182.04 293.5,-182.04 293.5,-182.04 293.44,-178.54 290.35,-182.09 293.37,-175.04 293.37,-175.04\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"249\" y=\"-196.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M288.75,-175.1C294.41,-188.69 303.73,-206.51 317,-218 347.64,-244.53 362.17,-243.54 402,-251 503.06,-269.93 626.54,-253.74 677.85,-245.32\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"684.89,-244.14 678.51,-248.41 681.44,-244.72 677.98,-245.3 677.98,-245.3 677.98,-245.3 681.44,-244.72 677.46,-242.19 684.89,-244.14 684.89,-244.14\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"541\" y=\"-262.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M299.09,-154.93C322.36,-153.5 365.32,-150.9 402,-149 464.4,-145.76 537.9,-142.59 575.35,-141.02\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"582.78,-140.71 575.92,-144.15 579.28,-140.85 575.79,-141 575.79,-141 575.79,-141 579.28,-140.85 575.66,-137.85 582.78,-140.71 582.78,-140.71\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"422.5\" y=\"-152.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6 -->\n",
|
|
"<g id=\"node8\" class=\"node\">\n",
|
|
"<title>6</title>\n",
|
|
"<path fill=\"#ffffaa\" stroke=\"black\" d=\"M460.5,-209C460.5,-209 448.5,-209 448.5,-209 442.5,-209 436.5,-203 436.5,-197 436.5,-197 436.5,-185 436.5,-185 436.5,-179 442.5,-173 448.5,-173 448.5,-173 460.5,-173 460.5,-173 466.5,-173 472.5,-179 472.5,-185 472.5,-185 472.5,-197 472.5,-197 472.5,-203 466.5,-209 460.5,-209\"/>\n",
|
|
"<text text-anchor=\"middle\" x=\"454.5\" y=\"-187.3\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->6 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>2->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M299.03,-158.66C319.33,-161.9 354.26,-167.75 384,-174 399.18,-177.19 416.09,-181.32 429.43,-184.7\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"436.43,-186.5 428.87,-187.81 433.04,-185.63 429.65,-184.76 429.65,-184.76 429.65,-184.76 433.04,-185.63 430.43,-181.71 436.43,-186.5 436.43,-186.5\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"317\" y=\"-177.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->4 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>4->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M695.76,-259.15C694.65,-268.54 697.06,-277 703,-277 707.36,-277 709.82,-272.44 710.38,-266.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"710.24,-259.15 713.52,-266.09 710.31,-262.65 710.37,-266.15 710.37,-266.15 710.37,-266.15 710.31,-262.65 707.23,-266.21 710.24,-259.15 710.24,-259.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"699.5\" y=\"-280.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->3 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>4->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M720.78,-259.23C733.16,-272.68 750.11,-291.1 763.49,-305.63\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"768.24,-310.79 761.18,-307.77 765.87,-308.21 763.5,-305.64 763.5,-305.64 763.5,-305.64 765.87,-308.21 765.82,-303.51 768.24,-310.79 768.24,-310.79\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"739\" y=\"-293.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->2 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>5->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M582.97,-136.17C564.41,-132.21 533.77,-126.29 507,-124 460.5,-120.03 448.32,-118.36 402,-124 363.37,-128.7 354.47,-134.49 317,-145 313.41,-146.01 309.64,-147.13 305.95,-148.26\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"299.03,-150.41 304.77,-145.32 302.37,-149.37 305.71,-148.33 305.71,-148.33 305.71,-148.33 302.37,-149.37 306.65,-151.34 299.03,-150.41 299.03,-150.41\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"402\" y=\"-127.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (!b & !c)</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->4 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>5->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M619.24,-154.08C632.75,-165.42 651.74,-182.04 667,-198 672.7,-203.97 678.51,-210.76 683.72,-217.16\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"688.31,-222.89 681.47,-219.39 686.12,-220.16 683.93,-217.42 683.93,-217.42 683.93,-217.42 686.12,-220.16 686.39,-215.46 688.31,-222.89 688.31,-222.89\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"648\" y=\"-201.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->5 -->\n",
|
|
"<g id=\"edge20\" class=\"edge\">\n",
|
|
"<title>5->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M591.95,-158.15C590.56,-167.54 593.58,-176 601,-176 606.45,-176 609.52,-171.44 610.22,-165.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"610.05,-158.15 613.37,-165.07 610.13,-161.65 610.22,-165.15 610.22,-165.15 610.22,-165.15 610.13,-161.65 607.07,-165.23 610.05,-158.15 610.05,-158.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"571\" y=\"-179.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->1 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>3->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M767.75,-335.65C762.15,-337.61 755.87,-339.6 750,-341 737.34,-344.01 733.98,-344.11 721,-345 683.59,-347.57 672.86,-347.97 637,-337 633.25,-335.85 629.37,-334.39 625.63,-332.81\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"619.09,-329.9 626.77,-329.87 622.29,-331.33 625.49,-332.75 625.49,-332.75 625.49,-332.75 622.29,-331.33 624.21,-335.63 619.09,-329.9 619.09,-329.9\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"697.5\" y=\"-349.8\" font-family=\"Lato\" font-size=\"14.00\">!c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M778.76,-347.15C777.65,-356.54 780.06,-365 786,-365 790.36,-365 792.82,-360.44 793.38,-354.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"793.24,-347.15 796.52,-354.09 793.31,-350.65 793.37,-354.15 793.37,-354.15 793.37,-354.15 793.31,-350.65 790.23,-354.21 793.24,-347.15 793.24,-347.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"782.5\" y=\"-368.8\" font-family=\"Lato\" font-size=\"14.00\">c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->2 -->\n",
|
|
"<g id=\"edge21\" class=\"edge\">\n",
|
|
"<title>6->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M436.34,-194.58C409.67,-199.32 357.19,-205.3 317,-189 311.78,-186.88 306.87,-183.59 302.49,-179.88\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"297.22,-175.03 304.5,-177.45 299.79,-177.4 302.37,-179.77 302.37,-179.77 302.37,-179.77 299.79,-177.4 300.23,-182.09 297.22,-175.03 297.22,-175.03\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"318.5\" y=\"-202.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->4 -->\n",
|
|
"<g id=\"edge22\" class=\"edge\">\n",
|
|
"<title>6->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M472.83,-194.52C515.88,-203.25 627.78,-225.94 677.53,-236.04\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"684.69,-237.49 677.2,-239.18 681.26,-236.79 677.83,-236.1 677.83,-236.1 677.83,-236.1 681.26,-236.79 678.45,-233.01 684.69,-237.49 684.69,-237.49\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"597\" y=\"-226.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->5 -->\n",
|
|
"<g id=\"edge23\" class=\"edge\">\n",
|
|
"<title>6->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M472.67,-185.52C494.32,-178.54 532.62,-165.94 565,-154 568.68,-152.64 572.56,-151.15 576.35,-149.66\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"582.98,-147.02 577.64,-152.54 579.73,-148.32 576.48,-149.61 576.48,-149.61 576.48,-149.61 579.73,-148.32 575.31,-146.69 582.98,-147.02 582.98,-147.02\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"525\" y=\"-170.8\" font-family=\"Lato\" font-size=\"14.00\">!b & !c</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->6 -->\n",
|
|
"<g id=\"edge24\" class=\"edge\">\n",
|
|
"<title>6->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"black\" d=\"M438.22,-209.15C435.71,-218.54 441.14,-227 454.5,-227 464.31,-227 469.84,-222.44 471.1,-216.3\"/>\n",
|
|
"<polygon fill=\"black\" stroke=\"black\" points=\"470.78,-209.15 474.24,-216.01 470.94,-212.65 471.09,-216.15 471.09,-216.15 471.09,-216.15 470.94,-212.65 467.95,-216.29 470.78,-209.15 470.78,-209.15\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"424.5\" y=\"-230.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b & c</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fe120556f00> >"
|
|
]
|
|
},
|
|
"execution_count": 21,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"spot.sat_minimize(small, acc=\"co-Buchi\", states=7, state_based=True, display_log=True)"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.9.2"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|