Skip to main content

Modal Kleene Algebra Applied to Program Correctness

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9995))

Abstract

Modal Kleene algebras are relatives of dynamic logics that support program construction and verification by equational reasoning. We describe their application in implementing versatile program correctness components in interactive theorem provers such as Isabelle/HOL. Starting from a weakest precondition based component with a simple relational store model, we show how variants for Hoare logic, strongest postconditions and program refinement can be built in a principled way. Modularity of the approach is demonstrated by variants that capture program termination and recursion, memory models for programs with pointers, and program trace semantics.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. Armstrong, A., Gomes, V.B.F., Struth, G.: Kleene algebra with tests and demonic refinement algebras. In: Archive of Formal Proofs (2014)

    Google Scholar 

  2. Armstrong, A., Gomes, V.B.F., Struth, G.: Building program construction and verification tools from algebraic principles. Form. Asp. Comput. 28(2), 265–293 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  3. Armstrong, A., Struth, G.: Automated reasoning in higher-order regular algebra. In: Kahl, W., Griffin, T.G. (eds.) RAMICS 2012. LNCS, vol. 7560, pp. 66–81. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33314-9_5

    Chapter  Google Scholar 

  4. Armstrong, A., Struth, G., Weber, T.: Kleene algebra. In: Archive of Formal Proofs (2013)

    Google Scholar 

  5. Armstrong, A., Struth, G., Weber, T.: Programming, automating mathematics in the Tarski-Kleene hierarchy. J. Log. Algebraic Methods Program. 83(2), 87–102 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  6. Back, R., von Wright, J.: Refinement Calculus - A Systematic Introduction. Springer, New York (1998)

    Book  MATH  Google Scholar 

  7. Conway, J.H.: Regular Algebra and Finite Machines. Chapman and Hall, London (1971)

    MATH  Google Scholar 

  8. Desharnais, J., Möller, B., Struth, G.: Algebraic notions of termination. Log. Methods Comput. Sci. 7(1), 1–29 (2011)

    MathSciNet  MATH  Google Scholar 

  9. Desharnais, J., Struth, G.: Internal axioms for domain semirings. Sci. Comput. Program. 76(3), 181–203 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  10. Gomes, V.B.F.: Algebraic principles for program correctness tools in Isabelle/HOL. PhD thesis, University of Sheffield (2015)

    Google Scholar 

  11. Gomes, V.B.F., Guttman, W., Höfner, P., Struth, G., Weber, T.: Kleene algebra with domain. In: Archive of Formal Proofs (2016)

    Google Scholar 

  12. Gomes, V.B.F., Struth, G.: Program construction and verification components based on Kleene algebra. In: Archive of Formal Proofs (2016)

    Google Scholar 

  13. Gordon, M., Collavizza, H.: Forward with Hoare. In: Roscoe, A.W., Jones, C.B., Wood, K.W. (eds.) Reflections on the Work of C.A.R. Hoare, pp. 101–121. Springer, London (2010). doi:10.1007/978-1-84882-912-1_5

    Chapter  Google Scholar 

  14. Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press, Cambridge (2000)

    MATH  Google Scholar 

  15. Hollenberg, M.: An equational axiomatization of dynamic negation and relational composition. J. Log. Lang. Inf. 6(4), 381–401 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  16. Jónsson, B., Tarski, A.: Boolean algebras with operators, Part I. Am. J. Math. 73(4), 207–215 (1951)

    Article  MATH  Google Scholar 

  17. Kozen, D., Patron, M.-C.: Certification of compiler optimizations using Kleene algebra with tests. In: Lloyd, J., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Palamidessi, C., Pereira, L.M., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 568–582. Springer, Heidelberg (2000). doi:10.1007/3-540-44957-4_38

    Chapter  Google Scholar 

  18. Matichuk, D., Murray, T.C., Wenzel, M.: Eisbach: a proof method language for Isabelle. J. Autom. Reason. 56(3), 261–282 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  19. Meng, J., Paulson, L.C., Klein, G.: A termination checker for Isabelle Hoare logic. In: International Verification Workshop (2007)

    Google Scholar 

  20. Möller, B., Struth, G.: Algebras of modal operators and partial correctness. Theor. Comput. Sci. 351(2), 221–239 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  21. Morgan, C.: Programming from Specifications, 2nd edn. Prentice Hall, London (1994)

    MATH  Google Scholar 

  22. Németi, I.: Dynamic algebras of programs. In: Gecseg, F. (ed.) FCT 1981. LNCS, vol. 117, pp. 281–290. Springer, Heidelberg (1981)

    Chapter  Google Scholar 

  23. Nipkow, T., Klein, G.: Concrete Semantics-With Isabelle/HOL. Springer, Switzerland (2014)

    MATH  Google Scholar 

  24. Nipkow, T., Wenzel, M., Paulson, L.C.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)

    MATH  Google Scholar 

  25. Platzer, A.: Logical analysis of hybrid systems. In: Kutrib, M., Moreira, N., Reis, R. (eds.) DCFS 2012. LNCS, vol. 7386, pp. 43–49. Springer, Heidelberg (2012). doi:10.1007/978-3-642-31623-4_3

    Chapter  Google Scholar 

  26. Pratt, V.: Dynamic algebras as a well-behaved fragment of relation algebras. In: Bergman, C.H., Maddux, R.D., Pigozzi, D.L. (eds.) Algebraic Logic and Universal Algebra in Computer Science. LNCS, vol. 425, pp. 77–110. Springer, Heidelberg (1990). doi:10.1007/BFb0043079

    Chapter  Google Scholar 

  27. Struth, G.: Left omega algebras and regular equations. J. Log. Algebraic Program. 81(6), 705–717 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  28. Struth, G.: On the expressive power of Kleene algebra with domain. Inf. Proces. Lett. 116(4), 284–288 (2016)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work was partly supported by EPSRC Programme Grant REMS: Rigorous Engineering for Mainstream Systems, EP/K008528/1.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Victor B. F. Gomes or Georg Struth .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing AG

About this paper

Cite this paper

Gomes, V.B.F., Struth, G. (2016). Modal Kleene Algebra Applied to Program Correctness. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds) FM 2016: Formal Methods. FM 2016. Lecture Notes in Computer Science(), vol 9995. Springer, Cham. https://doi.org/10.1007/978-3-319-48989-6_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-48989-6_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-48988-9

  • Online ISBN: 978-3-319-48989-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics