Learning-based Synthesis of Safety Controllers Oliver Markgraf 1,2 - - PowerPoint PPT Presentation

learning based synthesis of safety controllers
SMART_READER_LITE
LIVE PREVIEW

Learning-based Synthesis of Safety Controllers Oliver Markgraf 1,2 - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Learning-based Synthesis of Safety Controllers

Oliver Markgraf 1,2 Daniel Neider 1

1Max Planck Institute for Software Systems 2Technical University of Kaiserslautern

FMCAD 2019, San Jose, California, USA 24 October 2019

slide-2
SLIDE 2

Motivation

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 2

slide-3
SLIDE 3

Synthesis of Reactive Controllers

Specification + Environment Infinite duration, two-player game

  • ver a graph

Strategy / Controller

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 2

slide-4
SLIDE 4

Safety Games

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3

slide-5
SLIDE 5

Safety Games

◮ Vertices of Player 0 V0

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3

slide-6
SLIDE 6

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3

slide-7
SLIDE 7

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ Edges E

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3

slide-8
SLIDE 8

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ Edges E ◮ Initial vertices I

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 3

slide-9
SLIDE 9

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ 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

slide-10
SLIDE 10

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ 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

slide-11
SLIDE 11

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ 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

slide-12
SLIDE 12

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ 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

slide-13
SLIDE 13

Safety Games

◮ Vertices of Player 0 V0, vertices of Player 1 V1 ◮ 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

slide-14
SLIDE 14

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

slide-15
SLIDE 15

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

slide-16
SLIDE 16

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

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

Motivation

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 4

slide-20
SLIDE 20

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

slide-21
SLIDE 21
  • 1. Example encoding of a safety game over Linear

Real Arithmetic

slide-22
SLIDE 22

Safety Games

Definition

A safety game is a five-tuple G = (V0, V1, E, I, F) consisting of

◮ a set V0 encoding the vertices of Player 0 ◮ a set V1 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

slide-23
SLIDE 23

Safety Games

Definition

A safety game is a five-tuple G = (V0, V1, E, I, F) consisting of

◮ a set V0 encoding the vertices of Player 0 ◮ a set V1 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

slide-24
SLIDE 24

Safety Games Over Infinite Game Graphs – Example

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7

slide-25
SLIDE 25

Safety Games Over Infinite Game Graphs – Example

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7

slide-26
SLIDE 26

Safety Games Over Infinite Game Graphs – Example

1 2 3 4 5 . . .

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 7

slide-27
SLIDE 27

Safety Games Over Infinite Game Graphs – Example

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

slide-28
SLIDE 28

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 φV0(x, p) := p = 0 φV1(x, p) := p = 1

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 8

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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

slide-31
SLIDE 31

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

slide-32
SLIDE 32

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

slide-33
SLIDE 33

Winning Sets

F I

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 9

slide-34
SLIDE 34

Winning Sets

F W 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 ∩ V0 (existential closedness) ◮ E({v}) ⊆ W for all v ∈ W ∩ V1 (universal closedness).

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 9

slide-35
SLIDE 35
  • 2. Solving Safety Games via Learning
slide-36
SLIDE 36

Counterexample-Guided Inductive Synthesis Learner Teacher

Hypothesis H ⊆ V Counterexample

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 10

slide-37
SLIDE 37

Counterexample-Guided Inductive Synthesis Learner Teacher

Hypothesis H ⊆ V Counterexample

Teacher

◮ implementation based on SMT-solver

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 10

slide-38
SLIDE 38

Winning Sets

F W 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 ∩ V0 (existential closedness) ◮ E({v}) ⊆ W for all v ∈ W ∩ V1 (universal closedness).

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 11

slide-39
SLIDE 39

Teacher

F I

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 12

slide-40
SLIDE 40

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

slide-41
SLIDE 41

Teacher

F I

v

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

slide-42
SLIDE 42

Teacher

F I

v

Counterexample

Let H be the Hypothesis

