simulation: do not depend on bdd numbers for ordering classes

Fixes #262 again.  Reported by Maximilien Colange.

* spot/twaalgos/simulation.cc: Use state numbers to order classes, not
their signatures.  The problem was that even if two simulation of the
same automaton assign the same signature, the BDD identifier used for
that signature might be different, and therefore the ordering obtained
by using BDDs as keys in a map can be different.  A side-effect of
this change is that the order of states in automata produced by
simulation-based reduction may change; many tests had to be updated.
* tests/core/ltl2tgba.test: Add a new test case based on Maximilien's
report.
* tests/core/complement.test, tests/core/det.test,
tests/core/parseaut.test, tests/core/prodor.test, tests/core/scc.test,
tests/python/atva16-fig2a.ipynb, tests/python/automata.ipynb,
tests/python/decompose.ipynb, tests/python/decompose_scc.py,
tests/python/highlighting.ipynb, tests/python/piperead.ipynb,
tests/python/sccinfo.py, tests/python/simstate.py,
tests/python/testingaut.ipynb, tests/python/word.ipynb: Update
test case for new order of states.
This commit is contained in:
Alexandre Duret-Lutz 2017-06-02 11:23:42 +02:00
parent 101c2533f1
commit 9ab4b840fd
17 changed files with 1464 additions and 1402 deletions

View file

