Problemadvanced
Reactive synthesis
Also called LTL synthesis, Church's synthesis problem.
Given a temporal logic specification over inputs and outputs, build a finite-state system whose outputs meet it for all input sequences.
Reactive synthesis asks for a system that runs forever against an environment. At each step the environment sets the input signals, and the system then sets the output signals. The specification is a formula of linear temporal logic (LTL), or of another logic of infinite words, over both kinds of signals. The system must make the formula true for every sequence of inputs, so the problem is a game between the system and an adversarial environment, not a search for one good run. Church posed the problem in 1957. Büchi and Landweber (1969) solved it for the monadic logic S1S, and Pnueli and Rosner (1989) gave the doubly exponential algorithm for LTL, which the Pnueli-Rosner theorem shows to be optimal.
In plain words
Think of a controller for traffic lights. Cars arrive when they want, and the controller turns lights green and red. A rule might say: "two crossing roads are never green at the same time, and every waiting car gets a green light at some time". The task is to build a controller that keeps the rule, however the cars arrive.
The hard part is that the controller does not know the future. A rule can be easy to meet for one known arrival pattern and still impossible to keep for all of them. So the question is not "is there a good run?" but "is there a way to react that always wins?"
The usual solution turns the rule into a finite game board. A winning way to play on this board is a finite machine, and that machine is the controller.
Definition
Signals. and are disjoint finite sets of atomic propositions, the inputs and the outputs. A letter is a set of true propositions, so the input letters are and the output letters are .
Strategy. A strategy for the system is a function . It maps the inputs seen so far, including the current one, to the current output. On an input word it gives the outcome
an infinite word over . The output at step depends only on the inputs up to step : the strategy cannot see the future.
Realizability. A formula over is realizable if some strategy has for every input word .
Input. The sets and and a formula .
Output. "Unrealizable", or a finite-state strategy that realizes : a Mealy machine with a finite set of states , a transition function and an output function . It reads , writes and moves to .
Realizability is not satisfiability. is satisfiable if some word over satisfies it. Realizability needs a good output for every input word, chosen step by step with no knowledge of later inputs. Two edge cases show the gap. If , the system has no choice, and is realizable exactly when it is valid over . If , the environment has no choice, and is realizable exactly when it is satisfiable; a satisfiable LTL formula has an ultimately periodic model (LTL satisfiability), which a finite machine can produce.
Variants
- Moore strategies. The system writes its output before it reads the input, so . Some formulas, such as , are realizable as a Mealy machine and not as a Moore machine.
- Church's problem. The specification is a formula of S1S, the monadic second-order logic of one successor, or an automaton on infinite words. This is the first form of the problem.
- GR(1) synthesis. The specification has the form "safety and fairness assumptions on the environment imply safety and fairness guarantees of the system", with formulas as fairness. This fragment is solved in time polynomial in the size of the game graph (Piterman, Pnueli and Sa'ar 2006).
- Bounded synthesis. Look for an implementation with at most states, for , by a constraint problem for a SAT or SMT solver (Schewe and Finkbeiner 2007).
- Distributed synthesis. Several processes, each with its own partial view of the inputs, must together realize . This is undecidable in general (Pnueli and Rosner 1990).
- Branching time. The specification is a formula of CTL or of the modal mu-calculus over the tree of all behaviours.
Examples
Let and .
- is realizable by the Mealy machine with one state and : the grant copies the request.
- is satisfiable, for example by the word where and are always false. It is not realizable. Take any strategy and let the environment play and then exactly when . Then at step 0 differs from at step 1, so fails at step 0. The system would have to predict the next input.
An arbiter. Let and , and
A Mealy machine with two states and realizes it: in it writes and moves to , and in it writes and moves to , whatever the input. The grants never overlap, and each grant comes back every second step, so every request is served. No machine with one state works: its output on the input is one fixed letter, and if the environment sends this input forever, one of the two grants never comes.
Now add "no grant without a current request", . The result is satisfiable, for example by a word with no requests and no grants, but it is not realizable. The environment sends at step 0 and then forever. At step 0 the system can grant at most one request, and later it may grant nothing, so the other request is never served.
Known algorithms
Reduction to a parity game (the automata-theoretic method). Let .
- Translate into a nondeterministic Büchi automaton with states over the alphabet (LTL to Büchi translation).
- Determinize into a deterministic parity automaton (Safra 1988, Piterman 2006). For states in , has at most states and priorities. With , this is states and priorities. A nondeterministic automaton is not enough, because the system would have to guess a run that must work for future inputs it has not seen.
- Build the parity game: in a state of the environment picks , then the system picks , and the play moves to . The priority of a position is the priority of its state of . The system wins a play if accepts the word of the play.
- Solve the game, for example by Zielonka's algorithm, or by a quasi-polynomial algorithm (parity game solving). If the system wins from the start, a positional winning strategy is a Mealy machine with the states of as its states.
The Pnueli-Rosner theorem page counts the cost: doubly exponential in , and polynomial in the number of states of for a fixed number of priorities.
Safraless methods. Kupferman and Vardi (2005) avoid determinization. They dualize a Büchi automaton for into a universal co-Büchi automaton for , and reduce realizability to the emptiness of a nondeterministic Büchi tree automaton. Bounded synthesis encodes "an implementation with states whose runs the universal automaton accepts" as constraints, which is often small for real specifications.
GR(1). For specifications in the GR(1) form, a nested fixpoint over sets of states, in the style of the modal mu-calculus, computes the winning region and a strategy directly with binary decision diagrams (Piterman, Pnueli and Sa'ar 2006; Bloem and others 2012).
Bounds
Theorem (Büchi and Landweber 1969). Church's problem for a formula of S1S is decidable. If the formula is realizable, it is realizable by a finite-state strategy, and if it is not, the environment has a finite-state strategy that defeats every strategy of the system.
Proof. Let be the formula. By McNaughton's theorem (1966) there is a deterministic automaton with a Muller condition that accepts exactly the words that satisfy . A Muller condition can be turned into a parity condition by a finite memory of the order of last visits, so let be a deterministic parity automaton. Build the finite parity game of step 3 above.
Parity games on finite graphs are determined, and the winner has a positional winning strategy (Emerson and Jutla 1991; Zielonka 1998). The winner is also computable, because the game is finite: for example, Zielonka's algorithm decides it. So it is enough to show that the system wins from the start exactly when is realizable.
Suppose the system wins with the positional strategy . The Mealy machine with is finite. On an input word , the states of this machine are the run of on the outcome, and this run is a play of in which the system follows . The play is won by the system, so accepts the outcome, and the outcome satisfies .
Suppose the environment wins with the positional strategy . Take any strategy of the system in the synthesis problem, with any memory. Because is deterministic, every history of inputs and outputs fixes one state of , so is also a strategy of the system in . The play where the environment follows and the system follows is won by the environment, so rejects this outcome, and does not realize . So is unrealizable, and is a finite-state strategy that defeats every .
The same proof works for LTL, through the translation into a Büchi automaton.
Further bounds.
- LTL. Realizability is 2EXPTIME-complete (Pnueli-Rosner theorem). LTL satisfiability and validity, the cases and , are only PSPACE-complete. The extra exponential comes from the adversarial environment.
- S1S. The cost is not elementary. The case is satisfiability of S1S, and Meyer (1975) proved that already the weak monadic theory of one successor, which S1S contains, is not elementary.
- GR(1). Polynomial in the size of the game graph. The graph itself can be exponential in the number of propositions.
- Distributed architectures. Undecidable in general (Pnueli and Rosner 1990).
Reductions
- To parity games. The method above reduces LTL realizability to a parity game with doubly exponentially many positions and exponentially many priorities.
- From satisfiability and validity. With realizability is satisfiability, and with it is validity. So reactive synthesis is at least as hard as both.
- Duality. By the theorem above, is unrealizable by a Mealy system exactly when is realizable by the environment as a Moore machine, which writes the next input before it sees the next output.
- Supervisory control. Supervisory control theory restricts a given plant by disabling some of its controllable events. This is a game of the same kind, with the uncontrollable events as the environment.
Applications
- Hardware controllers. Arbiters, bus controllers and other small circuits whose behaviour has a clear temporal specification.
- Robot controllers. High-level plans for robots, written as GR(1) specifications over sensor inputs and actions.
- Interfaces and protocols. Components that must react correctly to any behaviour of their neighbours.
- Checking specifications. An unrealizable specification is a bug in the specification, and the environment strategy from the proof above shows how it fails.
References
- Alonzo Church, Applications of recursive arithmetic to the problem of circuit synthesis, Summaries of the Summer Institute of Symbolic Logic, vol. I, Cornell University, Ithaca, 1957, pp. 3-50, the first statement of the problem, for circuits that map input streams to output streams under a specification in a logic of sequences
- J. Richard Büchi and Lawrence H. Landweber, Solving sequential conditions by finite-state strategies, Transactions of the American Mathematical Society 138, 1969, pp. 295-311, Church's problem for S1S is decidable, the game is determined, and the winner has a finite-state strategy
- Amir Pnueli and Roni Rosner, On the synthesis of a reactive module, Principles of Programming Languages (POPL 1989), pp. 179-190, the definition of realizability of LTL by a reactive module, its difference from satisfiability, and the doubly exponential algorithm through tree automata
- Roni Rosner, Modular Synthesis of Reactive Systems, PhD thesis, Weizmann Institute of Science, Rehovot, 1992, the matching 2EXPTIME lower bound for LTL realizability
- Robert McNaughton, Testing and generating infinite sequences by a finite automaton, Information and Control 9(5), 1966, pp. 521-530, every Büchi automaton has an equivalent deterministic Muller automaton
- Shmuel Safra, On the complexity of omega-automata, Foundations of Computer Science (FOCS 1988), pp. 319-327, determinization of a Büchi automaton with n states into a Rabin automaton with 2^O(n log n) states
- Nir Piterman, From nondeterministic Büchi and Streett automata to deterministic parity automata, Logic in Computer Science (LICS 2006), pp. 255-264, a deterministic parity automaton with at most 2 n^n n! states and 2n priorities for a Büchi automaton with n states
- E. Allen Emerson and Charanjit S. Jutla, Tree automata, mu-calculus and determinacy, Foundations of Computer Science (FOCS 1991), pp. 368-377, parity games are determined with positional (memoryless) winning strategies
- Wiesław Zielonka, Infinite games on finitely coloured graphs with applications to automata on infinite trees, Theoretical Computer Science 200(1-2), 1998, pp. 135-183, the recursive algorithm for parity games and positional determinacy
- Amir Pnueli and Roni Rosner, Distributed reactive systems are hard to synthesize, Foundations of Computer Science (FOCS 1990), pp. 746-757, synthesis for an architecture of several processes with partial information is undecidable in general
- Roderick Bloem, Barbara Jobstmann, Nir Piterman, Amir Pnueli and Yaniv Sa'ar, Synthesis of Reactive(1) designs, Journal of Computer and System Sciences 78(3), 2012, pp. 911-938, the GR(1) fragment and its symbolic algorithm by a nested fixpoint, polynomial in the size of the game graph (first version by Piterman, Pnueli and Sa'ar at VMCAI 2006, doi:10.1007/11609773_24)
- Orna Kupferman and Moshe Y. Vardi, Safraless decision procedures, Foundations of Computer Science (FOCS 2005), pp. 531-542, synthesis through universal co-Büchi automata, with no determinization
- Sven Schewe and Bernd Finkbeiner, Bounded synthesis, Automated Technology for Verification and Analysis (ATVA 2007), pp. 474-488, a search for implementations of bounded size by constraint solving
- Albert R. Meyer, Weak monadic second order theory of successor is not elementary-recursive, Logic Colloquium, Lecture Notes in Mathematics 453, 1975, pp. 132-154, the non-elementary lower bound for the weak monadic theory of one successor
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag R9BHD9 Edit this page History Report an error Markdown