Distributed games with causal memory are decidable for series-parallel systems Paul Gastin, Benjamin Lerman, Marc Zeitoun Firstname.Name@liafa.jussieu.fr LIAFA, Université Paris 7, UMR CNRS 7089 FSTTCS, dec. 04 Gastin, Lerman, Zeitoun Causal distributed games 1/21 Outline 1 Motivation 2 A toy example 3 Architectures, games, memory and strategies 4 Main result Gastin, Lerman, Zeitoun Causal distributed games 2/21 Outline 1 Motivation 2 A toy example 3 Architectures, games, memory and strategies 4 Main result Gastin, Lerman, Zeitoun Causal distributed games 3/21 Context: control and synthesis Environment E acts on Open system S Specification ϕ Two problems (Ramadge, Wonham) I I Decide whether there exists a finite memory controller st. (S ⊗ C) k E |= ϕ. Synthesis: if so, compute such a controller. Gastin, Lerman, Zeitoun Causal distributed games 4/21 Context: control and synthesis Environment E acts on enables/disables actions Controller C provides info Open system S Specification ϕ Two problems (Ramadge, Wonham) I I Decide whether there exists a finite memory controller st. (S ⊗ C) k E |= ϕ. Synthesis: if so, compute such a controller. Gastin, Lerman, Zeitoun Causal distributed games 4/21 Control as a game Classical framework Games well suited to solve controller synthesis problems. System Controller I Environment I Correct behavior I Finding a controller I I ; ; ; ; ; game graph. a player. the opponent. winning condition. finding a winning strategy. In general For reasonable sequential systems and specifications, both problems are decidable. Gastin, Lerman, Zeitoun Causal distributed games 5/21 Distributed controller synthesis Environment E acts on Open distributed system S S1 S2 S3 S4 Specification ϕ Two problems, again I I I I Decide whether there exists a distributed controller with finite memory, st. (S1 ⊗ C1 ) k · · · k (Sn ⊗ Cn ) k E |= ϕ, and if so, synthesize it. Distributed game system against environment. Winning distributed strategy ; correct distributed controller. In general, undecidable (Peterson-Reif 1979, Pnueli-Rosner 1990). Gastin, Lerman, Zeitoun Causal distributed games 6/21 Distributed controller synthesis Environment E acts on Controlled distributed system S Open open distributed system S C1 S1 S2 C2 C3 S3 S4 C4 Specification ϕ Two problems, again I I I I Decide whether there exists a distributed controller with finite memory, st. (S1 ⊗ C1 ) k · · · k (Sn ⊗ Cn ) k E |= ϕ, and if so, synthesize it. Distributed game system against environment. Winning distributed strategy ; correct distributed controller. In general, undecidable (Peterson-Reif 1979, Pnueli-Rosner 1990). Gastin, Lerman, Zeitoun Causal distributed games 6/21 Distributed controller synthesis I Input I I I I I Communication architecture. Interactions between system and environment. Output Finite memory distributed controller, which can inhibit some controllable actions, and realizes the specification. As in the sequential games, can use memory. I Controllers only observe locally, on their own site. No global view. I eg, the choice for an action cannot depend on a concurrent action. One requires the memory to be computable in the distributed architecture. I one allows: extra data in communications (piggy-backing), I one rules out: additional communications. Gastin, Lerman, Zeitoun Causal distributed games 7/21 Outline 1 Motivation 2 A toy example 3 Architectures, games, memory and strategies 4 Main result Gastin, Lerman, Zeitoun Causal distributed games 8/21 A toy example: Alice and Bob Game I I I I I Want to communicate via the same communication line. At any time, exactly one communication line broken by the environment. Environment: looks where A&B are connected, and, atomically, chooses to break a (possibly different) line. A/B looks its own position and the broken line and, atomically, reconnects to a (possibly different) line. States of process i: Qi = {1, 2, 3, 4}. I I I I Q1 : Alice’s line. Q2 : Number of the broken line. Q3 : Bob’s line. Dependence between moves A – E – B. 1 2 1 Broken line 2 A B 3 3 4 4 Gastin, Lerman, Zeitoun Causal distributed games Communication architecture Q1 A Q2 E B Q3 read-write ability read-only ability 9/21 Example: plays Moves I I I I Example of move: B reads 1, 2 on processes 2, 3 and writes 4 on process 3. Play: sequence of moves. Winning condition: finite play where A & B are on the same non-broken line at the end. In this example, one can add some fairness: E loses if it monopolizes the game Q1 1 Q2 # 1 Q3 1 1 1 # 1 2 1 A B 2 3 B 4 E A 2 B 2 A B 4 4 E E 3 A 1 B 1 E 4 B 1 Distributed plays are labeled partial orders Gastin, Lerman, Zeitoun Causal distributed games 10/21 Outline 1 Motivation 2 A toy example 3 Architectures, games, memory and strategies 4 Main result Gastin, Lerman, Zeitoun Causal distributed games 11/21 Architectures I I I (Σ, P, R, W ) P: set of processes Each player a of Σ, atomically I I reads the state of processes in a fixed set R(a) ⊆ P. writes the state on processes of a fixed set W (a) ⊆ P. ∀a ∈ Σ, ∀a, b ∈ Σ, I ∅ 6= W (a) ⊆ R(a) R(a) ∩ W (b) 6= ∅ ⇐⇒ R(b) ∩ W (a) 6= ∅ Dependence: a D b ⇐⇒ R(a) ∩ W (b) 6= ∅ ⇐⇒ R(b) ∩ W (a) 6= ∅ Legal architectures a A E B b Forbidden (non symmetric) Gastin, Lerman, Zeitoun OK (cellular) Causal distributed games a d c e b OK (purely asynchronous) 12/21 Games and plays Game on (Σ, P, R, W ) I I I G = (Σ0 , Σ1 , (Qi )i∈P , (δa )a∈Σ , q 0 , W). Σ = Σ0 ] Σ1 : partition of the set of players (actions) in teams 0 and 1. Players of team 0 cooperate against team 1. Rules of the game for player a are given by δa ⊆ QR(a) × QW (a) . Finite play 1 1 # 1 A 2 B 2 B 4 E 3 A 1 E 4 Σ0 = {(a, p) | a ∈ Σ, p ∈ QW (a) } ∪ {(#, q 0 )}, I I I Mazurkiewicz trace on Σ0 B 1 (a, p) D (b, q) ⇔ a D b Move: extension of the current trace following the rules. The game is neither positional nor turned based. Winning condition: set of Mazurkiewicz traces W ⊆ R(Σ 0 , D). Team 0 wins the plays of W and loses other plays. Gastin, Lerman, Zeitoun Causal distributed games 13/21 Memory Memory I I I I Each player has a partial view of the history of a play. Strategies use this view in order to choose next move. Memoryless: a move can depend only on the current state. Local memory: a player remembers write actions on the processes it writes to. 1 # 2 A 1 B 1 1 A E 3 B 2 4 E 4B B 1 A 2 1 1# 1 1 A 1 E 3 B 2 B 4 E 4 B 1 B 2 Causal memory (intuitively, maximal history a player can observe) I I I Players gather and forward as much information as possible. By extension: finite abstraction of full causal memory. Thanks to the symmetry condition, causal memory can be implemented. Gastin, Lerman, Zeitoun Causal distributed games 14/21 Memory Memory I I I I Each player has a partial view of the history of a play. Strategies use this view in order to choose next move. Memoryless: a move can depend only on the current state. Local memory: a player remembers write actions on the processes it writes to. 1 # 2 A 1 B 1 1 A E 3 B 2 ?? 4 A E 4B B 1 1 A 2 1 1# 1 A 1 E 3 B 2 B 4 A ?? E 4 B 1 B 2 Causal memory (intuitively, maximal history a player can observe) I I I Players gather and forward as much information as possible. By extension: finite abstraction of full causal memory. Thanks to the symmetry condition, causal memory can be implemented. Gastin, Lerman, Zeitoun Causal distributed games 14/21 Memory Memory I I I I Each player has a partial view of the history of a play. Strategies use this view in order to choose next move. Memoryless: a move can depend only on the current state. Local memory: a player remembers write actions on the processes it writes to. 1 # 2 A 1 B 1 1 A E 3 B 2 ?? 4 A E 4B B 1 1 A 2 1 1# 1 A 1 E 3 B 2 B 4 A ?? E 4 B 1 B 2 Causal memory (intuitively, maximal history a player can observe) I I I Players gather and forward as much information as possible. By extension: finite abstraction of full causal memory. Thanks to the symmetry condition, causal memory can be implemented. Gastin, Lerman, Zeitoun Causal distributed games 14/21 Memory Memory I I I I Each player has a partial view of the history of a play. Strategies use this view in order to choose next move. Memoryless: a move can depend only on the current state. Local memory: a player remembers write actions on the processes it writes to. 1 # 2 A 1 B 1 1 A E 3 B 2 ?? 4 A E 4B B 1 1 A 2 1 1# 1 A 1 E 3 B 2 B 4 A ?? E 4 B 1 B 2 Causal memory (intuitively, maximal history a player can observe) I I I Players gather and forward as much information as possible. By extension: finite abstraction of full causal memory. Thanks to the symmetry condition, causal memory can be implemented. Gastin, Lerman, Zeitoun Causal distributed games 14/21 Memory Memory I I I I Each player has a partial view of the history of a play. Strategies use this view in order to choose next move. Memoryless: a move can depend only on the current state. Local memory: a player remembers write actions on the processes it writes to. 1 # 2 A 1 B 1 1 A E 3 B 2 ?? 4 A E 4B B 1 1 A 2 1 1# 1 A 1 E 3 B 2 B 4 A ?? E 4 B 1 B 2 Causal memory (intuitively, maximal history a player can observe) I I I Players gather and forward as much information as possible. By extension: finite abstraction of full causal memory. Thanks to the symmetry condition, causal memory can be implemented. Gastin, Lerman, Zeitoun Causal distributed games 14/21 Memory Memory I I I I Each player has a partial view of the history of a play. Strategies use this view in order to choose next move. Memoryless: a move can depend only on the current state. Local memory: a player remembers write actions on the processes it writes to. 1 # 2 A 1 B 1 1 A E 3 B 2 ?? 4 A E 4B B 1 1 A 2 1 1# 1 A 1 E 3 B 2 B 4 A ?? E 4 B 1 B 2 Causal memory (intuitively, maximal history a player can observe) I I I Players gather and forward as much information as possible. By extension: finite abstraction of full causal memory. Thanks to the symmetry condition, causal memory can be implemented. Gastin, Lerman, Zeitoun Causal distributed games 14/21 Winning strategies Tuple (fa )a∈Σ0 where fa indicates to player a ∈ Σ0 how to play. Memoryless Full local memory Full causal memory fa : fa : QR(a) ∗ fa : QW (a) QR(a) M(Σ0 , D0 ) × QR(a) → QW (a) ∪ Stop → QW (a) ∪ Stop → QW (a) ∪ Stop Rem ∃ memoryless strategy ⇒∃ local mem. strategy ⇒ ∃ causal mem. strategy f -consistent f -maximal plays For a strategy f = (fa )a∈Σ0 , one looks at all plays t which are I consistent with f : each a-move in t is played according f . a I maximal: f predicts Stop for all possible a-move of Σ 0 on t. Winning strategies A strategy f is winning if all f -consistent f -maximal plays are in W. Gastin, Lerman, Zeitoun Causal distributed games 15/21 (Un)decidability of distributed games I Even for reachability conditions, distributed games are not determined. I Even for reachability conditions, team 0 may need memory to win. Rational winning conditions (folklore) Proposition For rational winning conditions. it is undecidable whether team 0 has a winning distributed strategy (with causal, local memory, or memoryless). Peterson-Reif, Madhusudan-Thiagarajan, Bernet-Janin-Walukiewicz It is undecidable whether team 0 has a winning strategy with local memory even: I I for reachability or safety conditions, with 3 players + environment. With causal memory, this undecidability result (with 3 players) does not hold. Gastin, Lerman, Zeitoun Causal distributed games 16/21 Outline 1 Motivation 2 A toy example 3 Architectures, games, memory and strategies 4 Main result Gastin, Lerman, Zeitoun Causal distributed games 17/21 Causal memory games on cographs Class of dependence alphabets containing singletons and closed by I I parallel composition sequential composition (A ∪ B, DA ∪ DB ), (A ∪ B, DA ∪ DB ∪ A × B ∪ B × A). Behaviors on cographs are called series-parallel. Main decidability result Theorem Distributed games with causal memory are decidable for controlled reachability conditions and symmetric series-parallel systems. Corollary Distributed games with causal memory with recognizable winning condition on finite traces are decidable for symmetric series-parallel systems. Proof technique I I I I Construction of bounded memory strategy from an arbitrary winning strategy. Induction on Σ. Glue strategies for small games obtained by induction. Main problem: compute information in a distributed way [Th90,CMZ93,EM93]. Gastin, Lerman, Zeitoun Causal distributed games 18/21 Controlled reachability conditions I q(t): global state reached on t. I P (t): set of global states seen along finite prefixes of t. # | I I I I {z P (t) } q(t) Controlled reachability condition: F ⊆ 2QP × (QP ] {∞}). A play t wins if (P , q)(t) ∈ F. Particular cases: reachability, safety. Example: Reach(X) corresponds to n o n o F = (P , q) | X ∩ (P ∪ q) 6= ∅ ∪ (P , ∞) | X ∩ P 6= ∅ Gastin, Lerman, Zeitoun Causal distributed games 19/21 Proof outline Induction on Σ Σ0 has a winning strategy ⇒ there is a “small winning strategy. Difficult case: series product. # A B A ··· µ 1. From a play, extract subplays on A, B + and induced strategies. 2. Replace these A, B-strategies by strategies with bounded memory (induction). 3. Finally glue these bounded memory strategies on A, B to obtain a strategy on Σ, with bounded memory. Main problem I I Players of team 0 have to know on which small game they are is playing. This information must be computed in a distributed way. Gastin, Lerman, Zeitoun Causal distributed games 20/21 Perspectives I Generalization to recognizable winning conditions of infinite traces. I Generalization to arbitrary dependence alphabets. I I I I Generalization to non symmetric architectures. Reasonable complexity bounds for synthesis. Control of systems with asynchronous communications (eg, MSC). May randomized strategies help? Conjectures I I I Distributed games with causal memory are decidable. Alternating asynchronous automata accept only than recognizable languages. The previous conjectures are equivalent. Gastin, Lerman, Zeitoun Causal distributed games 21/21 Perspectives I Generalization to recognizable winning conditions of infinite traces. I Generalization to arbitrary dependence alphabets. I I I I Generalization to non symmetric architectures. Reasonable complexity bounds for synthesis. Control of systems with asynchronous communications (eg, MSC). May randomized strategies help? Conjectures I I I Distributed games with causal memory are decidable. Alternating asynchronous automata accept only than recognizable languages. The previous conjectures are equivalent. O T E f n d a k l Thank you! Gastin, Lerman, Zeitoun Causal distributed games 21/21