notebooks: correction of typos
* 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
This commit is contained in:
parent
858629dd3a
commit
6dc11b4715
20 changed files with 242 additions and 82 deletions
|
|
@ -12,6 +12,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "fb656100",
|
||||
"metadata": {},
|
||||
|
|
@ -21,17 +22,18 @@
|
|||
"\n",
|
||||
"These two structures are used to decompose an acceptance condition (or automaton) into trees that alternate accepting and rejecting elements in order to help converting an automaton to parity acceptance. Spot implements those structures, includes some display code to better explore them iteractively, and finally use them to implement a transformation to parity acceptance.\n",
|
||||
"\n",
|
||||
"For a formal tratement of these, in a slightly different formalism, see [Optimal Transformations of Games and Automata Using Muller Conditions](https://arxiv.org/abs/2011.13041) by Casares, Colcombet, and Fijalkow. In Spot those definitions have been adapted to use Emerson-Lei acceptance, and support transitions labeled by multiple colors (the main differences are for the Zielonka Tree, the ACD is almost identical)."
|
||||
"For a formal treatment of these, in a slightly different formalism, see [Optimal Transformations of Games and Automata Using Muller Conditions](https://arxiv.org/abs/2011.13041) by Casares, Colcombet, and Fijalkow. In Spot those definitions have been adapted to use Emerson-Lei acceptance, and support transitions labeled by multiple colors (the main differences are for the Zielonka Tree, the ACD is almost identical)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "4e8b5d3f",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Zielonka Tree\n",
|
||||
"\n",
|
||||
"The Zielonka tree is built from an acceptance formula and is labeled by sets of colors. The root contains all colors used in the formula. If seing infinitely all colors of one node would satisfy the acceptance condition, we say that the node is accepting and draw it with an ellipse, otherwise is is rejecting and drawn with a rectangle. The children of an accepting (resp. rejecting) node, are the largest subsets of colors that are rejecting (resp. accepting).\n",
|
||||
"The Zielonka tree is built from an acceptance formula and is labeled by sets of colors. The root contains all colors used in the formula. If seeing infinitely all colors of one node would satisfy the acceptance condition, we say that the node is accepting and draw it with an ellipse, otherwise is is rejecting and drawn with a rectangle. The children of an accepting (resp. rejecting) node, are the largest subsets of colors that are rejecting (resp. accepting).\n",
|
||||
"\n",
|
||||
"Here is an example:"
|
||||
]
|
||||
|
|
@ -231,6 +233,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "d7629725",
|
||||
"metadata": {},
|
||||
|
|
@ -241,7 +244,7 @@
|
|||
"\n",
|
||||
"This tree is also layered: all nodes in each layers are alternatively rejecting and accepting. Layers are numbered incrementally from 0 at the root. In this example, leaves are in layer 3. Since it is conventional to put the root at the top, we will say that a node is high in the tree when it has a small level.\n",
|
||||
"\n",
|
||||
"In this example, odd levels are accepting: we say the tree is odd. On another example, it could be the other way arround. The `is_even()` method tells us which way it is."
|
||||
"In this example, odd levels are accepting: we say the tree is odd. On another example, it could be the other way around. The `is_even()` method tells us which way it is."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -266,6 +269,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "15fbd4e6",
|
||||
"metadata": {},
|
||||
|
|
@ -295,6 +299,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "de4cdc45",
|
||||
"metadata": {},
|
||||
|
|
@ -329,6 +334,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "4c3bf70b",
|
||||
"metadata": {},
|
||||
|
|
@ -358,6 +364,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "0d865f30",
|
||||
"metadata": {},
|
||||
|
|
@ -387,6 +394,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "8b6b3928",
|
||||
"metadata": {},
|
||||
|
|
@ -430,16 +438,18 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "656e05f4",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"If we imagine an run looping on tree transitions labeled by `[1]`, `[0]`, `[3]`, we know (from the original acceptance condition) that it should be accepting. Infinite repetition of the `step()` procedure will emit many levels, but the smallest level we see infinitely often is `1`. It corresponds to node 2, labeled by `{0,1,3}`: this is the highest node we visit infinitely often while steping through this tree in a loop.\n",
|
||||
"If we imagine an run looping on tree transitions labeled by `[1]`, `[0]`, `[3]`, we know (from the original acceptance condition) that it should be accepting. Infinite repetition of the `step()` procedure will emit many levels, but the smallest level we see infinitely often is `1`. It corresponds to node 2, labeled by `{0,1,3}`: this is the highest node we visit infinitely often while stepping through this tree in a loop.\n",
|
||||
"\n",
|
||||
"Similarly, a loop of two transitions labeled by `[1]` and `[3]` should be rejecting. Stepping through the tree will emit infinitely many 2, a rejecting level."
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "5c7014e9",
|
||||
"metadata": {},
|
||||
|
|
@ -450,6 +460,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "2750cb1d",
|
||||
"metadata": {},
|
||||
|
|
@ -1078,11 +1089,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "ea452913",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Here the parity automaton output has as many proprities as there are levels in the Zielonka tree.\n",
|
||||
"Here the parity automaton output has as many priorities as there are levels in the Zielonka tree.\n",
|
||||
"\n",
|
||||
"The call to `copy_state_names_from()` above causes the states to be labeled by strings of the form `orig#leaf` when `orig` is the original state number, and `leaf` is a leaf of the Zielonka tree.\n",
|
||||
"\n",
|
||||
|
|
@ -1111,6 +1123,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "da8d9e97",
|
||||
"metadata": {},
|
||||
|
|
@ -1716,6 +1729,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "9bf70138",
|
||||
"metadata": {},
|
||||
|
|
@ -1756,6 +1770,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "147a71a6",
|
||||
"metadata": {},
|
||||
|
|
@ -2718,6 +2733,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "77db26c3",
|
||||
"metadata": {},
|
||||
|
|
@ -2727,7 +2743,7 @@
|
|||
"The `zielonka_tree` class accepts a few options that can alter its behaviour.\n",
|
||||
"\n",
|
||||
"Options `CHECK_RABIN`, `CHECK_STREETT`, `CHECK_PARITY` can be combined with\n",
|
||||
"`ABORT_WRONG_SHAPE` to abort the construction as soon as it is detected that the Zielonka tree has the wrong shape. When this happens, the number of branchs of the tree is set to 0.\n",
|
||||
"`ABORT_WRONG_SHAPE` to abort the construction as soon as it is detected that the Zielonka tree has the wrong shape. When this happens, the number of branches of the tree is set to 0.\n",
|
||||
"\n",
|
||||
"For instance we can check that the original acceptance condition does not behaves like a Parity condition."
|
||||
]
|
||||
|
|
@ -2755,6 +2771,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "4786f64c",
|
||||
"metadata": {},
|
||||
|
|
@ -2941,6 +2958,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "9d7688b3",
|
||||
"metadata": {},
|
||||
|
|
@ -2949,6 +2967,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "75838579",
|
||||
"metadata": {},
|
||||
|
|
@ -2985,6 +3004,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "cb546bc2",
|
||||
"metadata": {},
|
||||
|
|
@ -4229,6 +4249,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "0f2f00c4",
|
||||
"metadata": {},
|
||||
|
|
@ -4260,6 +4281,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "3a3db431",
|
||||
"metadata": {},
|
||||
|
|
@ -4270,6 +4292,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "6595333d",
|
||||
"metadata": {},
|
||||
|
|
@ -4327,6 +4350,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "1c6d4fe9",
|
||||
"metadata": {},
|
||||
|
|
@ -4421,6 +4445,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "ad201f45",
|
||||
"metadata": {
|
||||
|
|
@ -4439,6 +4464,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "04d7cc51",
|
||||
"metadata": {},
|
||||
|
|
@ -4468,6 +4494,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "1015abb6",
|
||||
"metadata": {},
|
||||
|
|
@ -4476,6 +4503,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "b89a6186",
|
||||
"metadata": {},
|
||||
|
|
@ -5106,6 +5134,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "f039aeaa",
|
||||
"metadata": {},
|
||||
|
|
@ -5135,6 +5164,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "07aaab3a",
|
||||
"metadata": {},
|
||||
|
|
@ -5746,11 +5776,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "f14ee428",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This transformation can have substantiually fewer states than the one based on Zielonka tree, because the branches are actually restricted to only those that matter for a given state."
|
||||
"This transformation can have substantially fewer states than the one based on Zielonka tree, because the branches are actually restricted to only those that matter for a given state."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -5796,6 +5827,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "ce62b966",
|
||||
"metadata": {},
|
||||
|
|
@ -5804,6 +5836,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "e3d0ff64",
|
||||
"metadata": {},
|
||||
|
|
@ -5842,19 +5875,21 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "09ec9887",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Calling the above methods withtout passing the relevant option will raise an exception."
|
||||
"Calling the above methods without passing the relevant option will raise an exception."
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "816ee0eb",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Additonally, when the goal is only to check some typeness, the construction of the ACD can be aborted as soon as the typeness is found to be wrong. This can be enabled by passing the additional option `spot.acd_options_ABORT_WRONG_SHAPE`. In case the construction is aborted the ACD forest will be erased (to make sure it is not used), and `node_count()` will return 0."
|
||||
"Additionally, when the goal is only to check some typeness, the construction of the ACD can be aborted as soon as the typeness is found to be wrong. This can be enabled by passing the additional option `spot.acd_options_ABORT_WRONG_SHAPE`. In case the construction is aborted the ACD forest will be erased (to make sure it is not used), and `node_count()` will return 0."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -5904,16 +5939,17 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "f380ca5f",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## State-based transformation\n",
|
||||
"\n",
|
||||
"The ACD usage can be modified slightly in order to produce a state-based automaton. The rules for stepping through the ACD are similar, except that when we detect that a cycle through all children of a node has been done, we return the current node without going to the leftmost leave of the next children. When stepping a transition from a node a child, we should act as if we were in the leftmost child of that node containing the source of tha transition. Stepping through a transition this way do not emit any color, instead the color of a state will be the level of its associated node.\n",
|
||||
"The ACD usage can be modified slightly in order to produce a state-based automaton. The rules for stepping through the ACD are similar, except that when we detect that a cycle through all children of a node has been done, we return the current node without going to the leftmost leave of the next children. When stepping a transition from a node a child, we should act as if we were in the leftmost child of that node containing the source of that transition. Stepping through a transition this way do not emit any color, instead the color of a state will be the level of its associated node.\n",
|
||||
"(This modified transformation do not claim to be optimal, unlike the transition-based version.)\n",
|
||||
"\n",
|
||||
"The `ORDER_HEURISTIC` used below will be explained in the next section, it justs alters ordering of children of the ACD in a way that the state-based transformation prefers."
|
||||
"The `ORDER_HEURISTIC` used below will be explained in the next section, it just alters ordering of children of the ACD in a way that the state-based transformation prefers."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -7165,6 +7201,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "98a1474c",
|
||||
"metadata": {},
|
||||
|
|
@ -7258,11 +7295,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "c9725681",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The state-based version of the ACD transformation is `acd_transform_sbacc()`. In the output, the cycle between `2#8` and `2#0` corresponds to the repeatitions of edges 9 and 10 we stepped through above."
|
||||
"The state-based version of the ACD transformation is `acd_transform_sbacc()`. In the output, the cycle between `2#8` and `2#0` corresponds to the repetitions of edges 9 and 10 we stepped through above."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -8081,6 +8119,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "5b770f23",
|
||||
"metadata": {},
|
||||
|
|
@ -8108,6 +8147,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "9f39b61d",
|
||||
"metadata": {},
|
||||
|
|
@ -8649,6 +8689,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "03f0eda7",
|
||||
"metadata": {},
|
||||
|
|
@ -8657,11 +8698,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "45596824",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The `ORDER_HEURISTIC` option of the ACD construction, attemps to order the children of a node by decreasing number of number of successors that are out of the node. It is activated by default inside `spot.acd_transform_sbacc()`."
|
||||
"The `ORDER_HEURISTIC` option of the ACD construction, attempts to order the children of a node by decreasing number of number of successors that are out of the node. It is activated by default inside `spot.acd_transform_sbacc()`."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -9170,6 +9212,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "15f094c0",
|
||||
"metadata": {},
|
||||
|
|
@ -10220,6 +10263,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "36629c32",
|
||||
"metadata": {},
|
||||
|
|
@ -11118,11 +11162,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"id": "7d638d20",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"An issue in Spot is to always ensure that property bits of automata (cleaming that an automaton is weak, inherently weak, deterministic, etc.) are properly preserved or reset.\n",
|
||||
"An issue in Spot is to always ensure that property bits of automata (claiming that an automaton is weak, inherently weak, deterministic, etc.) are properly preserved or reset.\n",
|
||||
"\n",
|
||||
"Here if the input is inherently weak, the output should be weak. "
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue