A Logic of Proofs for Differential Dynamic Logic Toward - - PowerPoint PPT Presentation

a logic of proofs for differential dynamic logic
SMART_READER_LITE
LIVE PREVIEW

A Logic of Proofs for Differential Dynamic Logic Toward - - PowerPoint PPT Presentation

A Logic of Proofs for Differential Dynamic Logic Toward Independently Checkable Proof Certificates for Differential Dynamic Logic Nathan Fulton Andr` e Platzer Carnegie Mellon University CPP16 January 19, 2016 1 Motivation Strong


slide-1
SLIDE 1

A Logic of Proofs for Differential Dynamic Logic

Toward Independently Checkable Proof Certificates for Differential Dynamic Logic Nathan Fulton Andr` e Platzer Carnegie Mellon University CPP’16 January 19, 2016

1

slide-2
SLIDE 2

Motivation

Strong evidence that Cyber-Physical Systems are safe.

2

slide-3
SLIDE 3

Motivation

Strong evidence that Cyber-Physical Systems are safe.

2

slide-4
SLIDE 4

KeYmaera X

3

slide-5
SLIDE 5

Criteria for Evidence of a Successful Verification Effort

  • Hybrid Systems Proofs (via KeYmaera X)

Persistent – truth-preservation is insufficient! Permanent – Tactics are not proofs Portable – Between machines, between logics

4

slide-6
SLIDE 6

Approach

e : φ

5

slide-7
SLIDE 7

Approach

e : φ

Outline:

◮ The Language of Differential Dynamic Logic ◮ Uniform Substitution Calculus of dL ◮ LPdL

5

slide-8
SLIDE 8

Hybrid Programs Model Cyber-Physical Systems

Definition (Hybrid Programs)

Assign x := θ Test ?ϕ Sequence α; β Choice α ∪ β Iteration α∗

6

slide-9
SLIDE 9

Hybrid Programs Model Cyber-Physical Systems

Definition (Hybrid Programs)

Assign x := θ Test ?ϕ Sequence α; β Choice α ∪ β Iteration α∗ ODEs {x′

1 = θ1, . . . , x′ n = θn&ϕ}

6

slide-10
SLIDE 10

dL

Example

[

  • (acc := A ∪ acc := 0)
  • Control

; {pos′ = vel, vel′ = acc}

  • Physical System Model

∗]

7

slide-11
SLIDE 11

dL

FOL over Real Closed Fields + [α]ϕ + αϕ

Example

vel ≥ 0 ∧ A > 0

  • initial condition

→ [

  • (acc := A ∪ acc := 0)
  • ctrl

; {pos′ = vel, vel′ = acc}

  • plant

∗] vel ≥ 0

postcondition

7

slide-12
SLIDE 12

Deduction in Differential Dynamic Logic

v ≥ 0, z < m ⊢ ∀t ≥ 0[z := −b 2t2 + vt + z]z ≤ m v ≥ 0, z < m ⊢ [z′ = v, v′ = −b]z ≤ m

DiffSolve

8

slide-13
SLIDE 13

Uniform Substitution Isolates Binding Structure

DiffSolve as a single axiom: [x′ = f &q(x)]p(x) ↔ ∀t ≥ 0((∀0 ≤ s ≤ tq(x+fs)) → [x := x+ft]p(x)) Sound uniform substitutions are used in deductions:

ϕ σ(ϕ)

US

9

slide-14
SLIDE 14

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

10

slide-15
SLIDE 15

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

10

slide-16
SLIDE 16

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

[a ∪ b]p(?) ↔ [a]p(?) ∧ [b]p(?) Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

σ = a x := 4 b x := 5 p(?) x > 3

10

slide-17
SLIDE 17

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

[a ∪ b]p(?) ↔ [a]p(?) ∧ [b]p(?) ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

σ = a x := 4 b x := 5 p(?) x > 3

10

slide-18
SLIDE 18

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

[a ∪ b]p(?) ↔ [a]p(?) ∧ [b]p(?) ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 ⊢ ψ Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

σ = a x := 4 b x := 5 p(?) x > 3

10

slide-19
SLIDE 19

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

