Program Analysis and Verification Based on Kleene Algebra in Isabelle/HOL

  • Alasdair Armstrong
  • Georg Struth
  • Tjark Weber
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7998)


Schematic Kleene algebra with tests (SKAT) supports the equational verification of flowchart scheme equivalence and captures simple while-programs with assignment statements. We formalise SKAT in Isabelle/HOL, using the quotient type package to reason equationally in this algebra. We apply this formalisation to a complex flowchart transformation proof from the literature. We extend SKAT with assertion statements and derive the inference rules of Hoare logic. We apply this extension in simple program verification examples and the derivation of additional Hoare-style rules. This shows that algebra can provide an abstract semantic layer from which different program analysis and verification tasks can be implemented in a simple lightweight way.


Boolean Algebra Inference Rule Theorem Prover Proof Obligation Quotient Algebra 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aboul-Hosn, K., Kozen, D.: KAT-ML: An interactive theorem prover for Kleene algebra with tests. Journal of Applied Non-Classical Logics 16(1-2), 9–34 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  2. 2.
    Angus, A., Kozen, D.: Kleene algebra with tests and program schematology. Technical Report TR2001-1844, Computer Science Department, Cornell University (July 2001)Google Scholar
  3. 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)CrossRefGoogle Scholar
  4. 4.
    Armstrong, A., Struth, G., Weber, T.: Kleene algebra. Archive of Formal Proofs, Formal proof development (2013),
  5. 5.
    Berghammer, R., Struth, G.: On automated program construction and verification. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 22–41. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Braibant, T., Pous, D.: Deciding Kleene algebras in Coq. Logical Methods in Computer Science 8(1) (2012)Google Scholar
  7. 7.
    Cohen, E.: Separation and reduction. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 45–59. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  8. 8.
    Collavizza, H., Gordon, M.: Forward with Hoare. In: Roscoe, A.W., Jones, C.B., Wood, K.R. (eds.) Reflections on the Work of C. A. R. Hoare, pp. 101–121. Springer, Heidelberg (2010)Google Scholar
  9. 9.
    Desharnais, J., Möller, B., Struth, G.: Algebraic notions of termination. Logical Methods in Computer Science 7(1) (2011)Google Scholar
  10. 10.
    Ehm, T., Möller, B., Struth, G.: Kleene modules. In: Berghammer, R., Möller, B., Struth, G. (eds.) RelMiCS 2003. LNCS, vol. 3051, pp. 112–124. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  11. 11.
    Fernandes, T., Desharnais, J.: Describing data flow analysis techniques with Kleene algebra. Sci. Comput. Program. 65(2), 173–194 (2007)MathSciNetzbMATHCrossRefGoogle Scholar
  12. 12.
    Foster, S., Struth, G.: Automated analysis of regular algebra. In: Gramlich, B., Miller, D., Sattler, U. (eds.) IJCAR 2012. LNCS, vol. 7364, pp. 271–285. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  13. 13.
    Guttmann, W., Struth, G., Weber, T.: Automating algebraic methods in Isabelle. In: Qin, S., Qiu, Z. (eds.) ICFEM 2011. LNCS, vol. 6991, pp. 617–632. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  14. 14.
    Guttmann, W., Struth, G., Weber, T.: A repository for Tarski-Kleene algebras. In: Höfner, P., McIver, A., Struth, G. (eds.) ATE 2011. CEUR Workshop Proceedings, vol. 760, pp. 30–39. (2011)Google Scholar
  15. 15.
    Höfner, P., Struth, G.: Automated reasoning in Kleene algebra. In: Pfenning, F. (ed.) CADE 2007. LNCS (LNAI), vol. 4603, pp. 279–294. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  16. 16.
    Huffman, B., Kunčar, O.: Lifting and Transfer: A modular design for quotients in Isabelle/HOL. In: Isabelle Users Workshop (2012)Google Scholar
  17. 17.
    Kaliszyk, C., Urban, C.: Quotients revisited for Isabelle/HOL. In: Chu, W.C., Wong, W.E., Palakal, M.J., Hung, C.-C. (eds.) SAC, pp. 1639–1644. ACM (2011)Google Scholar
  18. 18.
    Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997)CrossRefGoogle Scholar
  19. 19.
    Kozen, D., Patron, M.-C.: Certification of compiler optimizations using Kleene algebra with tests. In: Palamidessi, C., et al. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 568–582. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  20. 20.
    Leiß, H.: Kleene modules and linear languages. J. Log. Algebr. Program. 66(2), 185–194 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  21. 21.
    Manna, Z.: Mathematical theory of computation. McGraw-Hill (1974)Google Scholar
  22. 22.
    Möller, B., Struth, G.: Algebras of modal operators and partial correctness. Theor. Comput. Sci. 351(2), 221–239 (2006)zbMATHCrossRefGoogle Scholar
  23. 23.
    Nanevski, A., Morrisett, G., Shinnar, A., Govereau, P., Birkedal, L.: Ynot: Dependent types for imperative programs. In: Hook, J., Thiemann, P. (eds.) ICFP, pp. 229–240. ACM (2008)Google Scholar
  24. 24.
    Nipkow, T.: Winskel is (almost) right: Towards a mechanized semantics. Formal Asp. Comput. 10(2), 171–186 (1998)zbMATHCrossRefGoogle Scholar
  25. 25.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHCrossRefGoogle Scholar
  26. 26.
    Schirmer, N.: Verification of sequential imperative programs in Isabelle-HOL. PhD thesis, Technische Universität München (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Alasdair Armstrong
    • 1
  • Georg Struth
    • 1
  • Tjark Weber
    • 2
  1. 1.Department of Computer ScienceUniversity of SheffieldUK
  2. 2.Department of Information TechnologyUppsala UniversitySweden

Personalised recommendations