p. 1/? CHURCH SYNTHESIS PROBLEM and GAMES Alexander Rabinovich Tel-Aviv University, Israel http://www.tau.ac.il/ rabinoa
p. 2/? Plan of the Course 1. The Church problem - logic and automata. 2. Games - basic notions. 3. Memoryless determinacy. 4. Finite memory determinacy 5. Applications and trends.
p. 3/? Sources 1. D. Perrin, J.E. Pin. Infinite Words, Elsevier, Amsterdam 2004. 2. E. Grädel, W. Thomas, Th. Wilke (Eds). Automata, Logics, and Infinite Games, Springer LNCS 2500 (2002). 3. Publications in Game training network".
p. 4/? Plan of first lesson 1. The Church problem - setting, examples, Buchi-Landwerber Theorem. 2. Monadic second-order logic. 3. Infinite behavior of finite state Automata.
p. 5/? Synthesis Problem Input: A specification S(I, O) Task: Find a program P which implements S, i.e., I(S(I, P(I)). Formal and Expressive Specification and Implementation languages.
p. 6/? Church s Problem Consider a bit by bit transformation of bit streams...b t...b 2 b 1 F...a t...a 2 a 1 Church s Problem: For a given I-O specification fill the box. Given a logical specification of the input-output relation R find a mapping (implementation) F : b F(b) such that (b, F(b)) R for all b. Aim - Presentation of a solution of Church s Problem.
p. 7/? Implementation language - Causal Operators =strategies...b t...b 2 b 1 F...a t...a 2 a 1 Causal-operator - a t depends only on b 1 b 2... b t - C-operators. Strongly Causal-operator - a t depends only on b 1 b 2... b i... (i < t) - SC -operators. SC-operators = Player I strategy; C-operators = Player II strategy. C-operators computable by finite automata, recursive C-operators.
p. 8/? Example Consider R defined by the conjunction of three conditions on the input-output stream (b, a): 1. t(b(t) = 1 a(t) = 1) 2. ta(t) = a(t + 1) = 0 3. ω tb(t) = 0 ω ta(t) = 0 S1S=MLO formula ϕ(x, Y) := t(y(t) = 1 X(t) = 1) tx(t) = X(t + 1) = 0 ω ty(t) = 0 ω tx(t) = 0
p. 9/? Common-Sense Solution Common-Sense Solution 1. for input 1 produce output 1 2. for input 0 produce output 1 if last output was 0 output 0 if last output was 1 This is a finite memory strategy. Can be implemented by a finite state automaton with output. 1/1 1/1 Last 0 0/1 Last 1 0/0
p. 10/? Büchi-Landweber Theorem Büchi Landweber(69) proved that the Church synthesis problem is computable. Theorem. For every MLO formula ψ(x, Y) it is decidable whether there is C- operator F which implements ψ, i.e. Nat = Xψ(X, F(X)) If such an operator exists then there is a finite state operator which implements ψ. Moreover, this finite state operator is computable from ψ.
p. 11/? Techniques Rich interplay of 1. Mathematical logic - Monadic Second-Order Logics 2. Automata theory - automata on infinite objects. 3. Games of infinite length.
p. 12/? The language for specifying temporal behavior MLO (Monadic second-order Logic of Order ) 1st-order variables x, y, z,... ranging over elements 2nd-order variables X, Y, Z,... ranging over sets of elements Formulas x < y x X x P a ϕ ϕ ϕ xϕ Xϕ Models - Discrete Linear Time: T = (Nat, <) Other models - Rationals, Reals, Tree order, etc. MLO plays a very important role in logic and CS. Fundamental connection between MLO and automata theory - Buchi Trakhtenbrot, Rabin.
p. 13/? Examples - Formalization over (Nat, <) 1. X is infinite: Inf(X) := t t (t > t X(t )) 2. t 2 is a successor of t 1 : ϕ(t 1, t 2 ) := t 1 < t 2 t 3 (t 1 < t 3 < t 2 ) 3. X is the set of even numbers tx(t) X(t + 1) X(0) 4. t 1 is an even number: Even(t 1 ) := X(X(t 1 ) tx(t) X(t + 1) X(0) 5. After every occurrence of X there is an occurrence of Y ϕ(x, Y) := tx(t) t 1 (t 1 > t Y(t 1 ))
p. 14/? Decidability of MLO Theorem (Büchi, Elgot, Trakhtenbrot) Validity problem is decidable over the class of finite orders. Theorem (Büchi) Validity problem is decidable over the Natural Numbers (N, <). Theorem (Büchi) Validity problem is decidable over the class of countable ordinals. Theorem (Rabin) Validity problem is decidable over the full binary tree. Proof Technique: Reduction to finite automata.
p. 15/? Automata A nondeterministic automaton is Q, Σ, δ, q 0, Acc Q - a set of states Σ - an alphabet δ Q Σ Q - a transition relation q 0 - initial state Acc - an acceptance condition.
p. 16/? Runs over strings A string a 1 a 2... a n A run over a 1 a 2... a n from a state q 0 : a sequence q 0 a 1 q 1 a 2... a n q n such that q i, a i, q i+1 δ. Acceptance condition: F Q. A run is accepted iff its last state is in F. A string is accepted iff there is an accepting run over this string. The language of an automaton is the set of strings it accepts.
p. 17/? Runs over ω-strings An ω-string a 1 a 2... a n... A run over a 1 a 2... a n... from a state q 0 : a sequence ρ = q 0 a 1 q 1 a 2... q i a i q i+1... such that q i, a i, q i+1 δ. No last state! Infinitely visited states: Inf(ρ) = {q Q : q appears infinitely often in ρ} Acceptance condition (Muller): Instead of a subset F of Q - a family F = {F 1, F 2,... F m } of subsets of Q. A run ρ is accepted iff Inf(ρ) is one of F i F An ω-string is accepted iff there is an accepting run over this string. The ω-language of an automaton is the set of strings it accepts.
p. 18/? Automata Closure Properties Theorem. Closed under (intersection), (union), (complementation) and (projection). All these constructions are effective. Projection: s = (a 1, b 1 )(a 2, b 2 )... over an alphabet Σ 1 Σ 2. Proj 1 (s) is a 1 a 2... over Σ 1. Determinization: Every automaton is equivalent to a deterministic automaton. Remarks. The constructions for automata over ω-strings are more subtle than the constructions for automata over strings.
p. 19/? Two equivalent specification formalisms Theorem 1. There is an algorithm which for every ϕ(x, Y) constructs an equivalent Muller automaton over the alphabet {0, 1} {0, 1}. 2. There is an algorithm which for every Muller automaton over the alphabet {0, 1} {0, 1} constructs an equivalent formula ϕ(x, Y). The letter (0, 1) corresponds to X(t) = 1 and Y(t) = 0. An ω-string (1, 1)(0, 1)(0, 0)(1, 1)(0, 1)(0, 0)(1, 1)(0, 1)(0, 0)... corresponds to the interpretation X = {0, 3, 6,...} Y = {0, 1, 3, 4...}.