KeYmaera: A Hybrid Theorem Prover for Hybrid Systems Andr´ e Platzer Jan-David Quesel University of Oldenburg, Department of Computing Science, Germany International Joint Conference on Automated Reasoning, Sydney 2008 Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 1 / 11
Motivation KeYmaera: Verification tool for hybrid systems Hybrid System Continuous evolutions (differential equations) Discrete jumps (control decisions) z v 6 a 3.0 2 5 2.5 1 4 2.0 3 1.5 4 t 1 2 3 1.0 2 � 1 1 0.5 4 t 4 t � 2 1 2 3 1 2 3 Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 2 / 11
Differential Dynamic Logic (d L ) v z m Example − → [ � � ]( � �� � ) � �� � �� Precondition Operational model Property Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 3 / 11
Differential Dynamic Logic (d L ) v z m Example v 2 ≤ 2 b ( m − z ) − → [ � � ]( z ≤ m � �� � ) � �� � �� Precondition Operational model Property Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 3 / 11
Differential Dynamic Logic (d L ) v z m Example v 2 ≤ 2 b ( m − z ) z ′ = v , v ′ = a − → [ � ]( z ≤ m � �� � ) � �� � � �� Precondition Operational model Property Continuous evolution: differential equation Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 3 / 11
Differential Dynamic Logic (d L ) v z m Example v 2 ≤ 2 b ( m − z ) z ′ = v , v ′ = a − → [ a := ∗ ; � ]( z ≤ m � �� � ) � �� � � �� Precondition Operational model Property Random assignment Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 3 / 11
Differential Dynamic Logic (d L ) v z m Example v 2 ≤ 2 b ( m − z ) [ a := ∗ ; ? a ≤ − b ; z ′ = v , v ′ = a − → � ]( z ≤ m � �� � ) � �� � � �� Precondition Operational model Property Test Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 3 / 11
Syntax of Differential Dynamic Logic d L Formulas φ ::= θ 1 ∼ θ 2 | ¬ φ | φ ∧ ψ | ∀ x φ | ∃ x φ | [ α ] φ | � α � φ Hybrid Program | Effect α ; β sequential composition α ∪ β nondeterministic choice α ∗ nondeterministic repetition x := θ discrete assignment (jump) x := ∗ nondeterministic assignment � � x ′ 1 = θ 1 , . . . , x ′ n = θ n , F continuous evolution of x i ? F check if formula F holds A. Platzer. Differential Dynamic Logic for Hybrid Systems. Journal of Automated Reasoning, 41(2), 2008, to appear. Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 4 / 11
KeYmaera Architecture Quantifier eliminiation KeYmaera Prover Solvers Input File Strategy Mathematica Rule QEPCAD Rule Engine Proof base Orbital Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 5 / 11
KeYmaera Architecture Quantifier eliminiation KeYmaera Prover Solvers Input File Strategy Mathematica Rule QEPCAD Rule Engine Proof base Orbital Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 5 / 11
Proof Sketch m − z ≤ SB m − z > SB m − z ≤ SB m − z > SB v ≥ v des v ≤ v des Example . . . Drive Brake � A � � 2 ε 2 � + v 2 − d 2 ε v + A m − z ≥ b + 1 ∧ 0 ≤ a ≤ A ∧ 0 ≤ v ≤ vdes 2 b ∧ v 2 − d 2 ≤ 2 b ( m − z ) ∧ d ≥ 0 ∧ ε > 0 ∧ b > 0 ∧ A > 0 ⊢ ∀ t ≥ 0 (( ∀ 0 ≤ ˜ t ≤ t ( a ˜ t + v ≥ 0 ∧ ˜ t ≤ ε )) → ( at + v ) 2 − d 2 ≤ 2 b ( m − ( 1 2 at + tv + z )) ∧ at + v ≥ 0 ∧ d ≥ 0) Init ⊢ Inv Inv ⊢ [ ETCS ] Inv Inv ⊢ z ≤ m Init ⊢ [ ETCS ∗ ] z ≤ m Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 6 / 11
Proof Sketch m − z ≤ SB m − z > SB m − z ≤ SB m − z > SB v ≥ v des v ≤ v des Example . . . Drive Brake � A � � 2 ε 2 � + v 2 − d 2 ε v + A m − z ≥ b + 1 ∧ 0 ≤ a ≤ A ∧ 0 ≤ v ≤ vdes 2 b ∧ v 2 − d 2 ≤ 2 b ( m − z ) ∧ d ≥ 0 ∧ ε > 0 ∧ b > 0 ∧ A > 0 ⊢ ∀ t ≥ 0 (( ∀ 0 ≤ ˜ t ≤ t ( a ˜ t + v ≥ 0 ∧ ˜ t ≤ ε )) → ( at + v ) 2 − d 2 ≤ 2 b ( m − ( 1 2 at + tv + z )) ∧ at + v ≥ 0 ∧ d ≥ 0) Init ⊢ Inv Inv ⊢ [ ETCS ] Inv Inv ⊢ z ≤ m Init ⊢ [ ETCS ∗ ] z ≤ m Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 6 / 11
Handling Differential Equations Example x ′ = f ( x ) v w ∀ t ≥ 0 [ x := y ( t )] φ [ x ′ = f ( x )] φ φ x := y ( t ) ⊢ [ z ′ = v , v ′ = − b ] z ≤ m . . . Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 7 / 11
Handling Differential Equations Example x ′ = f ( x ) v w ∀ t ≥ 0 [ x := y ( t )] φ [ x ′ = f ( x )] φ φ x := y ( t ) 2 bt 2 + tv + z ] z ≤ m ⊢ ∀ t ≥ 0 [ z := − 1 . . . ⊢ [ z ′ = v , v ′ = − b ] z ≤ m . . . Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 7 / 11
Handling Differential Equations Example x ′ = f ( x ) v w ∀ t ≥ 0 [ x := y ( t )] φ [ x ′ = f ( x )] φ φ x := y ( t ) 2 bt 2 + tv + z ≤ m ) ⊢ ∀ t ≥ 0 ( − 1 . . . 2 bt 2 + tv + z ] z ≤ m ⊢ ∀ t ≥ 0 [ z := − 1 . . . ⊢ [ z ′ = v , v ′ = − b ] z ≤ m . . . Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 7 / 11
KeYmaera Architecture Quantifier eliminiation KeYmaera Prover Solvers Input File Strategy Mathematica Rule QEPCAD Rule Engine Proof base Orbital Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 7 / 11
KeYmaera Architecture Quantifier eliminiation KeYmaera Prover Solvers Input File Strategy Mathematica Rule QEPCAD Rule Engine Proof base Orbital Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 7 / 11
Proof Sketch m − z ≤ SB m − z > SB m − z ≤ SB m − z > SB v ≥ v des v ≤ v des Example . . . Drive Brake � A � � 2 ε 2 � + v 2 − d 2 ε v + A m − z ≥ b + 1 ∧ 0 ≤ a ≤ A ∧ 0 ≤ v ≤ vdes 2 b ∧ v 2 − d 2 ≤ 2 b ( m − z ) ∧ d ≥ 0 ∧ ε > 0 ∧ b > 0 ∧ A > 0 ⊢ ∀ t ≥ 0 (( ∀ 0 ≤ ˜ t ≤ t ( a ˜ t + v ≥ 0 ∧ ˜ t ≤ ε )) → ( at + v ) 2 − d 2 ≤ 2 b ( m − ( 1 2 at + tv + z )) ∧ at + v ≥ 0 ∧ d ≥ 0) Init ⊢ Inv Inv ⊢ [ ETCS ] Inv Inv ⊢ z ≤ m Init ⊢ [ ETCS ∗ ] z ≤ m Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 8 / 11
Proof Sketch m − z ≤ SB m − z > SB m − z ≤ SB m − z > SB v ≥ v des v ≤ v des Example . . . Drive Brake � A � � 2 ε 2 � + v 2 − d 2 ε v + A m − z ≥ b + 1 ∧ 0 ≤ a ≤ A ∧ 0 ≤ v ≤ vdes 2 b ∧ v 2 − d 2 ≤ 2 b ( m − z ) ∧ d ≥ 0 ∧ ε > 0 ∧ b > 0 ∧ A > 0 ⊢ ∀ t ≥ 0 (( ∀ 0 ≤ ˜ t ≤ t ( a ˜ t + v ≥ 0 ∧ ˜ t ≤ ε )) → ( at + v ) 2 − d 2 ≤ 2 b ( m − ( 1 2 at + tv + z )) ∧ at + v ≥ 0 ∧ d ≥ 0) Init ⊢ Inv Inv ⊢ [ ETCS ] Inv Inv ⊢ z ≤ m Init ⊢ [ ETCS ∗ ] z ≤ m Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 8 / 11
Iterative Background Closure Quantifier elimination is 16 doubly exponential 16 16 16 Choice conflict: 8 8 8 ∗ Apply quantifier 4 4 4 1 elimination ∗ 2 2 2 Split using 2 1 1 ⊢ F ⊢ G ⊢ F ∧ G Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 9 / 11
Experimental Results Case Study Interact Steps IBC(s) Eager QE(s) ETCS essentials 0 46 47.8 ∞ 1 46 6.6 8.8 ETCS complete 0 163 2045.2 ∞ 1 168 23.3 ∞ ETCS reactivity 0 49 76.2 ∞ ETCS liveness 3 112 17.6 16.0 Aircraft TRM 0 94 10.9 ∞ 1 94 1.2 1.2 TRM 3 Planes 0 187 171.8 ∞ 1 187 21.2 ∞ TRM 4 Planes 0 255 704.3 ∞ 1 255 170 ∞ Water tank 0 - ∞ ∞ 1 375 2.0 2.0 ∞ ˆ = more than five hours Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 10 / 11
Experimental Results Case Study Interact Steps IBC(s) Eager QE(s) ETCS essentials 0 46 47.8 ∞ 1 46 6.6 8.8 ETCS complete 0 163 2045.2 ∞ 1 168 23.3 ∞ ETCS reactivity 0 49 76.2 ∞ ETCS liveness 3 112 17.6 16.0 Aircraft TRM 0 94 10.9 ∞ 1 94 1.2 1.2 TRM 3 Planes 0 187 171.8 ∞ 1 187 21.2 ∞ TRM 4 Planes 0 255 704.3 ∞ 1 255 170 ∞ Water tank 0 - ∞ ∞ 1 375 2.0 2.0 ∞ ˆ = more than five hours Andr´ e Platzer, Jan-David Quesel KeYmaera: A Hybrid Theorem Prover for Hybrid Systems IJCAR 2008 10 / 11
Recommend
More recommend