introduce stutter_invariant_letters()
* spot/twaalgos/stutter.cc, spot/twaalgos/stutter.hh (stutter_invariant_letters) (stutter_invariant_states): Get rid of the broken local variant. * tests/python/stutter-inv.ipynb, NEWS: Document. * python/spot/impl.i: Bind vector<bdd>.
This commit is contained in:
parent
f84ca9995c
commit
4711dcd74f
5 changed files with 254 additions and 480 deletions
|
|
@ -354,7 +354,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c8045a660> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f71841135d0> >"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -411,7 +411,7 @@
|
|||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 25
|
||||
"prompt_number": 11
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
|
|
@ -432,7 +432,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 26
|
||||
"prompt_number": 12
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
|
|
@ -626,7 +626,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c803f4de0> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f71840b9b40> >"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -816,7 +816,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c803f4de0> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f71840b9b40> >"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -979,7 +979,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c80480540> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f7184113480> >"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1066,7 +1066,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c8045a6c0> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f71841135a0> >"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1259,7 +1259,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c80480660> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f71840b9a80> >"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1271,17 +1271,17 @@
|
|||
"source": [
|
||||
"### Third example\n",
|
||||
"\n",
|
||||
"These procedures work regardless of the acceptance condition. Here is an example with state-based co-B\u00fcchi acceptance.\n",
|
||||
"These procedures work regardless of the acceptance condition. Here is an example with co-B\u00fcchi acceptance.\n",
|
||||
"\n",
|
||||
"In this case we do not even have a formula to pass as second argument, so the check will perform a costly complementation by determinization."
|
||||
"In this case we do not even have a formula to pass as second argument, so the check will perform a complementation by determinization."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"aut = spot.automaton('genaut --ks-nca=2 |')\n",
|
||||
"spot.highlight_stutter_invariant_states(aut, None, 5, True)\n",
|
||||
"aut = spot.automaton('randaut --seed=30 -Q4 -A\"Fin(0)\" a |')\n",
|
||||
"spot.highlight_stutter_invariant_states(aut, None, 5)\n",
|
||||
"display(aut)"
|
||||
],
|
||||
"language": "python",
|
||||
|
|
@ -1297,140 +1297,87 @@
|
|||
"<!-- Generated by graphviz version 2.38.0 (20140413.2041)\n",
|
||||
" -->\n",
|
||||
"<!-- Title: G Pages: 1 -->\n",
|
||||
"<svg width=\"602pt\" height=\"253pt\"\n",
|
||||
" viewBox=\"0.00 0.00 601.74 253.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 249)\">\n",
|
||||
"<svg width=\"349pt\" height=\"122pt\"\n",
|
||||
" viewBox=\"0.00 0.00 348.74 121.87\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 117.87)\">\n",
|
||||
"<title>G</title>\n",
|
||||
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-249 597.74,-249 597.74,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"274.37\" y=\"-230.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"299.37\" y=\"-230.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"315.37\" y=\"-230.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"264.37\" y=\"-216.8\" font-family=\"Lato\" font-size=\"14.00\">[co-B\u00fcchi]</text>\n",
|
||||
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-117.87 344.74,-117.87 344.74,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"147.87\" y=\"-99.6701\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"172.87\" y=\"-99.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"188.87\" y=\"-99.6701\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"137.87\" y=\"-85.6701\" font-family=\"Lato\" font-size=\"14.00\">[co-B\u00fcchi]</text>\n",
|
||||
"<!-- I -->\n",
|
||||
"<!-- 0 -->\n",
|
||||
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"64.8701\" cy=\"-105\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"60.3701\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"56.8701\" y=\"-93.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-26.8701\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-23.1701\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->0 -->\n",
|
||||
"<g id=\"edge1\" class=\"edge\"><title>I->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.04557,-105C1.94668,-105 16.0699,-105 30.6965,-105\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.8616,-105 30.8617,-108.15 34.3616,-105 30.8616,-105 30.8616,-105 30.8616,-105 34.3616,-105 30.8616,-101.85 37.8616,-105 37.8616,-105\"/>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-26.8701C2.79388,-26.8701 17.1543,-26.8701 30.6317,-26.8701\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-26.8701 30.9419,-30.0202 34.4419,-26.8701 30.9419,-26.8702 30.9419,-26.8702 30.9419,-26.8702 34.4419,-26.8701 30.9418,-23.7202 37.9419,-26.8701 37.9419,-26.8701\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1 -->\n",
|
||||
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"186.74\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"186.74\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->1 -->\n",
|
||||
"<g id=\"edge2\" class=\"edge\"><title>0->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M87.0245,-89.6464C109.264,-73.5052 143.988,-48.3029 165.771,-32.493\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"171.551,-28.2982 167.736,-34.9592 168.719,-30.354 165.886,-32.4099 165.886,-32.4099 165.886,-32.4099 168.719,-30.354 164.036,-29.8606 171.551,-28.2982 171.551,-28.2982\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"130.24\" y=\"-74.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<!-- 0->0 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\"><title>0->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M49.6208,-43.9074C48.3189,-53.728 50.4453,-62.8701 56,-62.8701 60.166,-62.8701 62.4036,-57.7276 62.7128,-51.0134\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"62.3792,-43.9074 65.8541,-50.7519 62.5434,-47.4035 62.7076,-50.8997 62.7076,-50.8997 62.7076,-50.8997 62.5434,-47.4035 59.561,-51.0474 62.3792,-43.9074 62.3792,-43.9074\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"52.5\" y=\"-66.6701\" 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=\"#e31a1c\" stroke-width=\"2\" cx=\"357.74\" cy=\"-69\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"357.74\" y=\"-65.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"139\" cy=\"-26.8701\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"139\" y=\"-23.1701\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->2 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\"><title>0->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M91.9203,-106.884C138.901,-109.495 240.49,-111.526 321.74,-88 326.559,-86.6047 331.458,-84.4738 336.005,-82.1365\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"342.364,-78.6261 337.758,-84.7669 339.3,-80.3177 336.236,-82.0093 336.236,-82.0093 336.236,-82.0093 339.3,-80.3177 334.713,-79.2516 342.364,-78.6261 342.364,-78.6261\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"186.74\" y=\"-111.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<g id=\"edge2\" class=\"edge\"><title>0->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M74.178,-26.8701C85.6688,-26.8701 100.959,-26.8701 113.693,-26.8701\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"120.847,-26.8701 113.847,-30.0202 117.347,-26.8701 113.847,-26.8702 113.847,-26.8702 113.847,-26.8702 117.347,-26.8701 113.847,-23.7202 120.847,-26.8701 120.847,-26.8701\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->0 -->\n",
|
||||
"<g id=\"edge5\" class=\"edge\"><title>2->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M124.262,-16.096C115.3,-10.3598 103.222,-5.02044 92,-7.87006 87.1374,-9.10482 82.2193,-11.1661 77.668,-13.4862\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"71.3113,-17.0043 75.9105,-10.8585 74.3736,-15.3095 77.4359,-13.6146 77.4359,-13.6146 77.4359,-13.6146 74.3736,-15.3095 78.9613,-16.3706 71.3113,-17.0043 71.3113,-17.0043\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-11.6701\" 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=\"#e31a1c\" stroke-width=\"2\" cx=\"466.74\" cy=\"-103\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"466.74\" y=\"-99.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->3 -->\n",
|
||||
"<g id=\"edge4\" class=\"edge\"><title>0->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M89.6166,-115.618C96.0337,-118.094 103.055,-120.455 109.74,-122 135.381,-127.926 142.454,-125.734 168.74,-127 260.638,-131.425 284.644,-141.895 375.74,-129 399.197,-125.68 425.098,-117.72 443.068,-111.476\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"449.781,-109.095 444.237,-114.404 446.482,-110.265 443.183,-111.435 443.183,-111.435 443.183,-111.435 446.482,-110.265 442.13,-108.466 449.781,-109.095 449.781,-109.095\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"272.24\" y=\"-138.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4 -->\n",
|
||||
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"575.74\" cy=\"-103\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"575.74\" y=\"-99.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->4 -->\n",
|
||||
"<g id=\"edge5\" class=\"edge\"><title>0->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M81.0053,-126.544C101.471,-152.884 140.64,-194 185.74,-194 185.74,-194 185.74,-194 467.74,-194 510.409,-194 544.736,-151.489 562.192,-124.578\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"566.06,-118.437 564.994,-126.039 564.195,-121.398 562.329,-124.36 562.329,-124.36 562.329,-124.36 564.195,-121.398 559.664,-122.681 566.06,-118.437 566.06,-118.437\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"357.74\" y=\"-197.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->0 -->\n",
|
||||
"<g id=\"edge6\" class=\"edge\"><title>1->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M168.873,-14.9899C152.427,-12.9911 127.382,-12.527 109.74,-24 92.6966,-35.0838 81.762,-55.1336 75.072,-72.5116\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"72.6279,-79.2636 72.0486,-71.6093 73.8192,-75.9725 75.0106,-72.6815 75.0106,-72.6815 75.0106,-72.6815 73.8192,-75.9725 77.9725,-73.7537 72.6279,-79.2636 72.6279,-79.2636\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"109.74\" y=\"-27.8\" font-family=\"Lato\" font-size=\"14.00\">!a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->1 -->\n",
|
||||
"<g id=\"edge7\" class=\"edge\"><title>1->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M177.166,-33.5414C174.47,-43.9087 177.662,-54 186.74,-54 193.691,-54 197.19,-48.0847 197.24,-40.6591\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"196.315,-33.5414 200.341,-40.0771 196.766,-37.0123 197.217,-40.4831 197.217,-40.4831 197.217,-40.4831 196.766,-37.0123 194.093,-40.889 196.315,-33.5414 196.315,-33.5414\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"169.74\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">a & b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->2 -->\n",
|
||||
"<g id=\"edge8\" class=\"edge\"><title>1->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M199.002,-31.6019C205.281,-38.2463 213.655,-45.7148 222.74,-50 258.287,-66.7677 304.592,-69.7349 332.418,-69.7776\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"339.753,-69.7211 332.777,-72.925 336.253,-69.7481 332.753,-69.7751 332.753,-69.7751 332.753,-69.7751 336.253,-69.7481 332.729,-66.6252 339.753,-69.7211 339.753,-69.7211\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"222.74\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & b) | (a & !b)</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->1 -->\n",
|
||||
"<g id=\"edge9\" class=\"edge\"><title>2->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M347.237,-54.2193C341.042,-45.9111 332.18,-36.193 321.74,-31 286.585,-13.5128 239.867,-13.3781 211.899,-15.3524\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"204.872,-15.9213 211.595,-12.2166 208.361,-15.6388 211.849,-15.3563 211.849,-15.3563 211.849,-15.3563 208.361,-15.6388 212.104,-18.4961 204.872,-15.9213 204.872,-15.9213\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"253.74\" y=\"-34.8\" font-family=\"Lato\" font-size=\"14.00\">!a & b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->2 -->\n",
|
||||
"<g id=\"edge10\" class=\"edge\"><title>2->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M348.507,-84.5414C345.909,-94.9087 348.986,-105 357.74,-105 364.442,-105 367.817,-99.0847 367.865,-91.6591\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"366.973,-84.5414 370.969,-91.0955 367.408,-88.0143 367.843,-91.4871 367.843,-91.4871 367.843,-91.4871 367.408,-88.0143 364.718,-91.8788 366.973,-84.5414 366.973,-84.5414\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"308.24\" y=\"-108.8\" font-family=\"Lato\" font-size=\"14.00\">(!a & !b) | (a & b)</text>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"222\" cy=\"-26.8701\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"222\" y=\"-23.1701\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->3 -->\n",
|
||||
"<g id=\"edge11\" class=\"edge\"><title>2->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M374.991,-74.1639C392.981,-79.8803 422.127,-89.1416 442.52,-95.6218\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"449.336,-97.7875 441.711,-98.6697 446.001,-96.7276 442.665,-95.6676 442.665,-95.6676 442.665,-95.6676 446.001,-96.7276 443.619,-92.6655 449.336,-97.7875 449.336,-97.7875\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"393.74\" y=\"-94.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
||||
"<g id=\"edge6\" class=\"edge\"><title>2->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M157.178,-26.8701C168.669,-26.8701 183.959,-26.8701 196.693,-26.8701\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"203.847,-26.8701 196.847,-30.0202 200.347,-26.8701 196.847,-26.8702 196.847,-26.8702 196.847,-26.8702 200.347,-26.8701 196.847,-23.7202 203.847,-26.8701 203.847,-26.8701\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"175\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 3->3 -->\n",
|
||||
"<g id=\"edge12\" class=\"edge\"><title>3->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M457.507,-118.541C454.909,-128.909 457.986,-139 466.74,-139 473.442,-139 476.817,-133.085 476.865,-125.659\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"475.973,-118.541 479.969,-125.095 476.408,-122.014 476.843,-125.487 476.843,-125.487 476.843,-125.487 476.408,-122.014 473.718,-125.879 475.973,-118.541 475.973,-118.541\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"451.24\" y=\"-142.8\" font-family=\"Lato\" font-size=\"14.00\">!a | b</text>\n",
|
||||
"<!-- 1 -->\n",
|
||||
"<g id=\"node4\" class=\"node\"><title>1</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"313.87\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"309.37\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"305.87\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 3->4 -->\n",
|
||||
"<g id=\"edge13\" class=\"edge\"><title>3->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M484.932,-103C502.637,-103 530.388,-103 550.356,-103\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"557.591,-103 550.591,-106.15 554.091,-103 550.591,-103 550.591,-103 550.591,-103 554.091,-103 550.591,-99.8501 557.591,-103 557.591,-103\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"502.74\" y=\"-106.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
||||
"<!-- 1->3 -->\n",
|
||||
"<g id=\"edge4\" class=\"edge\"><title>1->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M290.411,-13.5677C280.568,-9.28812 268.816,-6.2518 258,-8.87006 253.27,-10.015 248.463,-11.916 243.988,-14.0638\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"237.717,-17.3277 242.472,-11.3018 240.822,-15.7119 243.926,-14.096 243.926,-14.096 243.926,-14.096 240.822,-15.7119 245.38,-16.8903 237.717,-17.3277 237.717,-17.3277\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"260\" y=\"-12.6701\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4->1 -->\n",
|
||||
"<g id=\"edge14\" class=\"edge\"><title>4->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M559.244,-95.5387C520.4,-77.3013 415.284,-30.8042 321.74,-15 283.779,-8.58658 238.917,-11.7158 211.929,-14.732\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"204.811,-15.5717 211.394,-11.6232 208.287,-15.1616 211.763,-14.7515 211.763,-14.7515 211.763,-14.7515 208.287,-15.1616 212.132,-17.8798 204.811,-15.5717 204.811,-15.5717\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"393.74\" y=\"-45.8\" font-family=\"Lato\" font-size=\"14.00\">a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4->4 -->\n",
|
||||
"<g id=\"edge15\" class=\"edge\"><title>4->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M566.507,-118.541C563.909,-128.909 566.986,-139 575.74,-139 582.442,-139 585.817,-133.085 585.865,-125.659\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"584.973,-118.541 588.969,-125.095 585.408,-122.014 585.843,-125.487 585.843,-125.487 585.843,-125.487 585.408,-122.014 582.718,-125.879 584.973,-118.541 584.973,-118.541\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"560.24\" y=\"-142.8\" font-family=\"Lato\" font-size=\"14.00\">!a | b</text>\n",
|
||||
"<!-- 3->1 -->\n",
|
||||
"<g id=\"edge7\" class=\"edge\"><title>3->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M240.328,-26.8701C251.431,-26.8701 266.206,-26.8701 279.524,-26.8701\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"286.74,-26.8701 279.74,-30.0202 283.24,-26.8701 279.74,-26.8702 279.74,-26.8702 279.74,-26.8702 283.24,-26.8701 279.74,-23.7202 286.74,-26.8701 286.74,-26.8701\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"258\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">!a</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 0x7f1c80370300> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f7184137690> >"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 27
|
||||
"prompt_number": 21
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
|
|
@ -1443,19 +1390,27 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Global vs Local stuttering (experimental)\n",
|
||||
"## Sutter-invariance at the letter level\n",
|
||||
"\n",
|
||||
"Do not build anything on top of what follows, as it is likely to be removed."
|
||||
"Instead of marking each state as stuttering or not, we can list the letters that we can stutter in each state.\n",
|
||||
"More precisely, a state $q$ is _stutter-invariant for letter $a$_ if the membership to $L(q)$ of any word starting with $a$ is preserved by the operations that duplicate letters or remove duplicates. \n",
|
||||
"\n",
|
||||
"$(\\ell_0\\ldots\\ell_{i-1}\\ell_i\\ell_{i+1}\\ldots\\in L(q) \\land \\ell_0=a) \\iff (\\ell_0\\ldots\\ell_{i-1}\\ell_i\\ell_i\\ell_{i+1}\\ldots\\in L(q)\\land \\ell_0=a)$\n",
|
||||
"\n",
|
||||
"Under this definition, we can also say that $q$ is _stutter-invariant_ iff it is _stutter-invariant for any letter_.\n",
|
||||
"\n",
|
||||
"For instance consider the following automaton, for which all words that start with $b$ are stutter invariant.\n",
|
||||
"The initial state may not be declared as stutter-invariant because of words that start with $\\lnot b$."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"h = spot.formula('F(a & X(!a & X(b & Xb)))')\n",
|
||||
"aut = spot.translate(h)\n",
|
||||
"spot.highlight_stutter_invariant_states(aut, h, 5)\n",
|
||||
"display(aut)"
|
||||
"f = spot.formula('(!b&Xa) | Gb')\n",
|
||||
"pos = spot.translate(f)\n",
|
||||
"spot.highlight_stutter_invariant_states(pos, f, 5)\n",
|
||||
"display(pos)"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
|
|
@ -1470,88 +1425,78 @@
|
|||
"<!-- Generated by graphviz version 2.38.0 (20140413.2041)\n",
|
||||
" -->\n",
|
||||
"<!-- Title: G Pages: 1 -->\n",
|
||||
"<svg width=\"406pt\" height=\"128pt\"\n",
|
||||
" viewBox=\"0.00 0.00 406.00 128.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 124)\">\n",
|
||||
"<svg width=\"281pt\" height=\"227pt\"\n",
|
||||
" viewBox=\"0.00 0.00 281.48 226.74\" 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 222.74)\">\n",
|
||||
"<title>G</title>\n",
|
||||
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-124 402,-124 402,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"178\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"200\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"216\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"176\" y=\"-91.8\" font-family=\"Lato\" font-size=\"14.00\">[B\u00fcchi]</text>\n",
|
||||
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-222.74 277.48,-222.74 277.48,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"115.74\" y=\"-204.54\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"137.74\" y=\"-204.54\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"153.74\" y=\"-204.54\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"113.74\" y=\"-190.54\" font-family=\"Lato\" font-size=\"14.00\">[B\u00fcchi]</text>\n",
|
||||
"<!-- I -->\n",
|
||||
"<!-- 3 -->\n",
|
||||
"<g id=\"node2\" class=\"node\"><title>3</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-81.8701\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-78.1701\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->3 -->\n",
|
||||
"<g id=\"edge1\" class=\"edge\"><title>I->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-81.8701C2.79388,-81.8701 17.1543,-81.8701 30.6317,-81.8701\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-81.8701 30.9419,-85.0202 34.4419,-81.8701 30.9419,-81.8702 30.9419,-81.8702 30.9419,-81.8702 34.4419,-81.8701 30.9418,-78.7202 37.9419,-81.8701 37.9419,-81.8701\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0 -->\n",
|
||||
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"149.87\" cy=\"-122.87\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"149.87\" y=\"-119.17\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->0 -->\n",
|
||||
"<g id=\"edge1\" class=\"edge\"><title>I->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-18C2.79388,-18 17.1543,-18 30.6317,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-18 30.9419,-21.1501 34.4419,-18 30.9419,-18.0001 30.9419,-18.0001 30.9419,-18.0001 34.4419,-18 30.9418,-14.8501 37.9419,-18 37.9419,-18\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->0 -->\n",
|
||||
"<g id=\"edge2\" class=\"edge\"><title>0->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M49.6208,-35.0373C48.3189,-44.8579 50.4453,-54 56,-54 60.166,-54 62.4036,-48.8576 62.7128,-42.1433\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"62.3792,-35.0373 65.8541,-41.8818 62.5434,-38.5335 62.7076,-42.0296 62.7076,-42.0296 62.7076,-42.0296 62.5434,-38.5335 59.561,-42.1774 62.3792,-35.0373 62.3792,-35.0373\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"51.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<!-- 3->0 -->\n",
|
||||
"<g id=\"edge5\" class=\"edge\"><title>3->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M73.0025,-89.0117C87.7569,-95.5963 109.809,-105.438 126.341,-112.816\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"133.051,-115.81 125.375,-115.834 129.855,-114.384 126.659,-112.957 126.659,-112.957 126.659,-112.957 129.855,-114.384 127.942,-110.081 133.051,-115.81 133.051,-115.81\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-106.67\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1 -->\n",
|
||||
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"135\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"130.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<g id=\"node5\" class=\"node\"><title>1</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"149.87\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"145.37\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"141.87\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->1 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\"><title>0->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M74.0888,-18C84.5562,-18 98.1196,-18 109.693,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"116.959,-18 109.959,-21.1501 113.459,-18 109.959,-18.0001 109.959,-18.0001 109.959,-18.0001 113.459,-18 109.959,-14.8501 116.959,-18 116.959,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
|
||||
"<!-- 3->1 -->\n",
|
||||
"<g id=\"edge6\" class=\"edge\"><title>3->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M71.7605,-73.0334C84.7461,-65.2593 104.025,-53.7175 120.057,-44.1197\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"126.247,-40.4137 121.859,-46.7121 123.244,-42.2116 120.241,-44.0094 120.241,-44.0094 120.241,-44.0094 123.244,-42.2116 118.623,-41.3067 126.247,-40.4137 126.247,-40.4137\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"94\" y=\"-65.6701\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2 -->\n",
|
||||
"<g id=\"node4\" class=\"node\"><title>2</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"218\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"218\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"246.61\" cy=\"-122.87\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"242.11\" y=\"-126.67\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"238.61\" y=\"-111.67\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->2 -->\n",
|
||||
"<g id=\"edge4\" class=\"edge\"><title>1->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M153.178,-18C164.669,-18 179.959,-18 192.693,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"199.847,-18 192.847,-21.1501 196.347,-18 192.847,-18.0001 192.847,-18.0001 192.847,-18.0001 196.347,-18 192.847,-14.8501 199.847,-18 199.847,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"171\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
|
||||
"<!-- 0->2 -->\n",
|
||||
"<g id=\"edge2\" class=\"edge\"><title>0->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M168.247,-122.87C180.55,-122.87 197.439,-122.87 212.298,-122.87\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"219.401,-122.87 212.401,-126.02 215.901,-122.87 212.401,-122.87 212.401,-122.87 212.401,-122.87 215.901,-122.87 212.401,-119.72 219.401,-122.87 219.401,-122.87\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"194.74\" y=\"-126.67\" 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=\"#e31a1c\" stroke-width=\"2\" cx=\"299\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"299\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||
"<!-- 2->2 -->\n",
|
||||
"<g id=\"edge4\" class=\"edge\"><title>2->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M237.689,-148.24C237.074,-158.794 240.048,-167.74 246.61,-167.74 251.635,-167.74 254.555,-162.496 255.372,-155.301\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"255.531,-148.24 258.523,-155.309 255.452,-151.739 255.374,-155.238 255.374,-155.238 255.374,-155.238 255.452,-151.739 252.224,-155.167 255.531,-148.24 255.531,-148.24\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"246.61\" y=\"-171.54\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->3 -->\n",
|
||||
"<g id=\"edge5\" class=\"edge\"><title>2->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M236.142,-18C247.115,-18 261.521,-18 273.67,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"280.892,-18 273.892,-21.1501 277.392,-18 273.892,-18.0001 273.892,-18.0001 273.892,-18.0001 277.392,-18 273.892,-14.8501 280.892,-18 280.892,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"254\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4 -->\n",
|
||||
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"380\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"380\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 3->4 -->\n",
|
||||
"<g id=\"edge6\" class=\"edge\"><title>3->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M317.142,-18C328.115,-18 342.521,-18 354.67,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"361.892,-18 354.892,-21.1501 358.392,-18 354.892,-18.0001 354.892,-18.0001 354.892,-18.0001 358.392,-18 354.892,-14.8501 361.892,-18 361.892,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"335\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4->4 -->\n",
|
||||
"<g id=\"edge7\" class=\"edge\"><title>4->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M372.969,-34.6641C371.406,-44.625 373.75,-54 380,-54 384.688,-54 387.178,-48.7266 387.471,-41.8876\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"387.031,-34.6641 390.601,-41.4598 387.244,-38.1576 387.456,-41.6511 387.456,-41.6511 387.456,-41.6511 387.244,-38.1576 384.312,-41.8425 387.031,-34.6641 387.031,-34.6641\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"375.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"372\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<!-- 1->1 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\"><title>1->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M140.949,-52.2401C140.334,-62.7939 143.308,-71.7401 149.87,-71.7401 154.894,-71.7401 157.815,-66.496 158.632,-59.3013\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"158.791,-52.2401 161.783,-59.3092 158.712,-55.7392 158.633,-59.2383 158.633,-59.2383 158.633,-59.2383 158.712,-55.7392 155.484,-59.1674 158.791,-52.2401 158.791,-52.2401\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"145.37\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\">b</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 0x7f1c8045a690> >"
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f71840b9b70> >"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1561,293 +1506,34 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The above result uses a natural definition of \"stutter-invariant state\": a state is stutter-invariant if the language accepted from this state is.\n",
|
||||
"The `stutter_invariant_letters()` functions returns a vector of BDDs indexed by state numbers. The BDD at index $q$ specifies all letters $\\ell$ for which state $q$ would be stuttering. Note that if $q$ is stutter-invariant or reachable from a stutter-invariant state, the associated BDD will be `bddtrue` (printed as `1` below).\n",
|
||||
"\n",
|
||||
"We can also have a \"local\" variant of the stutter invariance check that considers the state as stutter invariant if you can stutter on (or remove duplicates of) the first letter read from that state, but not necessary do the same operations on a different letter that follows. \n",
|
||||
"In other words, state $q$ is a local stutter-invariant state iff $\\ell_1\\ell_2\\ldots \\in L(q) \\iff \\ell_1\\ell_1\\ell_2\\ldots \\in L(q)$.\n",
|
||||
"\n",
|
||||
"Just pass `True` as the last optional parameter, as below."
|
||||
"This interface is a bit inconveniant to use interactively, due to the fact that we need a `spot.bdd_dict` object to print a BDD."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"spot.highlight_stutter_invariant_states(aut, h, 5, True)\n",
|
||||
"display(aut)"
|
||||
"sil_vec = spot.stutter_invariant_letters(pos, f)\n",
|
||||
"for q in range(pos.num_states()):\n",
|
||||
" print(\"sil_vec[{}] =\".format(q), spot.bdd_format_formula(pos.get_dict(), sil_vec[q]))"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"metadata": {},
|
||||
"output_type": "display_data",
|
||||
"svg": [
|
||||
"<?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.38.0 (20140413.2041)\n",
|
||||
" -->\n",
|
||||
"<!-- Title: G Pages: 1 -->\n",
|
||||
"<svg width=\"406pt\" height=\"128pt\"\n",
|
||||
" viewBox=\"0.00 0.00 406.00 128.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 124)\">\n",
|
||||
"<title>G</title>\n",
|
||||
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-124 402,-124 402,4 -4,4\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"178\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\">Inf(</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"200\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"216\" y=\"-105.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"176\" y=\"-91.8\" font-family=\"Lato\" font-size=\"14.00\">[B\u00fcchi]</text>\n",
|
||||
"<!-- I -->\n",
|
||||
"<!-- 0 -->\n",
|
||||
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"56\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->0 -->\n",
|
||||
"<g id=\"edge1\" class=\"edge\"><title>I->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-18C2.79388,-18 17.1543,-18 30.6317,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-18 30.9419,-21.1501 34.4419,-18 30.9419,-18.0001 30.9419,-18.0001 30.9419,-18.0001 34.4419,-18 30.9418,-14.8501 37.9419,-18 37.9419,-18\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->0 -->\n",
|
||||
"<g id=\"edge2\" class=\"edge\"><title>0->0</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M49.6208,-35.0373C48.3189,-44.8579 50.4453,-54 56,-54 60.166,-54 62.4036,-48.8576 62.7128,-42.1433\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"62.3792,-35.0373 65.8541,-41.8818 62.5434,-38.5335 62.7076,-42.0296 62.7076,-42.0296 62.7076,-42.0296 62.5434,-38.5335 59.561,-42.1774 62.3792,-35.0373 62.3792,-35.0373\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"51.5\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1 -->\n",
|
||||
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"135\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"130.5\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->1 -->\n",
|
||||
"<g id=\"edge3\" class=\"edge\"><title>0->1</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M74.0888,-18C84.5562,-18 98.1196,-18 109.693,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"116.959,-18 109.959,-21.1501 113.459,-18 109.959,-18.0001 109.959,-18.0001 109.959,-18.0001 113.459,-18 109.959,-14.8501 116.959,-18 116.959,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"92\" y=\"-21.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=\"218\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"218\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->2 -->\n",
|
||||
"<g id=\"edge4\" class=\"edge\"><title>1->2</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M153.178,-18C164.669,-18 179.959,-18 192.693,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"199.847,-18 192.847,-21.1501 196.347,-18 192.847,-18.0001 192.847,-18.0001 192.847,-18.0001 196.347,-18 192.847,-14.8501 199.847,-18 199.847,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"171\" y=\"-21.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=\"#e31a1c\" stroke-width=\"2\" cx=\"299\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"299\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->3 -->\n",
|
||||
"<g id=\"edge5\" class=\"edge\"><title>2->3</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M236.142,-18C247.115,-18 261.521,-18 273.67,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"280.892,-18 273.892,-21.1501 277.392,-18 273.892,-18.0001 273.892,-18.0001 273.892,-18.0001 277.392,-18 273.892,-14.8501 280.892,-18 280.892,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"254\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4 -->\n",
|
||||
"<g id=\"node6\" class=\"node\"><title>4</title>\n",
|
||||
"<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"380\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||
"<text text-anchor=\"middle\" x=\"380\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 3->4 -->\n",
|
||||
"<g id=\"edge6\" class=\"edge\"><title>3->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M317.142,-18C328.115,-18 342.521,-18 354.67,-18\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"361.892,-18 354.892,-21.1501 358.392,-18 354.892,-18.0001 354.892,-18.0001 354.892,-18.0001 358.392,-18 354.892,-14.8501 361.892,-18 361.892,-18\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"335\" y=\"-21.8\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4->4 -->\n",
|
||||
"<g id=\"edge7\" class=\"edge\"><title>4->4</title>\n",
|
||||
"<path fill=\"none\" stroke=\"black\" d=\"M372.969,-34.6641C371.406,-44.625 373.75,-54 380,-54 384.688,-54 387.178,-48.7266 387.471,-41.8876\"/>\n",
|
||||
"<polygon fill=\"black\" stroke=\"black\" points=\"387.031,-34.6641 390.601,-41.4598 387.244,-38.1576 387.456,-41.6511 387.456,-41.6511 387.456,-41.6511 387.244,-38.1576 384.312,-41.8425 387.031,-34.6641 387.031,-34.6641\"/>\n",
|
||||
"<text text-anchor=\"start\" x=\"375.5\" y=\"-72.8\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||
"<text text-anchor=\"start\" x=\"372\" y=\"-57.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">\u24ff</text>\n",
|
||||
"</g>\n",
|
||||
"</g>\n",
|
||||
"</svg>\n"
|
||||
],
|
||||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f1c8045a690> >"
|
||||
"sil_vec[0] = 1\n",
|
||||
"sil_vec[1] = 1\n",
|
||||
"sil_vec[2] = 1\n",
|
||||
"sil_vec[3] = b\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 23
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Note that an SCC can contain a mix of locally stutter-invariant and local stutter-sensitive states. Here is the deterministic version of the above automaton for example."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"aut = spot.translate(h, 'deterministic')\n",
|
||||
"spot.highlight_stutter_invariant_states(aut, h, 5, True)\n",
|
||||
"display(aut.show('.abs'))"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"metadata": {},
|
||||
"output_type": "display_data",
|
||||
"svg": [
|
||||
"<svg height=\"234pt\" viewBox=\"0.00 0.00 507.74 234.00\" width=\"508pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 230)\">\n",
|
||||
"<title>G</title>\n",
|
||||
"<polygon fill=\"white\" points=\"-4,4 -4,-230 503.74,-230 503.74,4 -4,4\" stroke=\"none\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228.87\" y=\"-211.8\">Inf(</text>\n",
|
||||
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"250.87\" y=\"-211.8\">\u24ff</text>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"266.87\" y=\"-211.8\">)</text>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.87\" y=\"-197.8\">[B\u00fcchi]</text>\n",
|
||||
"<g class=\"cluster\" id=\"clust1\"><title>cluster_0</title>\n",
|
||||
"<polygon fill=\"none\" points=\"422,-64 422,-167 491.74,-167 491.74,-64 422,-64\" stroke=\"green\"/>\n",
|
||||
"</g>\n",
|
||||
"<g class=\"cluster\" id=\"clust2\"><title>cluster_1</title>\n",
|
||||
"<polygon fill=\"none\" points=\"30,-8 30,-182 393,-182 393,-8 30,-8\" stroke=\"red\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- I -->\n",
|
||||
"<!-- 3 -->\n",
|
||||
"<g class=\"node\" id=\"node2\"><title>3</title>\n",
|
||||
"<ellipse cx=\"56\" cy=\"-87\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-83.3\">3</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- I->3 -->\n",
|
||||
"<g class=\"edge\" id=\"edge1\"><title>I->3</title>\n",
|
||||
"<path d=\"M1.15491,-87C2.79388,-87 17.1543,-87 30.6317,-87\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"37.9419,-87 30.9419,-90.1501 34.4419,-87 30.9419,-87.0001 30.9419,-87.0001 30.9419,-87.0001 34.4419,-87 30.9418,-83.8501 37.9419,-87 37.9419,-87\" stroke=\"black\"/>\n",
|
||||
"</g>\n",
|
||||
"<!-- 3->3 -->\n",
|
||||
"<g class=\"edge\" id=\"edge12\"><title>3->3</title>\n",
|
||||
"<path d=\"M49.6208,-104.037C48.3189,-113.858 50.4453,-123 56,-123 60.166,-123 62.4036,-117.858 62.7128,-111.143\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"62.3792,-104.037 65.8541,-110.882 62.5434,-107.533 62.7076,-111.03 62.7076,-111.03 62.7076,-111.03 62.5434,-107.533 59.561,-111.177 62.3792,-104.037 62.3792,-104.037\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"50.5\" y=\"-126.8\">!a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4 -->\n",
|
||||
"<g class=\"node\" id=\"node4\"><title>4</title>\n",
|
||||
"<ellipse cx=\"137.5\" cy=\"-87\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"137.5\" y=\"-83.3\">4</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 3->4 -->\n",
|
||||
"<g class=\"edge\" id=\"edge13\"><title>3->4</title>\n",
|
||||
"<path d=\"M74.2503,-87C85.2932,-87 99.7905,-87 112.016,-87\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"119.283,-87 112.283,-90.1501 115.783,-87 112.283,-87.0001 112.283,-87.0001 112.283,-87.0001 115.783,-87 112.283,-83.8501 119.283,-87 119.283,-87\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-90.8\">a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 5 -->\n",
|
||||
"<g class=\"node\" id=\"node3\"><title>5</title>\n",
|
||||
"<ellipse cx=\"456.87\" cy=\"-99\" fill=\"#ffffaa\" rx=\"26.7407\" ry=\"26.7407\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"452.37\" y=\"-102.8\">5</text>\n",
|
||||
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"448.87\" y=\"-87.8\">\u24ff</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 5->5 -->\n",
|
||||
"<g class=\"edge\" id=\"edge16\"><title>5->5</title>\n",
|
||||
"<path d=\"M447.949,-124.37C447.334,-134.924 450.308,-143.87 456.87,-143.87 461.894,-143.87 464.815,-138.626 465.632,-131.431\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"465.791,-124.37 468.783,-131.439 465.712,-127.869 465.633,-131.368 465.633,-131.368 465.633,-131.368 465.712,-127.869 462.484,-131.297 465.791,-124.37 465.791,-124.37\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"456.87\" y=\"-147.67\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4->4 -->\n",
|
||||
"<g class=\"edge\" id=\"edge15\"><title>4->4</title>\n",
|
||||
"<path d=\"M130.117,-103.664C128.477,-113.625 130.938,-123 137.5,-123 142.422,-123 145.037,-117.727 145.344,-110.888\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"144.883,-103.664 148.473,-110.449 145.106,-107.157 145.329,-110.65 145.329,-110.65 145.329,-110.65 145.106,-107.157 142.186,-110.851 144.883,-103.664 144.883,-103.664\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"134\" y=\"-126.8\">a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0 -->\n",
|
||||
"<g class=\"node\" id=\"node5\"><title>0</title>\n",
|
||||
"<ellipse cx=\"253.5\" cy=\"-85\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"253.5\" y=\"-81.3\">0</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 4->0 -->\n",
|
||||
"<g class=\"edge\" id=\"edge14\"><title>4->0</title>\n",
|
||||
"<path d=\"M155.655,-87.2775C171.561,-87.469 195.884,-87.5943 217,-87 220.685,-86.8963 224.583,-86.7321 228.393,-86.5414\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"235.534,-86.1506 228.717,-89.6784 232.04,-86.3419 228.545,-86.5331 228.545,-86.5331 228.545,-86.5331 232.04,-86.3419 228.373,-83.3878 235.534,-86.1506 235.534,-86.1506\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"191\" y=\"-91.8\">!a</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->3 -->\n",
|
||||
"<g class=\"edge\" id=\"edge4\"><title>0->3</title>\n",
|
||||
"<path d=\"M238.207,-75.0981C213.44,-59.2074 160.979,-31.1368 117,-45 101.303,-49.948 86.1407,-60.6296 74.985,-69.9818\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"69.5349,-74.7139 72.7554,-67.746 72.1778,-72.4192 74.8206,-70.1246 74.8206,-70.1246 74.8206,-70.1246 72.1778,-72.4192 76.8858,-72.5031 69.5349,-74.7139 69.5349,-74.7139\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"117\" y=\"-48.8\">!a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->4 -->\n",
|
||||
"<g class=\"edge\" id=\"edge5\"><title>0->4</title>\n",
|
||||
"<path d=\"M236.925,-77.9539C230.84,-75.5609 223.721,-73.1919 217,-72 199.058,-68.8181 193.893,-68.554 176,-72 170.888,-72.9846 165.586,-74.6598 160.635,-76.5423\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"154.153,-79.1924 159.44,-73.6279 157.392,-77.868 160.632,-76.5437 160.632,-76.5437 160.632,-76.5437 157.392,-77.868 161.824,-79.4595 154.153,-79.1924 154.153,-79.1924\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"178\" y=\"-75.8\">a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1 -->\n",
|
||||
"<g class=\"node\" id=\"node6\"><title>1</title>\n",
|
||||
"<ellipse cx=\"367\" cy=\"-138\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#e31a1c\" stroke-width=\"2\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"367\" y=\"-134.3\">1</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->1 -->\n",
|
||||
"<g class=\"edge\" id=\"edge2\"><title>0->1</title>\n",
|
||||
"<path d=\"M270.004,-92.3694C289.2,-101.494 322.03,-117.099 343.87,-127.481\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"350.269,-130.522 342.594,-130.362 347.108,-129.02 343.946,-127.517 343.946,-127.517 343.946,-127.517 347.108,-129.02 345.299,-124.672 350.269,-130.522 350.269,-130.522\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"292\" y=\"-124.8\">!a & b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2 -->\n",
|
||||
"<g class=\"node\" id=\"node7\"><title>2</title>\n",
|
||||
"<ellipse cx=\"367\" cy=\"-59\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"367\" y=\"-55.3\">2</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 0->2 -->\n",
|
||||
"<g class=\"edge\" id=\"edge3\"><title>0->2</title>\n",
|
||||
"<path d=\"M265.421,-71.1933C271.766,-64.313 280.395,-56.6899 290,-53 306.776,-46.555 327.136,-48.6347 342.56,-52.0093\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"349.697,-53.7383 342.152,-55.1516 346.295,-52.9142 342.894,-52.0902 342.894,-52.0902 342.894,-52.0902 346.295,-52.9142 343.635,-49.0287 349.697,-53.7383 349.697,-53.7383\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"293.5\" y=\"-56.8\">a & b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->3 -->\n",
|
||||
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
||||
"<path d=\"M349.563,-143.472C308.171,-156.255 197.224,-184.276 117,-147 98.1796,-138.255 81.9033,-120.965 71.0704,-107.183\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"66.7694,-101.527 73.5137,-105.192 68.8878,-104.313 71.0062,-107.099 71.0062,-107.099 71.0062,-107.099 68.8878,-104.313 68.4987,-109.005 66.7694,-101.527 66.7694,-101.527\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"176\" y=\"-168.8\">!a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->5 -->\n",
|
||||
"<g class=\"edge\" id=\"edge8\"><title>1->5</title>\n",
|
||||
"<path d=\"M383.709,-131.028C395.248,-125.906 411.292,-118.786 425.322,-112.559\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"432.019,-109.586 426.899,-115.305 428.82,-111.006 425.621,-112.426 425.621,-112.426 425.621,-112.426 428.82,-111.006 424.343,-109.547 432.019,-109.586 432.019,-109.586\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"403\" y=\"-125.8\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 1->4 -->\n",
|
||||
"<g class=\"edge\" id=\"edge7\"><title>1->4</title>\n",
|
||||
"<path d=\"M349.004,-140.059C333.54,-141.551 310.125,-142.854 290,-140 237.776,-132.593 224.868,-126.852 176,-107 170.617,-104.813 164.997,-102.079 159.795,-99.3416\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"153.48,-95.913 161.135,-96.4845 156.556,-97.5829 159.632,-99.2528 159.632,-99.2528 159.632,-99.2528 156.556,-97.5829 158.129,-102.021 153.48,-95.913 153.48,-95.913\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"235\" y=\"-141.8\">a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->5 -->\n",
|
||||
"<g class=\"edge\" id=\"edge11\"><title>2->5</title>\n",
|
||||
"<path d=\"M383.709,-66.1512C395.248,-71.4039 411.292,-78.7072 425.322,-85.0938\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"432.019,-88.1425 424.343,-88.1092 428.833,-86.6923 425.648,-85.2422 425.648,-85.2422 425.648,-85.2422 428.833,-86.6923 426.953,-82.3753 432.019,-88.1425 432.019,-88.1425\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"403\" y=\"-82.8\">b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->4 -->\n",
|
||||
"<g class=\"edge\" id=\"edge10\"><title>2->4</title>\n",
|
||||
"<path d=\"M350.333,-51.3873C344.416,-48.8747 337.533,-46.3732 331,-45 327.069,-44.1736 248.501,-40.4615 235,-43 207.441,-48.1818 178.519,-62.7706 159.61,-73.7398\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"153.117,-77.5932 157.529,-71.3116 156.127,-75.8068 159.137,-74.0204 159.137,-74.0204 159.137,-74.0204 156.127,-75.8068 160.744,-76.7293 153.117,-77.5932 153.117,-77.5932\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"235\" y=\"-46.8\">a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"<!-- 2->0 -->\n",
|
||||
"<g class=\"edge\" id=\"edge9\"><title>2->0</title>\n",
|
||||
"<path d=\"M349.293,-63.4158C343.51,-64.9126 336.979,-66.5673 331,-68 313.376,-72.2229 293.381,-76.6538 278.254,-79.9329\" fill=\"none\" stroke=\"black\"/>\n",
|
||||
"<polygon fill=\"black\" points=\"271.251,-81.4442 277.429,-76.8884 274.672,-80.7059 278.093,-79.9675 278.093,-79.9675 278.093,-79.9675 274.672,-80.7059 278.758,-83.0467 271.251,-81.4442 271.251,-81.4442\" stroke=\"black\"/>\n",
|
||||
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"290\" y=\"-81.8\">!a & !b</text>\n",
|
||||
"</g>\n",
|
||||
"</g>\n",
|
||||
"</svg>"
|
||||
],
|
||||
"text": [
|
||||
"<IPython.core.display.SVG object>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 24
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue