5.3 Diseño del bucle de control MAPE-k
5.3.4 Reglas de adaptación
priority functionc. The merging of multiple priorities to obtain the cumulative effect, i.e., themax operator of the construction, is then performed by taking the minimum of the prior- ities. The B¨uchi acceptance condition can be directly handled by a similar straightforward modification.
Number of states. Our construction merges states along path fragments in the determinis- tic automatonZ. In the case of deterministic Rabin automata, this can lead to ZS having
more reachable states thanZ if the states, transitions and acceptance signatures in Z are arranged in a compact, interleaved way that is destroyed by merging the stuttered transi- tions. For example, a cycle of three states with acceptance signatures (green, red , red ), (red , green, red ), (red , red , green) will be merged to a state with acceptance signature (red , red , red ), which might not exist otherwise in the automaton and the original states are not removed because they are part of other cycles. If the DRAZ has n reachable states and ignoring the special case of skipping qprefix which can only lead to fewer states, the
numbern0of reachable states in automatonZ
S is bound by the number of reachable tran-
sitions inZ, n0 6 n · |Σ|, as δ∼
=S(q, a) for q = (t, −→r ) is uniquely determined by t and a.
Additionally, ifA has k acceptance pairs, n0is bound by the number of possible acceptance signaturesn0 6 n · |Ck| = n · 3k.
In contrast, for a deterministic parity automatonZ the stuttered automaton ZSwill have at
most the same number of states asZ when a state with the minimum priority on the cycle is chosen as the canonical cycle state, with a similar treatment for the prefix states. Due to the structure of the parity acceptance condition, some state with a priority matching the cumulative priority has to exist and thus every state inZS has a corresponding state in the
original automatonZ.
Therefore, in the case of constructing DRA, our technique should be considered as an addi- tional heuristic in the toolbox to generate smaller automata. In practice, only for two of the formulas evaluated in Section 9.3 where the stuttered automataZS larger by a few states
than the corresponding standard automatonZ.
9.2
Variants of Safra’s determinization construction
In the last few years, three promising variants of Safra’s determinization construc- tion [Saf88, Saf89] for NBA have been proposed by Piterman [Pit07] and Schewe [Sch09]. We provide here a brief overview of the main ideas of Safra’s determinization construc- tion and the variants proposed by Piterman and Schewe. We consider here deterministic automata where the acceptance condition is defined on the states of the automata.
To determinize a nondeterministic finite automata (NFA) over finite words a simple subset construction suffices [RS59] to track the set of states that are reachable in the NFA for a given input word. The deterministic automaton then accepts if any of the these states are accepting in the NFA, as this corresponds to the existence of an accepting run. This rel- atively simple construction unfortunately does not work when the goal is to determinize nondeterministic B¨uchi automata, where accepting runs have to not only reach the set of accepting statesF but have to revisit F infinitely often (♦F).
Chapter 9. Deterministic ω-automata for LTL formulas 9.2. Variants of Safra’s determinization construction
Safra’s approach to determinizing NBA relies on the use of multiple, nested subsets to track not only all the reachable states for a given word but as well sets of states that track the existence of at least one run to the contained state from some visit ofF . These subsets are organized in an ordered tree structure, thus each state in the deterministic automaton does now consist not only of a single subset but of a tree of subsets. Each node of the tree maintains in addition to the subset of states of the NBA as well some other accounting information. The subset of the root node corresponds to the “global” subset construction. Every time some states in the subset of a node reachF , a new subset is spawned in a child node, tracking the reachable states from the states that have visitedF . The order in the tree is maintained according to the “age” of the nodes, i.e., the left-most sibling is the node that has been introduced into the tree before all other siblings, etc.
Several transformations are employed to ensure the conciseness of the trees. These trans- formations ensure that for an NBA withn states the trees used for tracking require at most n tree nodes. To ensure that a single state is not tracked by more than one tree node at a given level of the tree, only the left-most node of multiple nodes that share a state is tasked with its tracking. Likewise, it is ensured that the union of the states tracked by child nodes is a proper subset of the states tracked by the parent node. In fact, the occurrence of the situation where the subset of the parent coincides with the union of the subsets of the children marks a “good” event for the parent node, as this signifies the existence of a run fragment starting from some states inF and again reaching F for all states in the parent node. In contrast, the situation where a subset becomes empty marks a “bad” event for a node, as all the runs tracked by this node are finite and thus surely not accepting.
The acceptance condition is then used to track the occurrence of the “good” and the “bad” events for a node, with acceptance corresponding to the infinite occurrence of “good” events with the added requirement that from some point on no more “bad” events happen. This corresponds to a single Rabin pair per node, with the condition♦“good” ∧ ♦¬“bad”. Clearly, there has to be a persistent relation between a given pair in the Rabin acceptance condition and the corresponding node in the tree. For this purpose, Safra’s construction maintains an identifier in each of the tree nodes that is persistent from the moment a node is created until its possible removal due to the subset it tracks becoming empty. Additionally, a flag is maintained for each node that signals the occurrence of a “good” event for the node for a single step.
Safra’s construction allows the determinization of an NBA withn states to a deterministic Rabin automaton with2O(n log n)states andn acceptance pairs [Saf88, Saf89].
Schewe’s construction. Schewe’s construction [Sch09] uses history trees, a variant of Safra’s tree structure that are stripped of the node identifiers used by Safra to maintain the relationship between nodes and acceptance pairs. Instead of explicitly maintaining an iden- tifier for each node in a tree, the identifier of a history tree node is implicitly given by its position in the tree, i.e., the path taken from the root node to reach a given node. For ex- ample, if a nodev in the tree is reached from the root node by taking the third child of the root and then the second child of that node, the position of the node and thus its identifier would then be the sequence3, 2 ∈ {1, . . . , n}∗, wheren is again the number of states in the NBA. The concise structure of the trees ensures that each node can have at mostn− 1 children and the maximal height of the tree is likewise bound byn. Schewe shows that
9.2. Variants of Safra’s determinization construction Chapter 9. Deterministic ω-automata for LTL formulas
the number of different node positions in a history tree is bound by 2n−1. As each node
position corresponds to one acceptance pair, his approach thus trades a simpler structure of the trees making up the state space of the deterministic automaton for the potential need of an exponential number of acceptance pairs in the Rabin acceptance condition.
It is clear that the position of a node is not necessarily persistent over a run, as older siblings may disappear. It is however guaranteed that for infinite words with accepting runs in the NBA at least one of the tree nodes will eventually remain always stable, i.e., never changes its position in the tree anymore. A marker per node is kept to signal that the node has not been stable during the last transition, corresponding to a “bad” event in Safra’s construction. As in Safra’s construction an additional marker is kept to signal the “good” event that a run fragment between two visits ofF has been detected for all the states in a subset. Overall, Schewe’s approach allows the construction of an equivalent deterministic Rabin automa- ton with o (2.66n)n) states and 2n − 1 acceptance pairs from a nondeterministic B¨uchi
automaton withn states [Sch09].
Piterman’s construction. Piterman’s construction [Pit07] has as its aim to generate a de- terministic parity automaton instead of a deterministic Rabin automaton. This is achieved by integrating an index appearance record [Saf92] into the trees, maintaining a permutation of the node identifiers in an order that reflects the recentness of the “good” and “bad” events for the nodes, together with two pointers into the permutation. The compact Safra trees used by Piterman drop the explicit ordering relation of the sibling nodes in Safra trees according to their age. Instead, it is ensured that a younger node has a smaller identifier than an older node. As nodes may disappear from the tree, the identifiers of the nodes are compacted after each transition by decreasing their identifier while maintaining the age relation. As the identifier of a node tracking runs that are infinitely often accepting can only be decreased a finite number of times, the node identifier of such a node will be eventually persistent. This ensures that the occurrence of infinitely many “good” events for such a node is appropriately reflected in the acceptance condition.
For an NBA withn states, Piterman’s algorithm constructs an equivalent deterministic par- ity automaton with at most2n(n!)2states and2n priorities [Pit07, LW09].
Schewe’s construction to generate DPA. In [Sch09], Schewe details the necessary modifi- cations to construct a deterministic parity automaton using his approach using history trees. As the direct use of index appearance tracking as employed by Piterman would result in an exponential blowup due to the potentially exponential number of different node iden- tifiers, Schewe thus maintains later introduction records, a compact representation of the introduction order of the tree nodes.
For an NBA withn states, Schewe’s variant for the parity acceptance condition constructs an equivalent deterministic parity automaton withO(n!2) states and 2n priorities [Sch09]. Implementation and heuristics. As we are interested in obtaining small deterministicω- automata in practice, we have implemented Piterman’s construction as well as both variants of Schewe’s construction in ltl2dstar and will report in the next section about empirical re- sults. We were especially interested to see whether the potential for an exponential number of acceptance pairs of Schewe’s DRA construction will manifest in practice.