Deterministic Parity Automata – What Are They Good For?Deterministic parity (word) automata are often introduced as the simplest deterministic automaton model for words of infinite length that can capture all Most scientific papers (and lectures) that use parity word automata do not give an example that helps the reader to gain an intuition on why they are defined in the way they are and how they can be used to encode DefinitionBefore we can give an example, we need to define what we are talking about. Given a set A parity word automaton Remarks: The definition of the parity acceptance condition varies slightly between the publications. In publications that contain new game-theoretic results, an infinite run is often defined to be accepting if and only if the lowest color occurring infinitely often along it is even. Likewise, a run can be defined to be accepting if and only if the lowest or highest color occurring infinitely often along it is odd. All of these possible definitions are equivalent, as we can easily translate a coloring function to another coloring function Colors are also often called priorities in the literature. Sometimes, deterministic automata do not need to have successor states for every combination of predecessor state and alphabet symbol. If no transition is present, the automaton rejects a word. The model above is equivalent in the sense that we can always introduce a rejecting sink state to which we can divert finite-length runs that should be rejecting. In this document, we use the above definition (highest color should be even) as it seems to be most common in the area of reactive synthesis, from which we draw the example given below. A Simple Specification for a Simple Reactive SystemWe consider an example in which a deterministic parity word automaton is to be constructed that encodes a specification over a reactive system. A reactive system reads, in every of its computation cycles, the values of its input propositions and writes the values of its output propositions. The propositions of the reactive system that we are concerned with in this example are depicted in the following image: ![]() A reactive system operates in steps. In every step, the system reads the values of its input propositions and writes the values of its output propositions. The system has no designated time of going out of service, so the traces of the system that collect the input and output in every computation cycle are infinitely long. An example trace of the system is: ![]() In every tuple, the upper-most element represents the value of Let us start with a simple automaton that encodes that if ![]() The automaton has three states, where all states with the names The automaton looks complicated, but is in fact quite simple. Whenever Let us now analyze whether the automaton represents the specification that we want it to encode. By the definition of the automaton, we have that Now does this specification make any sense in the real world? If we interpret So let us now make it more complete.
Let us assume that the Let us implement the additional specification part by modifying the parity automaton from above using intuition. We can do so by adding a state with a color of ![]() It may look surprising at first that from state The specification encoded by the automaton is still relatively simple. Real-world practical specifications consist of many more properties, and the resulting parity automata are much more complicated then. In particular, so-called safety properties are often added to practical specifications. These state that the system under design should never perform certain specified sequences of actions. Strenghtening a specification represented as a deterministic parity automaton by some safety property can be done without changing the number of colors in the automaton (provided that there was already at least one odd color in the automaton). Since safety properties are quite frequent in practical specifications, but non-safety properties are more rare, this means that parity automata for real-life specifications can often have few colors. We want to explore this possibility by giving a complete specification for the above arbiter scenario. We write down all requirements that the reactive system should fulfill, and formalize them in linear temporal logic (LTL). While we will not define LTL here (as probably most readers that reached this point of this page will be familiar with it), and just give the translation of the English language specification parts to LTL.
In LTL, these properties can be written as: There are tools available to automatically translate LTL formulas into deterministic parity automata. One of them comes with the spot framework. For example, for spot 2.3.5, we can run the following command to compute a deterministic parity automaton for the conjunction of these five LTL properties: ltl2tgba -G -D -S -d"avc" -f "([]<>r -> []<>g) & <>[]init & [](X X g -> init & X init & X X init ) & ! g & ! X g & [](! g | X ! g) & G(init & ! X init -> ! r & ! X r)" | dot2tex -f tikz Note that the globally operator ( ![]() A PDF of the automaton is available here. Note that the graph only shows the colors of some of the states (next to the state numbers), but there are still four different colors, as in the previous automaton. Also, the sink state (from which all suffix words are rejected) is missing from the automaton. The new automaton looks a lot more complicated even though the specification is still quite simple. While at least one other LTL-to-parity-automaton tool produces a smaller automaton for this specification, note that pretty much all automata that encode interesting specifications are quite large, which explains why real-world examples of parity automata are seldomly found in the literature. At this point, I would like to thank Alexandre Duret-Lutz for helpful suggestions on using spot to generate parity automata. Ok, What's Their Use Now?Deterministic parity automata can encode specifications of reactive systems, just like temporal logic formulas or other automaton types over words of infinite length (such as Büchi automata that almost every student taking a formal methods course learns about). Once a specification has been formalized, it can be used in automatic procedures for the verification and/or synthesis of reactive systems.
|