reactive synthesis - courses.react.uni-saarland.de · reactive systems systems that react to...
Post on 22-Jul-2020
5 Views
Preview:
TRANSCRIPT
Reactive SynthesisLecture 01
Swen Jacobs and Martin Zimmermann(Saarland University)
Reactive Systems
Systems that react to environment inputs in potentially infiniteexecutions
Properties of reactive systems:
infinite (or unbounded) executions
reacting to antagonistic environment
usually discrete time steps and finite input range
often used as controllers of physical processes
Reactive Synthesis (2017/18) 1
Reactive Systems
Systems that react to environment inputs in potentially infiniteexecutions
Properties of reactive systems:
infinite (or unbounded) executions
reacting to antagonistic environment
usually discrete time steps and finite input range
often used as controllers of physical processes
Reactive Synthesis (2017/18) 1
Reactive Systems
Systems that react to environment inputs in potentially infiniteexecutions
Properties of reactive systems:
infinite (or unbounded) executions
reacting to antagonistic environment
usually discrete time steps and finite input range
often used as controllers of physical processes
Reactive Synthesis (2017/18) 1
The Need for Provable Correctness
Reactive Systems are often safety-critical:
controllers in planes, trains, cars
power plants, electric grids
Under assumption of discrete time and finite input range, manyproperties can automatically be proved for a given reactive system.This is called model checking.
Model checking decides whether a given system is correct, butleaves significant effort for the human designer: develop the systemand fix bugs until it is correct.
Reactive Synthesis (2017/18) 2
The Need for Provable Correctness
Reactive Systems are often safety-critical:
controllers in planes, trains, cars
power plants, electric grids
Under assumption of discrete time and finite input range, manyproperties can automatically be proved for a given reactive system.This is called model checking.
Model checking decides whether a given system is correct, butleaves significant effort for the human designer: develop the systemand fix bugs until it is correct.
Reactive Synthesis (2017/18) 2
The Need for Provable Correctness
Reactive Systems are often safety-critical:
controllers in planes, trains, cars
power plants, electric grids
Under assumption of discrete time and finite input range, manyproperties can automatically be proved for a given reactive system.This is called model checking.
Model checking decides whether a given system is correct, butleaves significant effort for the human designer: develop the systemand fix bugs until it is correct.
Reactive Synthesis (2017/18) 2
Verification versus Synthesis
Verification Workflow:
Synthesis Workflow:
The synthesis problem is also known as Church’s problem, sinceAlonso Church first defined it in 1962.
Reactive Synthesis (2017/18) 3
Verification versus Synthesis
Verification Workflow:
Synthesis Workflow:
The synthesis problem is also known as Church’s problem, sinceAlonso Church first defined it in 1962.
Reactive Synthesis (2017/18) 3
Verification versus Synthesis
Verification Workflow: Synthesis Workflow:
The synthesis problem is also known as Church’s problem, sinceAlonso Church first defined it in 1962.
Reactive Synthesis (2017/18) 3
Verification versus Synthesis
Verification Workflow: Synthesis Workflow:
The synthesis problem is also known as Church’s problem, sinceAlonso Church first defined it in 1962.
Reactive Synthesis (2017/18) 3
Example: A Specification
Consider a very simple system with a singlebit of input and a single bit of output.
Our specification is the conjunction of thefollowing three requirements:
1. Whenever the input bit is 1, then the output bit is 1, too.
2. At least one out of every three consecutive output bits is a 1.
3. If there are infinitely many 0’s in the input stream, then thereare infinitely many 0’s in the output stream.
First two requirements can be satisfied by always outputting a 1,but not the third.
How to satisfy all three?
Correct behavior: Every 1 in the input stream is answered by a 1.If input bit is a 0, answer with a 0, unless the last two output bitswere 0: in this case output a 1.
Reactive Synthesis (2017/18) 4
Example: A Specification
Consider a very simple system with a singlebit of input and a single bit of output.
Our specification is the conjunction of thefollowing three requirements:
1. Whenever the input bit is 1, then the output bit is 1, too.
2. At least one out of every three consecutive output bits is a 1.
3. If there are infinitely many 0’s in the input stream, then thereare infinitely many 0’s in the output stream.
First two requirements can be satisfied by always outputting a 1,but not the third.
How to satisfy all three?
Correct behavior: Every 1 in the input stream is answered by a 1.If input bit is a 0, answer with a 0, unless the last two output bitswere 0: in this case output a 1.
Reactive Synthesis (2017/18) 4
Example: A Specification
Consider a very simple system with a singlebit of input and a single bit of output.
Our specification is the conjunction of thefollowing three requirements:
1. Whenever the input bit is 1, then the output bit is 1, too.
2. At least one out of every three consecutive output bits is a 1.
3. If there are infinitely many 0’s in the input stream, then thereare infinitely many 0’s in the output stream.
First two requirements can be satisfied by always outputting a 1,but not the third.
How to satisfy all three?
Correct behavior: Every 1 in the input stream is answered by a 1.If input bit is a 0, answer with a 0, unless the last two output bitswere 0: in this case output a 1.
Reactive Synthesis (2017/18) 4
Example: Verification of a Transition System
Correct behavior is implemented by the following system, wherethe label 1/1 stands for “read input 1 and produce output 1”.
s0 s1 s2
1/1
0/0
1/1
0/0
1/1
0/1
Verification: relatively easy (individual transition labels for firstrequirement, analysis of loops for the other two)
However: if an error is found, designer has to fix the system byhand, and may introduce new errors in the process
Reactive Synthesis (2017/18) 5
Example: Verification of a Transition System
Correct behavior is implemented by the following system, wherethe label 1/1 stands for “read input 1 and produce output 1”.
s0 s1 s2
1/1
0/0
1/1
0/0
1/1
0/1
Verification: relatively easy (individual transition labels for firstrequirement, analysis of loops for the other two)
However: if an error is found, designer has to fix the system byhand, and may introduce new errors in the process
Reactive Synthesis (2017/18) 5
Example: Verification of a Transition System
Correct behavior is implemented by the following system, wherethe label 1/1 stands for “read input 1 and produce output 1”.
s0 s1 s2
1/1
0/0
1/1
0/0
1/1
0/1
Verification: relatively easy (individual transition labels for firstrequirement, analysis of loops for the other two)
However: if an error is found, designer has to fix the system byhand, and may introduce new errors in the process
Reactive Synthesis (2017/18) 5
Reactive Synthesis is a Game
Idea: separate system behavior into choices of the environment(for inputs) and the system (for outputs). Encode requirements asa graph and let the two players play a turn-based infinite game.
A winning condition determines which player wins the game, i.e.,is a condition on infinite paths through the game graph.
A strategy of a player is a function that returns a legal next movefor the given player, based on what happened in the game so far.
A winning strategy is a strategy such that the given player willwin the game, regardless of the moves of their opponent.
Reactive Synthesis (2017/18) 6
Reactive Synthesis is a Game
Idea: separate system behavior into choices of the environment(for inputs) and the system (for outputs). Encode requirements asa graph and let the two players play a turn-based infinite game.
A winning condition determines which player wins the game, i.e.,is a condition on infinite paths through the game graph.
A strategy of a player is a function that returns a legal next movefor the given player, based on what happened in the game so far.
A winning strategy is a strategy such that the given player willwin the game, regardless of the moves of their opponent.
Reactive Synthesis (2017/18) 6
Reactive Synthesis is a Game
Idea: separate system behavior into choices of the environment(for inputs) and the system (for outputs). Encode requirements asa graph and let the two players play a turn-based infinite game.
A winning condition determines which player wins the game, i.e.,is a condition on infinite paths through the game graph.
A strategy of a player is a function that returns a legal next movefor the given player, based on what happened in the game so far.
A winning strategy is a strategy such that the given player willwin the game, regardless of the moves of their opponent.
Reactive Synthesis (2017/18) 6
Reactive Synthesis is a Game
Idea: separate system behavior into choices of the environment(for inputs) and the system (for outputs). Encode requirements asa graph and let the two players play a turn-based infinite game.
A winning condition determines which player wins the game, i.e.,is a condition on infinite paths through the game graph.
A strategy of a player is a function that returns a legal next movefor the given player, based on what happened in the game so far.
A winning strategy is a strategy such that the given player willwin the game, regardless of the moves of their opponent.
Reactive Synthesis (2017/18) 6
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
Example: Reactive Synthesis is a Game
Game graph that models the example specification (solid edges modelpicking a 1, dashed edges picking a 0):
b g b g b
r
Winning condition:
never visit red vertex(properties 1 & 2)
if infinitely many bluevertices are visited, theninf. many green verticesare visited (property 3).
Winning strategy for Player 0:
Never move to red vertex
From blue vertex, move to green ifpossible
Resulting input-output behavior:same as system seen before.
Reactive Synthesis (2017/18) 7
The Buchi-Landweber Theorem
Theorem [BL69]: Every infinite game in a finite graph withω-regular winning condition is determined. Finite-state strategiesare sufficient to win these games, and can be computed effectively.
In particular, this means we can solve Church’s problem:
1. model the specification as
a finite game graph that describes the interactionbetween system and environment, anda winning condition on this graph
2. find a winning strategy for the system player
3. generate a system that implements this strategy
Reactive Synthesis (2017/18) 8
The Buchi-Landweber Theorem
Theorem [BL69]: Every infinite game in a finite graph withω-regular winning condition is determined. Finite-state strategiesare sufficient to win these games, and can be computed effectively.
In particular, this means we can solve Church’s problem:
1. model the specification as
a finite game graph that describes the interactionbetween system and environment, anda winning condition on this graph
2. find a winning strategy for the system player
3. generate a system that implements this strategy
Reactive Synthesis (2017/18) 8
Overview of Course
Basic Games
Algorithms & Data Structures
Project KickoffProject Submission
Advanced Games
Temporal Logic Synthesis
Project Evaluation
Reactive Synthesis (2017/18) 9
Basic Games
Formalization of basic game-theoretic notions: arena (gamegraph), play, winning condition, strategy, winning strategy
Solving reachability and safety games
Properties of basic games: decidability, determinacy, existence ofpositional (memoryless) strategies
Reactive Synthesis (2017/18) 10
Algorithms & Data Structures
Definition of
algorithms to find winning strategies for a given game,
data structures that allow us to symbolically representproperties of the game that are computed in these algorithms,and
optimizations and heuristics that allow us to find winningstrategies more efficiently.
Reactive Synthesis (2017/18) 11
Project
After second block, students will start their project in which theyimplement their own synthesis tool based on the contents of thecourse so far. This should be done in groups of two students.
In January, first an initial version of the implementation will besubmitted and checked for correctness. After that, we willallow a short time period for bug fixes.
Until the end of January, final versions will be run on a largebenchmark set in a competition. Results of the competition willbe announced in the final lecture.
Reactive Synthesis (2017/18) 12
Advanced Games
More expressive winning conditions: Buchi, Co-Buchi, Parity,LTL
Solving such games
Reactive Synthesis (2017/18) 13
Temporal Logic Synthesis
State-of-the-art algorithms for solving LTL Synthesis:Bounded Synthesis
Reactive Synthesis (2017/18) 14
Organization
Tutorials:
Place: Seminar Room 15 in Building E1.3
Time: Tue either 14:15-16:00 or 16:15-18:00
One problem set per week (except for project weeks), to be solvedin groups of two. Handed out during the lecture, collected beforethe next tutorial.
Exams, Grading:
The final grade will be composed of the project grade (1/3) andthe grade from an exam (2/3).
For admission to the exam, students must obtain 50% of theexercises points from the problem sets during the course.
(Dates for exams will be announced soon)
Reactive Synthesis (2017/18) 15
Registration
If you have not done so, please register onhttps://courses.react.uni-saarland.de/rs1718/
Reactive Synthesis (2017/18) 16
Plan for (the Rest of) Today
Basic Games
Arenas, strategies, and gamesReachability and safety games
Algorithms & Data Structures
Advanced Games
Temporal Logic Synthesis
Reactive Synthesis (2017/18) 17
Plan for (the Rest of) Today
Basic Games
Arenas, strategies, and gamesReachability and safety games
Algorithms & Data Structures
Advanced Games
Temporal Logic Synthesis
Reactive Synthesis (2017/18) 17
Arenas
DefinitionAn arena A = (V ,V0,V1,E ) consists of
a finite set V of vertices,
disjoint sets V0,V1 ⊆ V withV = V0 ∪ V1 denoting the vertices ofPlayer 0 and Player 1 respectively, and
a set E ⊆ V × V of (directed) edgeswithout terminal vertices, i.e.,{v ′ ∈ V | (v , v ′) ∈ E} is non-emptyfor every v ∈ V .
v4
v1
v3 v5
v7
v0 v2
v6 v8
RemarkThe size of A, denoted by |A|, is defined to be |V |.
Reactive Synthesis (2017/18) 18
Arenas
DefinitionAn arena A = (V ,V0,V1,E ) consists of
a finite set V of vertices,
disjoint sets V0,V1 ⊆ V withV = V0 ∪ V1 denoting the vertices ofPlayer 0 and Player 1 respectively, and
a set E ⊆ V × V of (directed) edgeswithout terminal vertices, i.e.,{v ′ ∈ V | (v , v ′) ∈ E} is non-emptyfor every v ∈ V .
v4
v1
v3 v5
v7
v0 v2
v6 v8
RemarkThe size of A, denoted by |A|, is defined to be |V |.
Reactive Synthesis (2017/18) 18
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3
v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3
v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4
v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8
v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5
v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7
v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7 v6
· · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Plays
To start a play, a token is placed atsome initial vertex ρ0.
Assume the token is at some vertex ρnwith ρn ∈ Vi . Then, Player i movesthe token to a successor ρn+1 of ρn.
As the arena has no terminal vertices,the players can always make a move.
Hence, the outcome is an infinitesequence of vertices.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Example
v3 v4 v8 v5 v7 v6 · · ·
DefinitionA play in A is an infinite sequence ρ = ρ0ρ1ρ2 · · · ∈ V ω such that(ρn, ρn+1) ∈ E for every n ∈ N.
Reactive Synthesis (2017/18) 19
Strategies
DefinitionA strategy for Player i ∈ {0, 1} in an arena (V ,V0,V1,E ) is afunction σ : V ∗Vi → V such that σ(wv) = v ′ implies (v , v ′) ∈ Efor every w ∈ V ∗ and every v ∈ Vi .
A play ρ0ρ1ρ2 · · · is consistent with σ if ρn+1 = σ(ρ0 · · · ρn) forevery n ∈ N with ρn ∈ Vi .
Example
Consider the following strategy:
σ(wv1) = v0
σ(wv3) = v6
σ(wv7) = v6
σ(wv8) = v5
v0v1v0v1v0v3(v6v7)ω is consistent with σ.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Reactive Synthesis (2017/18) 20
Strategies
DefinitionA strategy for Player i ∈ {0, 1} in an arena (V ,V0,V1,E ) is afunction σ : V ∗Vi → V such that σ(wv) = v ′ implies (v , v ′) ∈ Efor every w ∈ V ∗ and every v ∈ Vi .
A play ρ0ρ1ρ2 · · · is consistent with σ if ρn+1 = σ(ρ0 · · · ρn) forevery n ∈ N with ρn ∈ Vi .
Example
Consider the following strategy:
σ(wv1) = v0
σ(wv3) = v6
σ(wv7) = v6
σ(wv8) = v5
v0v1v0v1v0v3(v6v7)ω is consistent with σ.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Reactive Synthesis (2017/18) 20
Strategies
DefinitionA strategy for Player i ∈ {0, 1} in an arena (V ,V0,V1,E ) is afunction σ : V ∗Vi → V such that σ(wv) = v ′ implies (v , v ′) ∈ Efor every w ∈ V ∗ and every v ∈ Vi .
A play ρ0ρ1ρ2 · · · is consistent with σ if ρn+1 = σ(ρ0 · · · ρn) forevery n ∈ N with ρn ∈ Vi .
Example
Consider the following strategy:
σ(wv1) = v0
σ(wv3) = v6
σ(wv7) = v6
σ(wv8) = v5
v0v1v0v1v0v3(v6v7)ω is consistent with σ.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Reactive Synthesis (2017/18) 20
Games
DefinitionA game G = (A,Win) consists of an arena A with vertex set Vand a winning condition Win ⊆ V ω.
Player 0 wins a play ρ if ρ ∈Win; otherwise, Player 1 wins ρ.
DefinitionA strategy σ for Player i is a winning strategy for G from avertex v if every play that is consistent with σ and starts in v iswinning for Player i .
Reactive Synthesis (2017/18) 21
Games
DefinitionA game G = (A,Win) consists of an arena A with vertex set Vand a winning condition Win ⊆ V ω.
Player 0 wins a play ρ if ρ ∈Win; otherwise, Player 1 wins ρ.
DefinitionA strategy σ for Player i is a winning strategy for G from avertex v if every play that is consistent with σ and starts in v iswinning for Player i .
Reactive Synthesis (2017/18) 21
An Example
v4
v1
v3 v5
v7
v0 v2
v6 v8
Win = {ρ0ρ1ρ2 · · · ∈ V ω | ∃v ∈ V such that ρn 6= v for all n}
A winning strategy for Player 0 from every vertex:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
Reactive Synthesis (2017/18) 22
An Example
v4
v1
v3 v5
v7
v0 v2
v6 v8
Win = {ρ0ρ1ρ2 · · · ∈ V ω | ∃v ∈ V such that ρn 6= v for all n}
A winning strategy for Player 0 from every vertex:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
Reactive Synthesis (2017/18) 22
An Example
v4
v1
v3 v5
v7
v0 v2
v6 v8
Win = {ρ0ρ1ρ2 · · · ∈ V ω | ∃v ∈ V such that ρn 6= v for all n}
A winning strategy for Player 0 from every vertex:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
Reactive Synthesis (2017/18) 22
Determinacy
NotationWi (G) = {v ∈ V | Player i has winning strategy for G from v}:the winning region of Player i in G.
LemmaWe have W0(G) ∩W1(G) = ∅ for every game G.
Proof.On the blackboard.
DefinitionA game G with vertex set V is determined if W0(G) ∪W1(G) = V .
Reactive Synthesis (2017/18) 23
Determinacy
NotationWi (G) = {v ∈ V | Player i has winning strategy for G from v}:the winning region of Player i in G.
LemmaWe have W0(G) ∩W1(G) = ∅ for every game G.
Proof.On the blackboard.
DefinitionA game G with vertex set V is determined if W0(G) ∪W1(G) = V .
Reactive Synthesis (2017/18) 23
Determinacy
NotationWi (G) = {v ∈ V | Player i has winning strategy for G from v}:the winning region of Player i in G.
LemmaWe have W0(G) ∩W1(G) = ∅ for every game G.
Proof.On the blackboard.
DefinitionA game G with vertex set V is determined if W0(G) ∪W1(G) = V .
Reactive Synthesis (2017/18) 23
Algorithmic Problems
Solving a gameGiven (a finite representation of) a game G = (A,Win), determinethe winning regions Wi (G) and (finite representations of) corres-ponding winning strategies.
Questions
1. How do we represent Win finitely?
2. How do we represent (winning) strategies finitely?
Reactive Synthesis (2017/18) 24
Algorithmic Problems
Solving a gameGiven (a finite representation of) a game G = (A,Win), determinethe winning regions Wi (G) and (finite representations of) corres-ponding winning strategies.
Questions
1. How do we represent Win finitely?
2. How do we represent (winning) strategies finitely?
Reactive Synthesis (2017/18) 24
Positional Strategies
A strategy σ : V ∗Vi → V is an infinite object.
Often strategies are finitely representable.
Recall the last example:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
The output σ(wv) only depends on the input’s last vertex v .
DefinitionA strategy σ for Player i is positional (or memoryless) ifσ(wv) = σ(v) for all w ∈ V ∗ and all v ∈ Vi .
NotationWe write σ : Vi → V instead of σ : V ∗Vi → V , if σ is positional.
Reactive Synthesis (2017/18) 25
Positional Strategies
A strategy σ : V ∗Vi → V is an infinite object.
Often strategies are finitely representable.
Recall the last example:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
The output σ(wv) only depends on the input’s last vertex v .
DefinitionA strategy σ for Player i is positional (or memoryless) ifσ(wv) = σ(v) for all w ∈ V ∗ and all v ∈ Vi .
NotationWe write σ : Vi → V instead of σ : V ∗Vi → V , if σ is positional.
Reactive Synthesis (2017/18) 25
Positional Strategies
A strategy σ : V ∗Vi → V is an infinite object.
Often strategies are finitely representable.
Recall the last example:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
The output σ(wv) only depends on the input’s last vertex v .
DefinitionA strategy σ for Player i is positional (or memoryless) ifσ(wv) = σ(v) for all w ∈ V ∗ and all v ∈ Vi .
NotationWe write σ : Vi → V instead of σ : V ∗Vi → V , if σ is positional.
Reactive Synthesis (2017/18) 25
Positional Strategies
A strategy σ : V ∗Vi → V is an infinite object.
Often strategies are finitely representable.
Recall the last example:
σ(wv1) = v0
σ(wv3) = v4
σ(wv7) = v8
σ(wv8) = v5
The output σ(wv) only depends on the input’s last vertex v .
DefinitionA strategy σ for Player i is positional (or memoryless) ifσ(wv) = σ(v) for all w ∈ V ∗ and all v ∈ Vi .
NotationWe write σ : Vi → V instead of σ : V ∗Vi → V , if σ is positional.
Reactive Synthesis (2017/18) 25
Winning Conditions
Typically, winning conditions Win are obtained from acceptanceconditions for ω-automata or from specification logics, whichspecify Win by finite objects (sets of vertices, labelings of vertices,formulas, etc.)
Automata theoretic conditions:
Reachability and SafetyBuchi and co-BuchiParityRabin, Streett, and Muller
Specification Logics:
Linear Temporal Logic (LTL)several industrial logics based on LTL
Reactive Synthesis (2017/18) 26
Winning Conditions
Typically, winning conditions Win are obtained from acceptanceconditions for ω-automata or from specification logics, whichspecify Win by finite objects (sets of vertices, labelings of vertices,formulas, etc.)
Automata theoretic conditions:
Reachability and SafetyBuchi and co-BuchiParityRabin, Streett, and Muller
Specification Logics:
Linear Temporal Logic (LTL)several industrial logics based on LTL
Reactive Synthesis (2017/18) 26
Winning Conditions
Typically, winning conditions Win are obtained from acceptanceconditions for ω-automata or from specification logics, whichspecify Win by finite objects (sets of vertices, labelings of vertices,formulas, etc.)
Automata theoretic conditions:
Reachability and SafetyBuchi and co-BuchiParityRabin, Streett, and Muller
Specification Logics:
Linear Temporal Logic (LTL)several industrial logics based on LTL
Reactive Synthesis (2017/18) 26
Safety Games
A foundational winning condition: staying safe.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Player 0 wins a play, if only safe vertices (marked by double line)are visited.
Reactive Synthesis (2017/18) 27
Safety Games
A foundational winning condition: staying safe.
v4
v1
v3 v5
v7
v0 v2
v6 v8
v4
v1
v3 v5
v7
v0 v2
v6 v8
Player 0 wins a play, if only safe vertices (marked by double line)are visited.
Reactive Synthesis (2017/18) 27
Safety Games
NotationOcc(ρ) := {v ∈ V | ρn = v for some n}: the set of verticesoccurring in ρ.
DefinitionLet A = (V ,V0,V1,E ) be an arena and let S ⊆ V be a subset ofA’s vertices. Then, the safety condition Safety(S) is defined as
Safety(S) := {ρ ∈ V ω | Occ(ρ) ⊆ S}.
We call a game G = (A,Safety(S)) a safety game.
Reactive Synthesis (2017/18) 28
Reachability Games
Another foundational winning condition: reaching a goal.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Player 0 wins a play, if at least one goal vertex (marked by doubleline) is visited.
Reactive Synthesis (2017/18) 29
Reachability Games
Another foundational winning condition: reaching a goal.
v4
v1
v3 v5
v7
v0 v2
v6 v8
Player 0 wins a play, if at least one goal vertex (marked by doubleline) is visited.
Reactive Synthesis (2017/18) 29
Reachability Games
DefinitionLet A = (V ,V0,V1,E ) be an arena and let R ⊆ V be a subset ofA’s vertices. Then, the reachability condition Reach(R) isdefined as
Reach(R) := {ρ ∈ V ω | Occ(ρ) ∩ R 6= ∅}.
We call a game G = (A,Reach(R)) a reachability game.
Reactive Synthesis (2017/18) 30
top related