keymaera x theorem proving for hybrid systems
play

KeYmaera X: Theorem Proving for Hybrid Systems Nathan Fulton - PowerPoint PPT Presentation

KeYmaera X: Theorem Proving for Hybrid Systems Nathan Fulton Carnegie Mellon University May 6, 2016 1 Milieu Safety-critical control software is pervasive and increasingly complicated. 2 Milieu Safety-critical control software is


  1. KeYmaera X: Theorem Proving for Hybrid Systems Nathan Fulton Carnegie Mellon University May 6, 2016 1

  2. Milieu Safety-critical control software is pervasive and increasingly complicated. 2

  3. Milieu Safety-critical control software is pervasive and increasingly complicated. 2

  4. KeYmaera X Small Core Increases trust, enables experimentation System LOC KeYmaera X 1 682 Isabelle/Pure 8 113 Coq 20 000 dReal 50 000 SpaceEx 100 000 3

  5. KeYmaera X Small Core Increases trust, enables experimentation System LOC KeYmaera X 1 682 Isabelle/Pure 8 113 Coq 20 000 dReal 50 000 SpaceEx 100 000 Tactics Maintainable and readable proof automation 3

  6. KeYmaera X Small Core Increases trust, enables experimentation System LOC KeYmaera X 1 682 Isabelle/Pure 8 113 Coq 20 000 dReal 50 000 SpaceEx 100 000 Tactics Maintainable and readable proof automation GUI A point-and-prove interface for interacting with deeply nested formulas 3

  7. Hybrid Programs Assign x := θ Sequence α ; β Iteration α ∗ Choice α ∪ β Test ? ϕ ODEs { x ′ 1 = θ 1 , . . . , x ′ n = θ n & P } 4

  8. A Hybrid System Specification vel ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ acc := A ∪ acc := − B } ; { pos ′ = vel , vel ′ = acc & vel ≥ 0 }} ∗ ] vel ≥ 0 5

  9. A Hybrid System Specification vel ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ acc := A ∪ acc := − B } ; { pos ′ = vel , vel ′ = acc & vel ≥ 0 }} ∗ ] vel ≥ 0 5

  10. Core: Uniform Substitution UniformSubstitution φ σ ( φ ) Where σ performs admissible substitutions on functions, predicates, and program constants. 6

  11. Core: Axioms Axiom "K�modal�modus�ponens". [a;](p(?)->q(?)) -> (([a;]p(?)) -> ([a;]q(?))) End. Axiom "DC�differential �cut". ([c&H(?);]p(?) <-> [c&(H(?)&r(?));]p(?)) <- [c&H(?);]r(? End. Axiom "[++]�choice". [a ++ b]p(?) <-> ([a;]p(?) & [b;]p(?)). End. 7

  12. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 8

  13. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: 1. Propositional Reasoning 8

  14. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: 1. Propositional Reasoning 2. Identify System Loop Invariant 8

  15. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: 1. Propositional Reasoning 2. Identify System Loop Invariant 3. Symbolically Execute Control Program 8

  16. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: 1. Propositional Reasoning 2. Identify System Loop Invariant 3. Symbolically Execute Control Program 4. Solve ODE or identify Differential Invariant(s) 8

  17. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: 1. Propositional Reasoning 2. Identify System Loop Invariant 3. Symbolically Execute Control Program 4. Solve ODE or identify Differential Invariant(s) 5. Appeal to Decision Procedure for Real Arithmetic 8

  18. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: 1. Propositional Reasoning 2. Identify System Loop Invariant 3. Symbolically Execute Control Program 4. Solve ODE or identify Differential Invariant(s) 5. Appeal to Decision Procedure for Real Arithmetic 9

  19. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: ImplyR & 2. Identify System Loop Invariant 3. Symbolically Execute Control Program 4. Solve ODE or identify Differential Invariant(s) 5. Appeal to Decision Procedure for Real Arithmetic 9

  20. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: ImplyR & Loop(" v ≥ 0 ")<(QE,QE, 3. Symbolically Execute Control Program 4. Solve ODE or identify Differential Invariant(s) 5. Appeal to Decision Procedure for Real Arithmetic 9

  21. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: ImplyR & Loop(" v ≥ 0 ")<(QE,QE, Seq & Choice & BoxAssign & 4. Solve ODE or identify Differential Invariant(s) 5. Appeal to Decision Procedure for Real Arithmetic 9

  22. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: ImplyR & Loop(" v ≥ 0 ")<(QE,QE, Seq & Choice & BoxAssign & DiffInv(" v ≥ 0 ") & 5. Appeal to Decision Procedure for Real Arithmetic 9

  23. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: ImplyR & Loop(" v ≥ 0 ")<(QE,QE, Seq & Choice & BoxAssign & DiffInv(" v ≥ 0 ") & Arithmetic & Close ) 9

  24. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: ⇐ Prop & Loop(" v ≥ 0 ")<(QE,QE, ⇐ SymbolicExecution & DiffInv(" v ≥ 0 ") & Arithmetic & Close ) 9

  25. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: Prop & Loop(" v ≥ 0 ")<(QE,QE, SymbolicExecution & ⇐ DiffInv(DIGen) & Arithmetic & Close ) 9

  26. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: Prop & ⇐ Loop(LoopInvGen)<(QE,QE & SymbolicExecution & DiffInv(DIGen) & Arithmetic & Close ) 9

  27. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: Prop & Loop(LoopInvGen)<(QE,QE & SymbolicExecution & DiffInv(DIGen) & ⇐ Arithmetic & Close ) 9

  28. Tactics: Sketching and Searching Theorem v ≥ 0 ∧ A > 0 ∧ B > 0 → [ {{ a := A ∪ a := − B } ; { x ′ = v , v ′ = a & v ≥ 0 }} ∗ ] v ≥ 0 A Prototypical Proof Outline for a ϕ → [ { ctrl; plant } ∗ ] ψ Model: Prop & Loop(LoopInvGen) <(QE,QE & SymbolicExecution & DiffInv(DIGen) & Arithmetic & Close ) 9

  29. Applications and Uses ◮ Education: Foundations of CPS Course at CMU ◮ ACAS X ◮ ModelPlex 10

  30. Challenge 1: Steep learning curve ◮ Commonplace mathematical objects are not primitives e , π , sin ( x ), cos ( x ), . . . 11

  31. Challenge 1: Steep learning curve ◮ Commonplace mathematical objects are not primitives e , π , sin ( x ), cos ( x ), . . . ◮ Subtle modeling mistakes are easy Vacuous models: [? H ] P , [ x ′ = θ ∧ H ] P , . . . Non-implementable models . . . 11

  32. Challenge 1: Steep learning curve ◮ Commonplace mathematical objects are not primitives e , π , sin ( x ), cos ( x ), . . . ◮ Subtle modeling mistakes are easy Vacuous models: [? H ] P , [ x ′ = θ ∧ H ] P , . . . Non-implementable models . . . ◮ Abrupt transitions as models become more difficult ◮ From automated proving to interactive proving ◮ From web UI to custom tactics 11

  33. Challenge 2: Large Proofs are Difficult and Fragile ACAS X ◮ Existing implementation: MDP ⇒ large lookup table. ◮ Idea: Verify model, compare to outputs. ◮ Possible! But painful. 12

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend