Abstract
Modal Kleene algebras have been used for building verification components for imperative programs with Isabelle/HOL. We integrate this approach with recent Isabelle components for ordinary differential equations to build two verification components for hybrid systems, where continuous phase space dynamics complement the discrete dynamics on program stores. We demonstrate their feasibility by deriving the most important domain-specific rules of differential dynamic logic and discussing four simple examples.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Alur, R.: Formal verification of hybrid systems. In: EMSOFT 2011, pp. 273–278. ACM (2011)
Armstrong, A., Struth, G., Weber, T.: Kleene algebra. Archive of Formal Proofs (2013)
Arnol’d, V.I.: Ordinary Differential Equations. Springer, Heidelberg (1992)
Back, R., von Wright, J.: Refinement Calculus—A Systematic Introduction. Springer, New York (1998). https://doi.org/10.1007/978-1-4612-1674-2
Bohrer, B., Rahli, V., Vukotic, I., Völp, M., Platzer, A.: Formally verified differential dynamic logic. In: CPP 2017, pp. 208–221. ACM (2017)
Chlipala, A.: Certified Programming with Dependent Types–A Pragmatic Introduction to the Coq Proof Assistant. MIT Press (2013)
Desharnais, J., Struth, G.: Internal axioms for domain semirings. Sci. Comput. Program. 76(3), 181–203 (2011)
Dongol, B., Hayes, I.J., Struth, G.: Relational convolution, generalised modalities and incidence algebras. CoRR, abs/1702.04603 (2017)
Fainekos, G.E. Kress-Gazit, H., Pappas, G.J.: Hybrid controllers for path planning: a temporal logic approach. In: IEEE Conference on Decision and Control, pp. 4885–4890 (2005)
Fulton, N., Mitsch, S., Quesel, J.-D., Völp, M., Platzer, A.: KeYmaera X: an axiomatic tactical theorem prover for hybrid systems. In: Felty, A.P., Middeldorp, A. (eds.) CADE 2015. LNCS (LNAI), vol. 9195, pp. 527–538. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21401-6_36
Gomes, V.B.F., Guttman, W., Höfner, P., Struth, G., Weber, T.: Kleene algebra with domain. Archive of Formal Proofs (2016)
Gomes, V.B.F., Struth, G.: Modal kleene algebra applied to program correctness. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 310–325. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_19
Gomes, V.B.F., Struth, G.: Program construction and verification components based on Kleene algebra. Archive of Formal Proofs (2016)
Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press (2000)
Henzinger, T.A.: The theory of hybrid automata. In: LICS 1996, pp. 278–292. IEEE Computer Society (1996)
Höfner, P., Möller, B.: An algebra of hybrid systems. J. Logic Algebraic Program. 78(2), 74–97 (2009)
Hölzl, J., Immler, F., Huffman, B.: Type classes and filters for mathematical analysis in Isabelle/HOL. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 279–294. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39634-2_21
Immler, F., Hölzl, J.: Numerical analysis of ordinary differential equations in Isabelle/HOL. In: Beringer, L., Felty, A. (eds.) ITP 2012. LNCS, vol. 7406, pp. 377–392. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32347-8_26
Immler, F., Hölzl, J.: Ordinary differential equations. Archive of Formal Proofs (2012)
Immler, F., Traut, C.: The flow of ODEs. In: Blanchette, J.C., Merz, S. (eds.) ITP 2016. LNCS, vol. 9807, pp. 184–199. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-43144-4_12
Jeannin, J., et al.: A formally verified hybrid system for safe advisories in the next-generation airborne collision avoidance system. STTT 19(6), 717–741 (2017)
Klein, G., et al.: Comprehensive formal verification of an OS microkernel. ACM Trans. Comput. Syst. 32(1), 2:1–2:70 (2014)
Leroy, X.: Formal verification of a realistic compiler. CACM 52(7), 107–115 (2009)
Loos, S.M., Platzer, A., Nistor, L.: Adaptive cruise control: hybrid, distributed, and now formally verified. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 42–56. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21437-0_6
Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9
Olver, P.J.: Applications of Lie Groups to Differential Equations. Springer, New York (1986). https://doi.org/10.1007/978-1-4684-0274-2
Platzer, A.: The structure of differential invariants and differential cut elimination. LMCS 8(4), 1–38 (2008)
Platzer, A.: Logical Analysis of Hybrid Systems. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14509-4
Quesel, J., Mitsch, S., Loos, S.M., Arechiga, N., Platzer, A.: How to model and prove hybrid systems with KeYmaera: a tutorial on safety. STTT 18(1), 67–91 (2016)
Teschl, G.: Ordinary Differential Equations and Dynamical Systems. AMS (2012)
Acknowledgements
This work was funded by a CONACYT scholarship. We are grateful to André Platzer for sharing his wisdom on \(\mathsf {d}\mathcal {L}\), and to Achim Brucker, Michael Herzberg, Andreas Lochbihler and Makarius Wenzel for Isabelle advice.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
A Axioms and Definitions
Semiring. A semiring is a structure \((S,+,\cdot ,0,1)\) that, for all \(\alpha ,\beta ,\gamma \in S\) satisfies
Dioid. A dioid is a semiring S that satisfies \(\alpha +\alpha =\alpha \) for all \(x\in S\).
Kleene Algebra. A Kleene algebra is a structure \((K,+,\cdot ,0,1,^*)\) such that \((K,+,\cdot ,0,1)\) is a dioid and, for all \(x,y,z\in K\),
Modal Kleene Algebra. A modal Kleene algebra is a tuple \((K,+,\cdot ,0,\) \(1,^*, ad , ar )\) such that \((K,+,\cdot ,0,1,^*)\) is a Kleene algebra and, for all \(x,y\in K\),
Syntax of Differential Rings. \(\mathcal {R}{:}{:}= 0\mid 1\mid x\mid c\mid \mathcal {R}+\mathcal {R}\mid \mathcal {R} -\mathcal {R}\mid \mathcal {R}\cdot \mathcal {R}\mid \mathcal {R}'\), where x is drawn from a set of variables and c from a set of constants.
\(\varvec{\mathsf {d}\mathcal {L}}\)-Style Syntax of Hybrid Programs
where x is a variable, e an expression, f a vector field expression, G a guard and P a test. However we do not work with an explicit syntax for hybrid programs in Isabelle. The entire development is within the relational flow semantics. We are only creating syntactic illusions within the semantics.
B Background on Differential Equations
Ordinary Differential Equations A system of n ordinary differential equations (ODEs) can be described by a vector field \(f\in C(X,\mathbb {R}^n)\), where X is an open subset of \(\mathbb {R}^{n+1}\). Its solutions are integral curves \(x:I\rightarrow \mathbb {R}^n\) that is, differentiable functions that satisfy \(x'\, t=f\, (t, x\, t)\), where \(t\in I\subseteq \pi _1[X]\) (and \(\pi _1\) is the standard first projection map). An initial value problem for this system of ODEs is specified with an initial condition \(x\ t_0=x_0\) where \(x_0\in X\) and \(t_0\in I\).
Autonomous Systems of ODEs. The vector fields described above are time dependent. Time independent vector fields satisfy \(f\in C(X,\mathbb {R}^n)\) with \(X\subseteq R^n\). The system of ODEs is then called autonomous [30] and its solutions satisfy the equation \(x'\ t = f\ (x\ t)\) for \(t\in I\subseteq \mathbb {R}\).
Lipschitz Continuity. A function \(f:V\rightarrow W\) between normed vector spaces V and W is Lipschitz continuous on \(X\subseteq V\) if there is a constant \(k\ge 0\) such that \(||f\, x-f\, y||\le k||x-y||\) holds for all \(x,y\in X\). The function f is a contraction if it is Lipschitz continuous with \(k<1\).
Solutions to ODEs: Existence and Uniqueness. A Banach space is a complete normed vector space, that is, all Cauchy sequences converge. Let \(B\ne \emptyset \) be a closed subset of a Banach space. Then, by Banach’s fixpoint theorem, every contraction \(f:B\rightarrow B\) has a unique fixpoint. This theorem is essential for proving the Picard-Lindelöf Theorem, which guarantees unique solutions for initial value problems. We state a special case for autonomous systems of ODEs.
Theorem B.1
(Picard-Lindelöf Theorem). For every Lipschitz continuous vector field \(f:X\subseteq \mathbb {R}^n\rightarrow \mathbb {R}^n\) and \(x_0\in X\) there exists a unique integral curve \(x\in C^1(I(x_0))\) that satisfies the initial value problem for the autonomous system \(x'\ t=f\, (x\, t)\) and \(x\, t_0=x_0\). \(I(x_0)\) is the maximal interval of existence for x around \(t_0\).
Flow of an Autonomous System of ODEs. Let \(f:X\subseteq \mathbb {R}^n\rightarrow X\) be a Lipschitz continuous vector field that admits, for each \(x\in X\), a unique integral curve \(\phi _x\in C^1(I(x))\) such that \(\phi _x\ 0=x\) by Picard-Lindelöf’s theorem. The local flow \(\varphi :T\rightarrow X\rightarrow X\) for f is defined by \(\varphi \ t\ x=\phi _x\ t\), where \(T=\bigcap _{x\in X}I(x)\).
For \(\mathbb {R}= T\), the group action equations \(\varphi \ 0= id \) and \(\varphi \ (s+ t) = \varphi \ s \circ \varphi \ t\) are immediately derivable from this definition. The flow is thus indeed an action of the additive group \(\mathbb {R}\) on X, and hence a dynamical system.
C Cross-References to Isabelle Proofs
The following table links the results in this article with facts from the Isabelle repository. The repository contains a readme file with further instructions.
Result in article | Result in Isabelle theories |
---|---|
Definition of evolution statements | subsumed by |
Definition of \(\mathsf {Flow}\) | (no uniqueness) |
Proposition 5.2 | subsumed by |
Lemma 5.3 | subsumed by |
Definition of guarded evolution statement |
|
Proposition 6.1 |
|
Lemma 6.2 | subsumed by , |
Lemma 6.3 | subsumed by |
Definition of differential ring language | , |
Lemma 7.2 | implied by |
Rules for solving ODEs in \(\mathbb {R}^{V\cup V'}\) |
|
Differential weakening rule for \(\mathbb {R}^{V\cup V'}\) |
|
Lemma 7.3 |
|
Corollary 7.5 |
|
Lemma 7.6 |
|
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Huerta y Munive, J.J., Struth, G. (2018). Verifying Hybrid Systems with Modal Kleene Algebra. In: Desharnais, J., Guttmann, W., Joosten, S. (eds) Relational and Algebraic Methods in Computer Science. RAMiCS 2018. Lecture Notes in Computer Science(), vol 11194. Springer, Cham. https://doi.org/10.1007/978-3-030-02149-8_14
Download citation
DOI: https://doi.org/10.1007/978-3-030-02149-8_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-02148-1
Online ISBN: 978-3-030-02149-8
eBook Packages: Computer ScienceComputer Science (R0)