◮ Positive counterexample: v ∈ I \ H ◮ Negative counterexample: v ∈ H \ F ◮ Existential counterexample: v ∈ H ∩ V0 with E({v}) ∩ H = ∅,

v → (v1 ∨ . . . ∨ vn) with {v1, . . . , vn} = E({v}).

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 12

slide-43
SLIDE 43

Teacher

F I

v

Counterexample

Let H be the Hypothesis

◮ Positive counterexample: v ∈ I \ H ◮ Negative counterexample: v ∈ H \ F ◮ Existential counterexample: v ∈ H ∩ V0 with E({v}) ∩ H = ∅,

v → (v1 ∨ . . . ∨ vn) with {v1, . . . , vn} = E({v}).

◮ Universal counterexample:v ∈ H ∩ V1 with E({v}) ⊆ H,

v → (v1 ∧ . . . ∧ vn) with {v1, . . . , vn} = E({v}).

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 12

slide-44
SLIDE 44

Teacher - Example

. . . . . . . . . 0.27 1.27 2.27 3.27 4.27

Counterexample

Let H = x ≥ 1 be the Hypothesis

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 13

slide-45
SLIDE 45

Teacher - Example

. . . . . . . . . 0.27 1.27 2.27 3.27 4.27

Counterexample

Let H = x ≥ 1 be the Hypothesis

◮ Negative counterexample: 1.27 ∈ H \ F

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 13

slide-46
SLIDE 46

Teacher - Example

. . . . . . . . . 0.27 1.27 2.27 3.27 4.27

Counterexample

Let H = x ≥ 2 be the Hypothesis

◮ Universal counterexample: 2.27 ∈ H ∩ V1 ◮ E({2.27}) = {1.27, 3.27} ⊆ H

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 13

slide-47
SLIDE 47

Teacher - Example

. . . . . . . . . 0.27 1.27 2.27 3.27 4.27

Winning set as decision tree

The winning set is W = x ≥ 3 x ≥ 3 1

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 13

slide-48
SLIDE 48

Counterexample-Guided Inductive Synthesis Learner Teacher

Hypothesis H ⊆ V Counterexample

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 14

slide-49
SLIDE 49

Counterexample-Guided Inductive Synthesis Learner Teacher

Hypothesis H ⊆ V Counterexample

Learner

◮ Horn ICE learner from software verification [1]

[1] P. Ezudheen, D. Neider, D. D’Souza, P. Garg, P. Madhusudan: Horn-ICE learning for synthesizing invariants and contracts. Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 14

slide-50
SLIDE 50

Counterexample-Guided Inductive Synthesis Learner Teacher

Hypothesis H ⊆ V Counterexample

Horn constraints

◮ d1 ∧ . . . ∧ dn → d ◮ d1 ∧ . . . ∧ dn → false ◮ true → d

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 14

slide-51
SLIDE 51

Consistent Learners

The learners maintain a game sample SG = (Pos, Neg, Ex, Un) to store counterexamples

Learning Task

Given a game sample SG, construct a set H that is consistent with SG:

  • 1. Pos ⊆ H
  • 2. Neg ∩ H = ∅
  • 3. v ∈ H implies {v1, . . . , vn} ∩ H = ∅ for each

v → (v1 ∨ . . . ∨ vn) ∈ Ex

  • 4. v ∈ H implies {v1, . . . , vn} ⊆ H for each

v → (v1 ∧ . . . ∧ vn) ∈ Un.

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 15

slide-52
SLIDE 52

Horn ICE Learner

Game sample SG Horn sample SH Decision tree tG Decision tree tH Sample Transformation Horn ICE Learner Tree Transformation

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 16

slide-53
SLIDE 53

Horn ICE Learner

Sample Transformation

Game sample Horn sample d ∈ Pos d → false d ∈ Neg true → d d → (d1 ∨ . . . ∨ dn) (d1 ∧ . . . ∧ dn) → d d → (d1 ∧ . . . ∧ dn) d1 → d, . . . , dn → d

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 16