[a ∪ b]p(?) ↔ [a]p(?) ∧ [b]p(?) ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, · · · ⊢ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 ⊢ ψ Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

σ = a x := 4 b x := 5 p(?) x > 3

10

slide-20
SLIDE 20

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

[a ∪ b]p(?) ↔ [a]p(?) ∧ [b]p(?) ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ ⊢ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, · · · ⊢ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 ⊢ ψ Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

σ = a x := 4 b x := 5 p(?) x > 3

10

slide-21
SLIDE 21

Significant Features of dL

BoxChoice

Γ ⊢ [α]ϕ Γ ⊢ [β]ϕ Γ ⊢ [α ∪ β]ϕ

[a ∪ b]p(?) ↔ [a]p(?) ∧ [b]p(?) ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ ⊢ [x := 4]x > 3 Γ ⊢ [x := 5]x > 3 Γ ⊢ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, · · · ⊢ [x := 4]x > 3 ∧ [x := 5]x > 3 Γ, ψ ↔ [x := 4]x > 3 ∧ [x := 5]x > 3 ⊢ ψ Γ ⊢ [x := 4 ∪ x := 5]x > 3

  • ψ

σ = a x := 4 b x := 5 p(?) x > 3

10

slide-22
SLIDE 22

Contribution: A Logic of Proofs for dL

LPdL extends the grammar of dL with formulas of the form e

  • LPdL proof term

: ϕ

  • dLformula

11

slide-23
SLIDE 23

Contribution: A Logic of Proofs for dL

LPdL extends the grammar of dL with formulas of the form e

  • LPdL proof term

: ϕ

  • dLformula

e, d ::= cφ

Example (Proof Constants)

(i[:=]) : ([x := t]p(x) ↔ p(t)) (jx>y∧y>z→x>z) : (x > y ∧ y > z → x > z)

11

slide-24
SLIDE 24

Contribution: A Logic of Proofs for dL

LPdL extends the grammar of dL with formulas of the form e

  • LPdL proof term

: ϕ

  • dLformula

e, d ::= cφ | e ∧ d

Example (Conjunctions)

(i:= ∧ jx>0) : (([x := t]p(x) ↔ p(t)) ∧ x > 0)

11

slide-25
SLIDE 25

Contribution: A Logic of Proofs for dL

LPdL extends the grammar of dL with formulas of the form e

  • LPdL proof term

: ϕ

  • dLformula

e, d ::= cφ | e ∧ d | e • d | e •← d | e •→ d

Example (•)

If e : ϕ → ψ (1) d : ϕ (2) Then e • d : ψ. Directional application performs a similar operation on equivalences.

11

slide-26
SLIDE 26

Contribution: A Logic of Proofs for dL

LPdL extends the grammar of dL with formulas of the form e

  • LPdL proof term

: ϕ

  • dLformula

e, d ::= cφ | e ∧ d | e • d | e •← d | e •→ d | σe | Be

Example (Uniform Substitution of Axiom [x := t]p(x) ↔ p(t))

σ{t→0 , p(·)→·≥0}(i[:=]) : [x := 0]x ≥ 0 ↔ 0 ≥ 0

11

slide-27
SLIDE 27

Contribution: A Logic of Proofs for dL

LPdL extends the grammar of dL with formulas of the form e

  • LPdL proof term

: ϕ

  • dLformula

e, d ::= cφ | e ∧ d | e • d | e •← d | e •→ d | σe | Be | CTσe |CQσe | CEσe

Example (US Instances of Proof Rules)

CE{t0 , p(·)·≥0}i[x:=t]p(t)↔p(x) : ([{z′ = a}][x := 0]x ≥ 0) ↔ ([{z′ = a}]0 ≥ 0)

11

slide-28
SLIDE 28

Sampling of Axioms and Proof Rules