@ -1,7 +1,23 @@
{
"metadata": {
"name": "",
"signature": "sha256:4fc3934cf5fa0e612923dc4253b5e40115b103a93f588595a6706ec77e7994a9"
"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.5.3"
},
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
@ -31,7 +47,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
"aut = spot.translate('G(Fa <-> Xb)'); aut"
"aut = spot.translate('G(Fa <-> XXb)'); aut"
],
"language": "python",
"metadata": {},
@ -47,99 +63,150 @@
"<!-- Generated by graphviz version 2.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"386pt\" height=\"155pt\"\n",
" viewBox=\"0.00 0.00 385.50 155.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 151)\">\n",
"<svg width=\"465pt\" height=\"215pt\"\n",
" viewBox=\"0.00 0.00 464.50 215.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 211)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-151 381.5,-151 381.5,4 -4,4\"/>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-211 460.5,-211 460.5,4 -4,4\"/>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-45\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-41.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-55\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-51.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-45C2.79388,-45 17.1543,-45 30.6317,-45\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-45 30.9419,-48.1501 34.4419,-45 30.9419,-45.0001 30.9419,-45.0001 30.9419,-45.0001 34.4419,-45 30.9418,-41.8501 37.9419,-45 37.9419,-45\"/>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-55C2.79388,-55 17.1543,-55 30.6317,-55\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-55 30.9419,-58.1501 34.4419,-55 30.9419,-55.0001 30.9419,-55.0001 30.9419,-55.0001 34.4419,-55 30.9418,-51.8501 37.9419,-55 37.9419,-55\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"139\" cy=\"-96\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"139\" y=\"-92.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"139\" cy=\"-86\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"139\" y=\"-82.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M71.8566,-54.3542C84.5306,-62.3341 102.896,-73.8976 117.061,-82.816\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"123.238,-86.7051 115.636,-85.641 120.276,-84.8402 117.314,-82.9754 117.314,-82.9754 117.314,-82.9754 120.276,-84.8402 118.992,-80.3097 123.238,-86.7051 123.238,-86.7051\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M73.003,-61.1246C85.0955,-65.7526 101.855,-72.1668 115.327,-77.3227\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"122.03,-79.8881 114.367,-80.3279 118.761,-78.6371 115.493,-77.386 115.493,-77.386 115.493,-77.386 118.761,-78.6371 116.619,-74.4441 122.03,-79.8881 122.03,-79.8881\"/>\n",
"<text text-anchor=\"start\" x=\"94\" y=\"-75.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"248\" cy=\"-61\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"248\" y=\"-57.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"139\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"139\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>0&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.1963,-46.4481C108.109,-49.3039 183.696,-55.6692 222.691,-58.953\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"229.979,-59.5667 222.74,-62.1181 226.492,-59.2729 223.004,-58.9792 223.004,-58.9792 223.004,-58.9792 226.492,-59.2729 223.268,-55.8403 229.979,-59.5667 229.979,-59.5667\"/>\n",
"<text text-anchor=\"start\" x=\"135.5\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M72.6176,-47.866C84.9439,-42.2355 102.291,-34.3117 116.019,-28.0406\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"122.43,-25.1121 117.372,-30.8858 119.247,-26.5663 116.063,-28.0206 116.063,-28.0206 116.063,-28.0206 119.247,-26.5663 114.754,-25.1554 122.43,-25.1121 122.43,-25.1121\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-41.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node5\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"357\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"357\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"218\" cy=\"-107\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"218\" y=\"-103.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>0&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.3679,-43.4317C125.166,-38.8446 273.551,-25.4452 331.97,-20.17\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"338.957,-19.539 332.268,-23.3059 335.471,-19.8538 331.985,-20.1687 331.985,-20.1687 331.985,-20.1687 335.471,-19.8538 331.702,-17.0314 338.957,-19.539 338.957,-19.539\"/>\n",
"<text text-anchor=\"start\" x=\"188\" y=\"-37.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M156.708,-90.5567C167.403,-93.4737 181.445,-97.3031 193.286,-100.533\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"200.325,-102.452 192.743,-103.649 196.948,-101.531 193.571,-100.61 193.571,-100.61 193.571,-100.61 196.948,-101.531 194.4,-97.5713 200.325,-102.452 200.325,-102.452\"/>\n",
"<text text-anchor=\"start\" x=\"175\" y=\"-100.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M131.969,-112.664C130.406,-122.625 132.75,-132 139,-132 143.688,-132 146.178,-126.727 146.471,-119.888\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"146.031,-112.664 149.601,-119.46 146.244,-116.158 146.456,-119.651 146.456,-119.651 146.456,-119.651 146.244,-116.158 143.312,-119.842 146.031,-112.664 146.031,-112.664\"/>\n",
"<text text-anchor=\"start\" x=\"120.5\" y=\"-135.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"<!-- 4 -->\n",
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"327\" cy=\"-71\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"327\" y=\"-67.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M157,-98.8379C172.054,-100.594 194.318,-101.307 212,-94 219.178,-91.0336 225.76,-85.8674 231.231,-80.4911\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"236.314,-75.1185 233.791,-82.3685 233.908,-77.6611 231.503,-80.2038 231.503,-80.2038 231.503,-80.2038 233.908,-77.6611 229.215,-78.039 236.314,-75.1185 236.314,-75.1185\"/>\n",
"<text text-anchor=\"start\" x=\"176.5\" y=\"-118.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"185.5\" y=\"-103.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M155.656,-78.8828C167.543,-73.8869 184.441,-67.6441 200,-65 235.174,-59.0223 276.609,-63.083 302.091,-66.8263\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"309.149,-67.9155 301.75,-69.9609 305.69,-67.3817 302.231,-66.8478 302.231,-66.8478 302.231,-66.8478 305.69,-67.3817 302.711,-63.7347 309.149,-67.9155 309.149,-67.9155\"/>\n",
"<text text-anchor=\"start\" x=\"212.5\" y=\"-68.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M229.954,-62.6225C215.066,-64.4327 193.072,-68.0686 175,-75 169.996,-76.9191 164.895,-79.5369 160.19,-82.2732\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"154.066,-86.0235 158.39,-79.6814 157.05,-84.1956 160.035,-82.3677 160.035,-82.3677 160.035,-82.3677 157.05,-84.1956 161.68,-85.054 154.066,-86.0235 154.066,-86.0235\"/>\n",
"<text text-anchor=\"start\" x=\"175\" y=\"-78.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"<!-- 5 -->\n",
"<g id=\"node7\" class=\"node\"><title>5</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"327\" cy=\"-179\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"327\" y=\"-175.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M238.767,-76.5414C236.169,-86.9087 239.246,-97 248,-97 254.702,-97 258.077,-91.0847 258.124,-83.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"257.233,-76.5414 261.229,-83.0955 257.668,-80.0143 258.103,-83.4871 258.103,-83.4871 258.103,-83.4871 257.668,-80.0143 254.977,-83.8788 257.233,-76.5414 257.233,-76.5414\"/>\n",
"<text text-anchor=\"start\" x=\"231\" y=\"-115.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"240\" y=\"-100.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"<!-- 1&#45;&gt;5 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M145.052,-103.353C152.731,-126.145 169.745,-165.231 200,-182 232.013,-199.743 275.986,-193.018 302.622,-186.225\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"309.65,-184.328 303.713,-189.194 306.271,-185.24 302.892,-186.153 302.892,-186.153 302.892,-186.153 306.271,-185.24 302.071,-183.111 309.65,-184.328 309.65,-184.328\"/>\n",
"<text text-anchor=\"start\" x=\"212.5\" y=\"-195.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>2&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M265.251,-54.4692C283.425,-47.1658 312.983,-35.2873 333.402,-27.0815\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"339.947,-24.4513 334.626,-29.9844 336.699,-25.7565 333.452,-27.0616 333.452,-27.0616 333.452,-27.0616 336.699,-25.7565 332.277,-24.1388 339.947,-24.4513 339.947,-24.4513\"/>\n",
"<text text-anchor=\"start\" x=\"284\" y=\"-48.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"<g id=\"edge7\" class=\"edge\"><title>2&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M151.362,-31.1323C164.441,-46.2502 186.023,-71.1956 200.846,-88.3285\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"205.592,-93.8139 198.63,-90.5811 203.302,-91.167 201.012,-88.5201 201.012,-88.5201 201.012,-88.5201 203.302,-91.167 203.394,-86.4591 205.592,-93.8139 205.592,-93.8139\"/>\n",
"<text text-anchor=\"start\" x=\"175\" y=\"-68.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>2&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M156.924,-21.8749C185.025,-28.4443 242.977,-42.5668 291,-58 295.032,-59.2959 299.287,-60.7772 303.387,-62.2649\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"310.075,-64.7429 302.417,-65.2646 306.793,-63.5269 303.511,-62.3108 303.511,-62.3108 303.511,-62.3108 306.793,-63.5269 304.605,-59.3571 310.075,-64.7429 310.075,-64.7429\"/>\n",
"<text text-anchor=\"start\" x=\"212.5\" y=\"-44.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g id=\"node8\" class=\"node\"><title>6</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"436\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"436\" y=\"-18.3\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;6 -->\n",
"<g id=\"edge9\" class=\"edge\"><title>2&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M157.136,-18.2323C207.034,-18.9089 352.372,-20.8796 410.528,-21.6682\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"417.817,-21.767 410.775,-24.8217 414.317,-21.7195 410.818,-21.672 410.818,-21.672 410.818,-21.672 414.317,-21.7195 410.861,-18.5223 417.817,-21.767 417.817,-21.767\"/>\n",
"<text text-anchor=\"start\" x=\"267\" y=\"-24.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M347.767,-33.5414C345.169,-43.9087 348.246,-54 357,-54 363.702,-54 367.077,-48.0847 367.124,-40.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"366.233,-33.5414 370.229,-40.0955 366.668,-37.0143 367.103,-40.4871 367.103,-40.4871 367.103,-40.4871 366.668,-37.0143 363.977,-40.8788 366.233,-33.5414 366.233,-33.5414\"/>\n",
"<text text-anchor=\"start\" x=\"336.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"349\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M211.266,-124.037C209.892,-133.858 212.137,-143 218,-143 222.397,-143 224.759,-137.858 225.086,-131.143\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"224.734,-124.037 228.226,-130.873 224.907,-127.533 225.08,-131.029 225.08,-131.029 225.08,-131.029 224.907,-127.533 221.934,-131.185 224.734,-124.037 224.734,-124.037\"/>\n",
"<text text-anchor=\"start\" x=\"201\" y=\"-161.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"210\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g id=\"edge11\" class=\"edge\"><title>3&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M234.442,-114.796C249.614,-121.291 273.039,-128.132 291,-119 301.558,-113.632 309.687,-103.42 315.441,-93.7909\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"318.882,-87.604 318.233,-95.2526 317.181,-90.6629 315.48,-93.7218 315.48,-93.7218 315.48,-93.7218 317.181,-90.6629 312.727,-92.1909 318.882,-87.604 318.882,-87.604\"/>\n",
"<text text-anchor=\"start\" x=\"254\" y=\"-126.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>3&#45;&gt;5</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M230.453,-120.313C236.909,-127.314 245.39,-135.722 254,-142 269.46,-153.274 288.841,-163.021 303.599,-169.677\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"310.024,-172.512 302.348,-172.568 306.822,-171.099 303.62,-169.686 303.62,-169.686 303.62,-169.686 306.822,-171.099 304.891,-166.804 310.024,-172.512 310.024,-172.512\"/>\n",
"<text text-anchor=\"start\" x=\"254\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g id=\"edge13\" class=\"edge\"><title>4&#45;&gt;3</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M308.918,-72.5299C294.007,-74.2807 271.999,-77.8816 254,-85 248.953,-86.9961 243.833,-89.7328 239.124,-92.5982\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"233.003,-96.5281 237.192,-90.0954 235.949,-94.6371 238.894,-92.7462 238.894,-92.7462 238.894,-92.7462 235.949,-94.6371 240.596,-95.3969 233.003,-96.5281 233.003,-96.5281\"/>\n",
"<text text-anchor=\"start\" x=\"255.5\" y=\"-103.8\" font-family=\"Lato\" font-size=\"14.00\">a &amp; b</text>\n",
"<text text-anchor=\"start\" x=\"264.5\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>4&#45;&gt;4</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M317.767,-86.5414C315.169,-96.9087 318.246,-107 327,-107 333.702,-107 337.077,-101.085 337.124,-93.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"336.233,-86.5414 340.229,-93.0955 336.668,-90.0143 337.103,-93.4871 337.103,-93.4871 337.103,-93.4871 336.668,-90.0143 333.977,-93.8788 336.233,-86.5414 336.233,-86.5414\"/>\n",
"<text text-anchor=\"start\" x=\"308.5\" y=\"-110.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 5&#45;&gt;6 -->\n",
"<g id=\"edge15\" class=\"edge\"><title>5&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M337.875,-164.511C356.984,-136.471 399.072,-74.7167 421.037,-42.4872\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"425.149,-36.4538 423.81,-44.0122 423.178,-39.3459 421.207,-42.2381 421.207,-42.2381 421.207,-42.2381 423.178,-39.3459 418.604,-40.4641 425.149,-36.4538 425.149,-36.4538\"/>\n",
"<text text-anchor=\"start\" x=\"363\" y=\"-126.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 6&#45;&gt;6 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>6&#45;&gt;6</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M426.767,-37.5414C424.169,-47.9087 427.246,-58 436,-58 442.702,-58 446.077,-52.0847 446.124,-44.6591\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"445.233,-37.5414 449.229,-44.0955 445.668,-41.0143 446.103,-44.4871 446.103,-44.4871 446.103,-44.4871 445.668,-41.0143 442.977,-44.8788 445.233,-37.5414 445.233,-37.5414\"/>\n",
"<text text-anchor=\"start\" x=\"415.5\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\">!a &amp; !b</text>\n",
"<text text-anchor=\"start\" x=\"428\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fb71c0e18a0> >"
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fdf783f0510> >"
]
}
],
@ -168,12 +235,12 @@
"text": [
"Prefix:\n",
" 0\n",
" | !a\n",
"Cycle:\n",
" | a\n",
" 1\n",
" | a & b\t{0}\n",
" 2\n",
" | !a & b"
" | a\n",
"Cycle:\n",
" 3\n",
" | a & b\t{0}"
]
}
],
@ -200,7 +267,7 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"!a\n",
"a\n",
"{0}\n"
]
}
@ -228,7 +295,7 @@
"output_type": "pyout",
"prompt_number": 5,
"text": [
"!a; cycle{a & b; !a & b}"
"a; a; cycle{a & b}"
]
}
],
@ -246,8 +313,8 @@
"collapsed": false,
"input": [
"print(spot.bdd_format_formula(aut.get_dict(), word.prefix[0]))\n",
"print(spot.bdd_format_formula(aut.get_dict(), word.cycle[0]))\n",
"print(spot.bdd_format_formula(aut.get_dict(), word.cycle[1]))"
"print(spot.bdd_format_formula(aut.get_dict(), word.prefix[1]))\n",
"print(spot.bdd_format_formula(aut.get_dict(), word.cycle[0]))"
],
"language": "python",
"metadata": {},
@ -256,9 +323,9 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"!a\n",
"a & b\n",
"!a & b\n"
"a\n",
"a\n",
"a & b\n"
]
}
],
@ -268,7 +335,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Calling `simplifify()` will produce a shorter word that is compatible with the original word. For instance in the above word, the initial `!a` is compatible with both `a & b` and `!a & b`. The word obtained by restricting `!a` to `!a & b` is therefore still accepted, but it allows removing the prefix by rotating the cycle:"
"Calling `simplifify()` will produce a shorter word that is compatible with the original word. For instance in the above word, the initial `a` is compatible with both `a & b` and `a & !b`. The word obtained by restricting `a` to `a & b` is therefore still accepted, allowing us to remove the prefix."
]
},
{
@ -286,7 +353,7 @@
"output_type": "pyout",
"prompt_number": 7,
"text": [
"cycle{!a & b; a & b}"
"cycle{a & b}"
]
}
],
@ -313,7 +380,7 @@
"output_type": "pyout",
"prompt_number": 8,
"text": [
"cycle{!a & b; a & b}"
"cycle{a & b}"
]
}
],
@ -478,7 +545,7 @@
"</svg>\n"
],
"text": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fb71c0e1a20> >"
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fdf783f0e40> >"
]
}
],
@ -598,9 +665,10 @@
"evalue": "a twa_word may not have an empty cycle",
"output_type": "pyerr",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-18-971829bb8f5f>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# ... as long as this word is not printed.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m/home/adl/git/spot/python/spot/impl.py\u001b[0m in \u001b[0;36m__str__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 3599\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3600\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__str__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;34m\"std::string\"\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3601\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_impl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtwa_word___str__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3602\u001b[0m \u001b[0mtwa_word_swigregister\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_impl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtwa_word_swigregister\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3603\u001b[0m \u001b[0mtwa_word_swigregister\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtwa_word\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/adl/git/spot/python/spot/impl.py\u001b[0m in \u001b[0;36m__str__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 4160\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4161\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__str__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;34m\"std::string\"\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4162\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_impl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtwa_word___str__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4163\u001b[0m \u001b[0mtwa_word_swigregister\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_impl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtwa_word_swigregister\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4164\u001b[0m \u001b[0mtwa_word_swigregister\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtwa_word\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mRuntimeError\u001b[0m: a twa_word may not have an empty cycle"
]
}
@ -611,4 +679,4 @@
"metadata": {}
}
]
}
}