slide-54
SLIDE 54

Horn ICE Learner

Game sample SG Horn sample SH Decision tree tG Decision tree tH Sample Transformation Horn ICE Learner Tree Transformation

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 16

slide-55
SLIDE 55

Horn ICE Learner

◮ d → (d1 ∨ · · · ∨ dn) ∈ Ex ◮ . . . ◮ (d1 ∧ · · · ∧ dn) → d ∈ SH ◮ . . .

Decision tree tG Tree Transformation y < 2 1 x ≥ 0 1 Horn ICE Learner

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 16

slide-56
SLIDE 56

Horn ICE Learner

Lemma

Let SG be a game sample and P a finite set of predicates, both over the domain D. Moreover, let SH be a Horn sample, tH the decision tree over the Horn sample, and tG be the decision tree over the game

  • sample. Then, D(tH) is consistent with SH if and only if D(tG) is

consistent with SG.

Decision tree definitions

  • 1. D(t) = {d ∈ D | t(d) = 1}
  • 2. D(tG) = D \ D(th)

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 16

slide-57
SLIDE 57

Horn ICE Learner

◮ d → (d1 ∨ · · · ∨ dn) ∈ Ex ◮ . . . ◮ (d1 ∧ · · · ∧ dn) → d ∈ SH ◮ . . .

y < 2 1 x ≥ 0 1 Horn ICE Learner y < 2 x ≥ 0 1 Map 0 → 1; 1 → 0

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 16

slide-58
SLIDE 58

Horn Learner - Transform decision tree

Example

◮ Given R2 = D and d = (x, y) = (−1, 2) ◮ Assume d ∈ Pos and d → false ∈ SH

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 17

slide-59
SLIDE 59

Horn Learner - Transform decision tree

Example

◮ Given R2 = D and d = (x, y) = (−1, 2) ◮ Assume d ∈ Pos and d → false ∈ SH

tH : y < 2 x ≥ 0 1 tG : y < 2 1 x ≥ 0 1

Transform tree

Evaluation of d

◮ tH(d) = 0

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 17

slide-60
SLIDE 60

Horn Learner - Transform decision tree

Example

◮ Given R2 = D and d = (x, y) = (−1, 2) ◮ Assume d ∈ Pos and d → false ∈ SH

tH : y < 2 x ≥ 0 1 tG : y < 2 1 x ≥ 0 1

Transform tree

Evaluation of d

◮ tH(d) = 0 ◮ tG(d) = 1

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 17

slide-61
SLIDE 61

DT-Synth - Correctness and Termination

Theorem

Let G be a safety game. DT-Synth is guaranteed to learn a winning set after a finite number of iterations if there exists one that is expressible as a decision tree over P.[1]

[1] P. Ezudheen, D. Neider, D. D’Souza, P. Garg, P. Madhusudan: Horn-ICE learning for synthesizing invariants and contracts. Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 18

slide-62
SLIDE 62
  • 3. Evaluation
slide-63
SLIDE 63

Evaluation – Games Over Infinite Graphs

D i a g

  • n

a l D i a g

  • n

a l D i a g

  • n

a l D i a g

  • n

a l 5 10 # of games solved

DT-synth SAT-synth[2] RPNI-synth[2] CONSYNTH[3]

Benchmarks

◮ Cinderella game ◮ Program repair games ◮ Robot motion planning games

[2] Daniel Neider, Ufuk Topcu: An Automaton Learning Approach to Solving Safety Games over Infinite Graphs. TACAS 2016 [3] Beyene et al.: A constraint-based approach to solving games on infinite graphs. POPL 2014 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 19

slide-64
SLIDE 64

Evaluation – Games Over Infinite Graphs

D i a g

  • n

a l D i a g

  • n

a l D i a g

  • n

a l D i a g

  • n

a l 5 10 # of games solved