φ (dL Axiom) iA : A (dL Constants) e : φ d : ψ (e ∧ d) : (φ ∧ ψ) (And) e : (φ → ψ) d : φ e • d : ψ (Application) e : φ σe : σ(φ) (US Proof Term) σe : σ(p(¯ x) ↔ q(¯ x)) CEσe : σ(C(p(¯ x) ↔ C(q(¯ x))) (CEσ) Only side-condition: admissibility of σs.

12

slide-29
SLIDE 29

Semantics of LPdL

iA : A iA : A iA : A iA : A α α α

◮ φI = φI dL ◮ iA : AI = S for dL axioms A ◮ jT : T = S for FOLR

tautologies T

◮ e ∧ d : φ ∧ ψI =

e : φI ∩ d : ψI

◮ e • d : φI =

  • ψe : (ψ → φ)I ∩ d : ψI

◮ . . .

13

slide-30
SLIDE 30

Correctness Properties

Theorem (Proof terms justify theorems)

Let e be a proof term and φ a dL formula. If ⊢LPdL e : φ then ⊢ φ.

14

slide-31
SLIDE 31

Correctness Properties

Theorem (Proof terms justify theorems)

Let e be a proof term and φ a dL formula. If ⊢LPdL e : φ then ⊢ φ.

KeYmaera X Kernel (soundness-critical, Scala) Real Quantifier Elimination Bound Renaming Propositional Sequent Calculus with Skolemization Differential Equation Solving

...

Uniform Substitution Wrappers for Kernel Primitives Combinators dL Tactics Proof Strategies

uses

Scheduler Simplified Proof Tree View REST-API Proof View Models Tactics Execution Proof Log KeYmaera X Web UI (JavaScript) Axiomatic Core HyDRA Server User Interface Tactical Prover Proof Storing

stores controls executes tactics

  • n tools/ CPU cores

start/stop/pause/resume

Searching Scala-API

manages combines

Proof Tree Axioms Proof Tree Simplification

  • bserves

executes

Proof Certificates

14

slide-32
SLIDE 32

Correctness Properties

Theorem (Proof terms justify theorems)

Let e be a proof term and φ a dL formula. If ⊢LPdL e : φ then ⊢ φ.

KeYmaera X Kernel (soundness-critical, Scala) Real Quantifier Elimination Bound Renaming Propositional Sequent Calculus with Skolemization Differential Equation Solving

...

Uniform Substitution Wrappers for Kernel Primitives Combinators dL Tactics Proof Strategies

uses

Scheduler Simplified Proof Tree View REST-API Proof View Models Tactics Execution Proof Log KeYmaera X Web UI (JavaScript) Axiomatic Core HyDRA Server User Interface Tactical Prover Proof Storing

stores controls executes tactics

  • n tools/ CPU cores

start/stop/pause/resume

Searching Scala-API

manages combines

Proof Tree Axioms Proof Tree Simplification

  • bserves

executes

Proof Certificates

14

slide-33
SLIDE 33

Adding Proof Terms Without Adding Soundness-Critical Code

Proof.

Case σe. Suppose that ⊢LPdL σe : φ. By [a lemma], φ = σ(φ′) and ⊢LPdL e : φ′ for some φ′. The induction hypothesis for the smaller proof term e gives ⊢dL φ′. Therefore, ⊢dL σ(φ′) (i.e., φ) is provable by US.

1 def ProofChecker (e : ProofTerm , phi: Formula) = ... 2 case UsubstTerm(e, phiPrime, usubst) => { 3 val phiPrimeCert = ProofChecker (e, phiPrime) 4 Provable.startProof(phi) 5 .( UniformSubstitutionRule ( 6 usubst , 7 phiPrime), 0) 8 .( phiPrimeCert , 0) 9 }

15

slide-34
SLIDE 34

Ongoing Work

◮ Controller Synthesis from Non-deterministic Models ◮ A proof term construction semantics for the Bellerophon

tactics language of KeYmaera X

16

slide-35
SLIDE 35

Conclusion

LPdL provides persistent permanent portable proofs

17

slide-36
SLIDE 36

Conclusion

LPdL provides persistent permanent portable proofs and furthermore reifies the structure of proofs

17

slide-37
SLIDE 37

Conclusion

LPdL provides persistent permanent portable proofs and furthermore reifies the structure of proofs by parsimoniously extending existing theory and implementation. keymaeraX.org · github.com/LS-Lab/KeYmaeraX-release nfulton@nfulton.org

17