reachability analysis in the keymaera x theorem prover
play

Reachability Analysis in the KeYmaera X Theorem Prover SNR 2017 | - PowerPoint PPT Presentation

Reachability Analysis in the KeYmaera X Theorem Prover SNR 2017 | Uppsala, Sweden | April 22, 2017 Nathan Fulton Other System Contributors: Stefan Mitsch, Andr Platzer, Brandon Bohrer, Yong Kiam Tan, Jan-David Quesel, ... Trustworthy


  1. Reachability Analysis in the KeYmaera X Theorem Prover SNR 2017 | Uppsala, Sweden | April 22, 2017 Nathan Fulton Other System Contributors: Stefan Mitsch, André Platzer, Brandon Bohrer, Yong Kiam Tan, Jan-David Quesel, ...

  2. Trustworthy Foundations Interactive Reachability Analysis Demonstration ➢ Bellerophon language and library ➢ Automation and Tooling Conclusions & Resources

  3. Trustworthy Foundations KeYmaera X enables trustworthy automation for hybrid systems analysis: ● A well defined logical foundations, ● implemented in a small trustworthy core ● that ensures correctness of automation and tooling .

  4. Trustworthy Foundations Hybrid Programs a=a 0 a=t a := t b=b 0 b=b 0 c=c 0 c=c 0 ... ...

  5. Trustworthy Foundations Hybrid Programs a;b a=a 0 a=t a := t a;b b=b 0 b=b 0 c=c 0 c=c 0 a b ... ...

  6. Trustworthy Foundations Hybrid Programs a;b a=a 0 a=t a := t a;b b=b 0 b=b 0 c=c 0 c=c 0 a b ... ... If P is true: no change ?P If P is false: terminate

  7. Trustworthy Foundations Hybrid Programs a;b a=a 0 a=t a := t a;b b=b 0 b=b 0 c=c 0 c=c 0 a b ... ... a ∪ b If P is true: no change ?P If P is false: terminate

  8. Trustworthy Foundations Hybrid Programs a;b a=a 0 a=t a := t a;b b=b 0 b=b 0 c=c 0 c=c 0 a b ... ... a ∪ b If P is true: no change ?P If P is false: terminate a* a ...a...

  9. Trustworthy Foundations Hybrid Programs a;b a=a 0 a=t a := t a;b b=b 0 b=b 0 c=c 0 c=c 0 a b ... ... a ∪ b If P is true: no change ?P If P is false: terminate x=F(0) ... x’=f x=x 0 a* ⋮ a ...a... ... x=F(T) ...

  10. Trustworthy Foundations Hello, World { {?Dive ∪ r := r p }; t:=0; {x’ = v, V’ = f(v,g,r), t’=1 v’=f(v,g,r) x & 0≤x & t≤T} }* Control : Continue diving if safe, else open parachute. Plant : Downward velocity determined by gravity, air resistance.

  11. Trustworthy Foundations Hello, World { {?Dive ∪ r := r p }; t:=0; {x’ = v, V’ = f(v,g,r), t’=1 v’=f(v,g,r) x & 0≤x & t≤T} }* Control : Continue diving if safe, else open parachute. Plant : Downward velocity determined by gravity, air resistance.

  12. Trustworthy Foundations Hello, World { {?Dive ∪ r := r p }; t:=0; {x’ = v, V’ = f(v,g,r), t’=1 v’=f(v,g,r) x & 0≤x & t≤T} }* Control : Continue diving if safe, else open parachute. Plant : Downward velocity determined by gravity, air resistance.

  13. Trustworthy Foundations Hello, World { {?Dive ∪ r := r p }; t:=0; {x’ = v, V’ = f(v,g,r), t’=1 v’=f(v,g,r) x & 0≤x & t≤T} }* Control : Continue diving if safe, else open parachute. Plant : Downward velocity determined by gravity, air resistance.

  14. Trustworthy Foundations Hello, World { {?Dive ∪ r := r p }; t:=0; {x’ = v, V’ = f(v,g,r), t’=1 v’=f(v,g,r) x & 0≤x & t≤T } }* Control : Continue diving if safe, else open parachute. Plant : Downward velocity determined by gravity, air resistance.

  15. Trustworthy Foundations Reachability Specifications [a]P “after every execution of a, P” <a>P “after some execution of a, P”

  16. Trustworthy Foundations Reachability Specifications (Dive & g>0 & …)→ [{ {?Dive ∪ r := r p }; {x’ = v, V’ = f(v,g,r) & 0≤x} v’=f(v,g,r) x }*] (x=0→m≤v)

  17. Trustworthy Foundations Reachability Specifications (Dive & g>0 & …)→ [{ {?Dive ∪ r := r p }; {x’ = v, V’ = f(v,g,r) & 0≤x} v’=f(v,g,r) x }*] (x=0→m≤v) If the parachuter is on the ground, their speed is safe (m≤v≤0)

  18. Introduction to Differential Dynamic Logic Dynamical Axioms [x:=t]f(x) ↔ f(t) [a ; b]P ↔ [a][b]P [a ∪ b]P ↔ ([a]P & [b]P) [a*]P ↔ (J → P & J → [b]J) [x’=f&H]P ↔ H →P ...

  19. Introduction to Differential Dynamic Logic Trusted Core AXIOM BASE Q.E.D. KeYmaera X Core [x:=t]f(x) ↔ f(t) [a;b]P ↔ [a][b]P [a ∪ b]P ↔ ([a]P & [b]P) [a*]P↔(J→P & J→[b]J) [x’=f&H]P ↔ H→P ...

  20. Introduction to Differential Dynamic Logic Trustworthy Implementations Automated Control Tooling Analyses Software AXIOM BASE Q.E.D. [x:=t]f(x) ↔ f(t) KeYmaera X Core [a;b]P ↔ [a][b]P [a ∪ b]P ↔ ([a]P & [b]P) [a*]P ↔ (J→P & J→[b]J) [x’=f&H]P ↔ H→P ...

  21. Introduction to Differential Dynamic Logic Prover Core Comparison Tool Trusted LOC (approx.) KeYmaera X 1,682 (out of 100,000+) KeYmaera 65,989 Isabelle/Pure 8,113 Coq 20,000 HSolver 20,000 dReal 50,000 SpaceEx 100,000

  22. Interactive Reachability Analysis in KeYmaera X KeYmaera X enables interactive verification and tool development:

  23. Interactive Reachability Analysis in KeYmaera X KeYmaera X enables interactive verification and tool development: ● A standard library of common proof techniques.

  24. Interactive Reachability Analysis in KeYmaera X KeYmaera X enables interactive verification and tool development: ● A standard library of common proof techniques. ● A combinator language/library for decomposing theorems and composing proof strategies.

  25. Interactive Reachability Analysis in KeYmaera X Bellerophon Tactic Meaning Applies propositional reasoning exhaustively. prop Symbolically executes discrete, loop-free programs. unfold Applies loop invariance axiom to position i. loop(J, i) Reasoning principles for differential equations. dI,dG,dC,dW

  26. Interactive Reachability Analysis in KeYmaera X Bellerophon Tactic Meaning 100+ Applies propositional reasoning exhaustively. prop Symbolically executes discrete, loop-free programs. unfold Applies loop invariance axiom to position i. loop(J, 1) Reasoning principles for differential equations. dI,dG,dC,dW

  27. Interactive Reachability Analysis in KeYmaera X Bellerophon Tactic Meaning 100+ Applies propositional reasoning exhaustively. prop Symbolically executes discrete, loop-free programs. unfold Applies loop invariance axiom to position i. loop(J, i) Reasoning principles for differential equations. dI,dG,dC,dW Combinator Meaning A ; B Execute A on current goal, then execute B on the result. A | B Try executing A on current goal. If A fails, execute B on current goal. A * Run A until it no longer applies. A<( B 0 ,B 1 , … ,B N ) Execute A on current goal to create N subgoals. Run B i on subgoal i.

  28. Interactive Reachability Analysis in KeYmaera X Isolating Interesting Questions (Dive & g>0 & …)→ [{ }*] (x=0→m≤v)

  29. Interactive Reachability Analysis in KeYmaera X Isolating Interesting Questions (Dive & g>0 & Loop invariant holds initially …)→ (Dive & g>0 J & …)→ [{ J →[ Loop invariant is preserved prop ; loop(J,1) ]J J → }*] (x=0→m≤v) Loop invariant implies safety x=0→m≤v

  30. Interactive Reachability Analysis in KeYmaera X Isolating Interesting Questions (Dive & g>0 & Loop invariant holds initially …)→ (Dive & g>0 J & …)→ [{ J →[ Loop invariant is preserved prop ; loop(J,1) ]J J → }*] (x=0→m≤v) Loop invariant implies safety x=0→m≤v

  31. Interactive Reachability Analysis in KeYmaera X Isolating Interesting Questions (Dive & g>0 & …)→ (Dive & g>0 J & …)→ [{ J →[ J & Dive & r=r a → [x’=v,v’=...]J prop ; loop(J,1) u n f o l d J & r=r p → ]J [x’=v,v’=...]J J → }*] (x=0→m≤v) x=0→m≤v

  32. Interactive Reachability Analysis in KeYmaera X Isolating Interesting Questions (Dive & g>0 & …)→ (Dive & g>0 J & …)→ [{ J →[ J & Dive & r=r a → [x’=v,v’=...]J prop ; loop(J,1) u n f o l d J & r=r p → ]J [x’=v,v’=...]J J → }*] (x=0→m≤v) x=0→m≤v

  33. Interactive Reachability Analysis in KeYmaera X Isolating Interesting Questions prop ; loop(J, 1) <( QE, /* Real arith. solver */ QE, Unfold <( … /* parachute open case */ … /* parachute closed case */ ) )

  34. Interactive Reachability Analysis in KeYmaera X Differential Induction J = v > -sqrt(g/pr) > m & … Parachute Open Case: v ≥ v 0 - gt ≥ v 0 - gT > -sqrt(g/pr) v’=rv 2 -g x Inductive invariants

  35. Interactive Reachability Analysis in KeYmaera X Differential Induction DI Axiom: [x’=f&H]P↔(P & (H→[x’:=f]P’))

  36. Interactive Reachability Analysis in KeYmaera X Differential Induction DI Axiom: [x’=f&H]P↔(P & (H→[x’:=f]P’)) Example: [v’=r p v 2 -g,t’=1]v ≥ v 0 - gt

  37. Interactive Reachability Analysis in KeYmaera X Differential Induction DI Axiom: [x’=f&H]P↔(P & (H→[x’:=f]P’)) Example: [v’=r p v 2 -g,t’=1]v ≥ v 0 - gt ↔ … ↔ [v’:=r p v 2 -g][t’:=1]v’ ≥ -g*t’ ↔ r p v 2 -g ≥ -g ↔ r p ≥0

Recommend


More recommend