DT-synth SAT-synth[2] RPNI-synth[2] CONSYNTH[3]

D i a g

  • n

a l D i a g

  • n

a l D i a g

  • n

a l D i a g

  • n

a l 200 400 600 800 1,000 total time in s

DT-synth SAT learner

[2] Daniel Neider, Ufuk Topcu: An Automaton Learning Approach to Solving Safety Games over Infinite Graphs. TACAS 2016 [3] Beyene et al.: A constraint-based approach to solving games on infinite graphs. POPL 2014 Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 19

slide-65
SLIDE 65

Evaluation - Comparison to other Tools

Tool Easy to Easy to Guarantees No help model interpret to find a

  • f user

games solution strategy required DT-Synth ✓ ✓ ✓ ✓ CONSYNTH ✓ ✗ ✓ ✗ SAT-Synth ✗ ✗ ✓ ✓ RPNI-Synth ✗ ✗ ✗ ✓

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 20

slide-66
SLIDE 66

Conclusion

We have presented . . .

◮ . . . safety games, a symbolic representation of safety games ◮ . . . how a Horn learner interacts with a teacher for solving safety

games

Future Work

◮ Apply our technique to distributed synthesis

problems and more complex problems

◮ Consider different winning conditions such as

reachability and liveness Many thanks to Anthony W. Lin for the travel support.

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 21

slide-67
SLIDE 67

Safety Games

Definition

A safety game is a five-tuple G = (V0, V1, E, I, F) consisting of

◮ a set V0 encoding the vertices of Player 0 ◮ a set V1 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 22

slide-68
SLIDE 68

Safety Games

Definition

A safety game is a five-tuple G = (V0, V1, E, I, F) consisting of

◮ a set V0 encoding the vertices of Player 0 ◮ a set V1 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 22

slide-69
SLIDE 69

Horn Learner

Idea

Use Horn constraints to learn a hypothesis H

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 23

slide-70
SLIDE 70

Horn Learner

Idea

Use Horn constraints to learn a hypothesis H

Horn constraints

◮ (d1 ∧ . . . ∧ dn) → d ◮ (d1 ∧ . . . ∧ dn) → false ◮ true → d

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 23

slide-71
SLIDE 71

Horn Learner

Idea

Use Horn constraints to learn a hypothesis H

Horn constraints

◮ (d1 ∧ . . . ∧ dn) → d ◮ (d1 ∧ . . . ∧ dn) → false ◮ true → d

What are those di?

◮ abstract Domain D ◮ d ∈ D is called a data point ◮ e.g. (1, 2) ∈ R2

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 23

slide-72
SLIDE 72

Horn Learner - Evaluation of data points

Idea

Hypothesis H is a decision tree t with a valuation t(d) ∈ B

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 24

slide-73
SLIDE 73

Horn Learner - Evaluation of data points

Idea

Hypothesis H is a decision tree t with a valuation t(d) ∈ B

Decision tree

◮ Given R2 = D and d = (x, y) = (−1, 2)

y < 2 1 x ≥ 0 1

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 24

slide-74
SLIDE 74

Horn Learner - Evaluation of data points

Idea

Hypothesis H is a decision tree t with a valuation t(d) ∈ B

Decision tree

◮ Given R2 = D and d = (x, y) = (−1, 2)

y < 2 1 x ≥ 0 1

Evaluation of d

◮ left branch for predicate p if p(d) = true

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 24

slide-75
SLIDE 75

Horn Learner - Evaluation of data points

Idea

Hypothesis H is a decision tree t with a valuation t(d) ∈ B

Decision tree

◮ Given R2 = D and d = (x, y) = (−1, 2)

y < 2 1 x ≥ 0 1

Evaluation of d

◮ right branch for predicate p if p(d) = false

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 24

slide-76
SLIDE 76

Horn Learner - Evaluation of data points

Idea

Hypothesis H is a decision tree t with a valuation t(d) ∈ B

Decision tree

