Learning-based Synthesis of Safety Controllers Oliver Markgraf 1,2 Daniel Neider 1 1 Max Planck Institute for Software Systems 2 Technical University of Kaiserslautern FMCAD 2019, San Jose, California, USA 24 October 2019
Motivation Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 2
Synthesis of Reactive Controllers Specification + Environment Infinite duration, two-player game over a graph Strategy / Controller Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 2
Safety Games Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E ◮ Initial vertices I Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E ◮ Initial vertices I ◮ Safe vertices F := Player 0 := Player 1 := Initial := Safe Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E ◮ Initial vertices I ◮ Safe vertices F := Player 0 := Player 1 := Initial := Safe Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E ◮ Initial vertices I ◮ Safe vertices F := Player 0 := Player 1 := Initial := Safe Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E ◮ Initial vertices I ◮ Safe vertices F := Player 0 := Player 1 := Initial := Safe Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Vertices of Player 0 V 0 , vertices of Player 1 V 1 ◮ Edges E ◮ Initial vertices I ◮ Safe vertices F := Player 0 := Player 1 := Initial := Safe Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Successively remove vertices from which a stay inside the safe vertices cannot be enforced := Player 0 := Player 1 := Initial := Safe := Winning region Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Successively remove vertices from which a stay inside the safe vertices cannot be enforced := Player 0 := Player 1 := Initial := Safe := Winning region Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Successively remove vertices from which a stay inside the safe vertices cannot be enforced := Player 0 := Player 1 := Initial := Safe := Winning region Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Successively remove vertices from which a stay inside the safe vertices cannot be enforced := Player 0 := Player 1 := Initial := Safe := Winning region Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Safety Games ◮ Successively remove vertices from which a stay inside the safe vertices cannot be enforced ◮ Winning strategy for Player 0, winning strategy for Player 1 := Player 0 := Player 1 := Initial := Safe := Winning region Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3
Motivation Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 4
Outline 1. Example encoding of a safety game over Linear Real Arithmetic 2. Solving Safety Games via Learning 3. Evaluation Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 5
1. Example encoding of a safety game over Linear Real Arithmetic
Safety Games Definition A safety game is a five-tuple G = ( V 0 , V 1 , E , I , F ) consisting of ◮ a set V 0 encoding the vertices of Player 0 ◮ a set V 1 encoding the vertices of Player 1 ◮ a set I encoding the initial vertices ◮ a set F encoding the safe vertices ◮ a relation E ⊆ V × V encoding the edges Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 6
Safety Games Definition A safety game is a five-tuple G = ( V 0 , V 1 , E , I , F ) consisting of ◮ a set V 0 encoding the vertices of Player 0 ◮ a set V 1 encoding the vertices of Player 1 ◮ a set I encoding the initial vertices ◮ a set F encoding the safe vertices ◮ a relation E ⊆ V × V encoding the edges Assumption Each vertex has only a finite number of successors Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 6
Safety Games Over Infinite Game Graphs – Example Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7
Safety Games Over Infinite Game Graphs – Example Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7
Safety Games Over Infinite Game Graphs – Example . . . 0 1 2 3 4 5 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7
Safety Games Over Infinite Game Graphs – Example . . . 0 1 2 3 4 5 . . . . . . 0 . 27 1 . 27 2 . 27 3 . 27 4 . 27 . . . Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7
Safety Games Over Infinite Game Graphs – Example . . . . . . 0 . 27 1 . 27 2 . 27 3 . 27 4 . 27 . . . Let x ∈ R be the position of the robot and p ∈ { 0 , 1 } indicate which player is in control of the robot φ V 0 ( x , p ) := p = 0 φ V 1 ( x , p ) := p = 1 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 8
Safety Games Over Infinite Game Graphs – Example . . . . . . 0 . 27 1 . 27 2 . 27 3 . 27 4 . 27 . . . φ I ( x , p ) := x ≥ 3 ∧ x < 4 ∧ p = 0 φ F ( x , p ) := x ≥ 2 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 8
Safety Games Over Infinite Game Graphs – Example . . . . . . 0 . 27 1 . 27 2 . 27 3 . 27 4 . 27 . . . Model robot movements φ Move _ Right ( x , p , x ′ , p ′ ) := x ′ = x + 1 ∧ p = 1 − p ′ φ Move _ Left ( x , p , x ′ , p ′ ) := x ′ = x − 1 ∧ p = 1 − p ′ Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 8
Safety Games Over Infinite Game Graphs – Example . . . . . . 0 . 27 1 . 27 2 . 27 3 . 27 4 . 27 . . . Model the edge relation E φ E ( x , p , x ′ , p ′ ) := φ Move _ Right ∨ φ Move _ Left Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 8
Safety Games Over Infinite Game Graphs – Example . . . . . . 0 . 27 1 . 27 2 . 27 3 . 27 4 . 27 . . . Winning set W W = x ≥ 3 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 8
Winning Sets F I Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 9
Winning Sets W F I Winning Set A W of vertices is a winning set if is satisfies ◮ I ⊆ W ◮ W ⊆ F ◮ E ( { v } ) ∩ W � = ∅ for all v ∈ W ∩ V 0 ( existential closedness ) ◮ E ( { v } ) ⊆ W for all v ∈ W ∩ V 1 ( universal closedness ). Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 9
2. Solving Safety Games via Learning
Counterexample-Guided Inductive Synthesis Hypothesis H ⊆ V Learner Teacher Counterexample Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 10
Counterexample-Guided Inductive Synthesis Hypothesis H ⊆ V Learner Teacher Counterexample Teacher ◮ implementation based on SMT-solver Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 10
Winning Sets W F I Winning Set A W of vertices is a winning set if is satisfies ◮ I ⊆ W ◮ W ⊆ F ◮ E ( { v } ) ∩ W � = ∅ for all v ∈ W ∩ V 0 ( existential closedness ) ◮ E ( { v } ) ⊆ W for all v ∈ W ∩ V 1 ( universal closedness ). Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 11
Teacher F I Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 12
Teacher F I v Counterexample Let H be the Hypothesis ◮ Positive counterexample: v ∈ I \ H Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 12
Teacher F v I Counterexample Let H be the Hypothesis ◮ Positive counterexample: v ∈ I \ H ◮ Negative counterexample: v ∈ H \ F Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 12
Recommend
More recommend