◮ Given R2 = D and d = (x, y) = (−1, 2)

y < 2 1 x ≥ 0 1

Evaluation of d

◮ t(d) ≡ label reached at a leaf ◮ t(d) = true

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 24

slide-77
SLIDE 77

Horn Learner - Translate game sample to Horn sample

◮ A Horn sample SH stores Horn constraints. ◮ A game sample SG stores counterexamples.

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 25

slide-78
SLIDE 78

Horn Learner - Translate game sample to Horn sample

◮ A Horn sample SH stores Horn constraints. ◮ A game sample SG stores counterexamples.

Translation

◮ d ∈ Pos d → false ∈ SH ◮ d ∈ Neg true → d ∈ SH ◮ d → (d1 ∨ . . . ∨ dn) ∈ Ex (d1 ∧ . . . ∧ dn) → d ∈ SH ◮ d → (d1 ∧ . . . ∧ dn) ∈ Un di → d ∈ SH ∀i ∈ {1, . . . , n}

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 25

slide-79
SLIDE 79

Horn Learner - Translate game sample to Horn sample

◮ A Horn sample SH stores Horn constraints. ◮ A game sample SG stores counterexamples.

Translation

◮ d ∈ Pos d → false ∈ SH ◮ d ∈ Neg true → d ∈ SH ◮ d → (d1 ∨ . . . ∨ dn) ∈ Ex (d1 ∧ . . . ∧ dn) → d ∈ SH ◮ d → (d1 ∧ . . . ∧ dn) ∈ Un di → d ∈ SH ∀i ∈ {1, . . . , n}

Decision tree

◮ Learner constructs decision tree based on Horn samples

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 25

slide-80
SLIDE 80

Horn Learner - Translate game sample to Horn sample

◮ A Horn sample SH stores Horn constraints. ◮ A game sample SG stores counterexamples.

Translation

◮ d ∈ Pos d → false ∈ SH ◮ d ∈ Neg true → d ∈ SH ◮ d → (d1 ∨ . . . ∨ dn) ∈ Ex (d1 ∧ . . . ∧ dn) → d ∈ SH ◮ d → (d1 ∧ . . . ∧ dn) ∈ Un di → d ∈ SH ∀i ∈ {1, . . . , n}

Decision tree

◮ Learner constructs decision tree based on Horn samples ◮ Transform decision tree to use Game samples

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 25

slide-81
SLIDE 81

Horn Learner - Transform decision tree

Translation

◮ d ∈ Pos d → false ∈ SH ◮ d ∈ Neg true → d ∈ SH ◮ d → (d1 ∨ . . . ∨ dn) ∈ Ex (d1 ∧ . . . ∧ dn) → d ∈ SH ◮ d → (d1 ∧ . . . ∧ dn) ∈ Un di → d ∈ SH ∀i ∈ {1, . . . , n}

Decision Tree transformation

y < 2 1 x ≥ 0 1 y < 2 x ≥ 0 1

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 26

slide-82
SLIDE 82

Evaluation – Games Over Infinite Graphs

C i n d e r e l l a ( c = 2 ) C i n d e r e l l a ( c = 3 ) P r

  • g

r a m

  • r

e p a i r R e p a i r

  • c

r i t i c a l S y n t h

  • S

y n c h r

  • n

i z a t i

  • n

0.1 1 10 100 timeout time in s

DT-synth SAT-Synth RPNI-Synth CONSYNTH

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 27

slide-83
SLIDE 83

Evaluation – Games Over Infinite Graphs

B

  • x

B

  • x

L i m i t e d D i a g

  • n

a l E v a s i

  • n

F

  • l

l

  • w

S

  • l

i t a r y B

  • x

S q u a r e 5 x 5 0.1 1 10 100 timeout time in s

DT-synth SAT-Synth RPNI-Synth CONSYNTH

Oliver Markgraf and Daniel Neider: Learning-based Synthesis of Safety Controllers 28