Advertisement

Equational Theories of Abnormal Termination Based on Kleene Algebra

  • Konstantinos MamourasEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10203)

Abstract

We study at an abstract level imperative while programs with an explicit fail operation that causes abnormal termination or irreparable failure, and a try-catch operation for error handling. There are two meaningful ways to define the semantics of such programs, depending on whether the final state of the computation can be observed upon failure or not. These two semantics give rise to different equational theories. We investigate these two theories in the abstract framework of Kleene algebra, and we propose two simple and intuitive equational axiomatizations. We prove very general conservativity results, from which we also obtain decidability and deductive completeness of each of our calculi with respect to the intended semantics.

References

  1. 1.
    Aceto, L., Hennessy, M.: Termination, deadlock and divergence. In: Main, M., Melton, A., Mislove, M., Schmidt, D. (eds.) MFPS 1989. LNCS, vol. 442, pp. 301–318. Springer, New York (1990). doi: 10.1007/BFb0040264 CrossRefGoogle Scholar
  2. 2.
    Aceto, L., Hennessy, M.: Termination, deadlock, and divergence. J. ACM 39(1), 147–187 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Anderson, C.J., Foster, N., Guha, A., Jeannin, J.B., Kozen, D., Schlesinger, C., Walker, D.: NetKAT: semantic foundations for networks. In: Proceedings of the 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2014), pp. 113–126 (2014)Google Scholar
  4. 4.
    Antimirov, V.: Partial derivatives of regular expressions and finite automaton constructions. Theor. Comput. Sci. 155(2), 291–319 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Brzozowski, J.A.: Derivatives of regular expressions. J. ACM 11(4), 481–494 (1964)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Delbianco, G.A., Nanevski, A.: Hoare-style reasoning with (algebraic) continuations. In: Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP 2013), pp. 363–376 (2013)Google Scholar
  7. 7.
    Foster, N., Kozen, D., Mamouras, K., Reitblatt, M., Silva, A.: Probabilistic NetKAT. In: Thiemann, P. (ed.) ESOP 2016. LNCS, vol. 9632, pp. 282–309. Springer, Heidelberg (2016). doi: 10.1007/978-3-662-49498-1_12 CrossRefGoogle Scholar
  8. 8.
    Goncharov, S., Schröder, L., Mossakowski, T.: Kleene monads: handling iteration in a framework of generic effects. In: Kurz, A., Lenisa, M., Tarlecki, A. (eds.) CALCO 2009. LNCS, vol. 5728, pp. 18–33. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-03741-2_3 CrossRefGoogle Scholar
  9. 9.
    Grathwohl, N.B.B., Kozen, D., Mamouras, K.: KAT + B! In: Proceedings of the Joint Meeting of the 23rd EACSL Annual Conference on Computer Science Logic (CSL) and the 29th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS 2014, pp. 44:1–44:10 (2014)Google Scholar
  10. 10.
    Huisman, M., Jacobs, B.: Java program verification via a Hoare logic with abrupt termination. In: Maibaum, T. (ed.) FASE 2000. LNCS, vol. 1783, pp. 284–303. Springer, Heidelberg (2000). doi: 10.1007/3-540-46428-X_20 CrossRefGoogle Scholar
  11. 11.
    Hyland, M., Plotkin, G., Power, J.: Combining effects: sum and tensor. Theor. Comput. Sci. 357(1), 70–99 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular events. Inf. Comput. 110(2), 366–390 (1994)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Kozen, D.: Kleene algebra with tests. Trans. Programm. Lang. Syst. 19(3), 427–443 (1997)CrossRefzbMATHGoogle Scholar
  14. 14.
    Kozen, D.: Automata on guarded strings and applications. Matématica Contemporânea 24, 117–139 (2003)MathSciNetzbMATHGoogle Scholar
  15. 15.
    Kozen, D.: Nonlocal flow of control and Kleene algebra with tests. In: Proceedings of the 23rd Annual IEEE Symposium on Logic in Computer Science (LICS 2008), pp. 105–117 (2008)Google Scholar
  16. 16.
    Kozen, D.: On the coalgebraic theory of Kleene algebra with tests. Technical report, Computing and Information Science, Cornell University, March 2008Google Scholar
  17. 17.
    Kozen, D., Mamouras, K.: Kleene algebra with equations. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds.) ICALP 2014. LNCS, vol. 8573, pp. 280–292. Springer, Heidelberg (2014). doi: 10.1007/978-3-662-43951-7_24 Google Scholar
  18. 18.
    Kozen, D., Mamouras, K., Petrişan, D., Silva, A.: Nominal Kleene coalgebra. In: Halldórsson, M.M., Iwama, K., Kobayashi, N., Speckmann, B. (eds.) ICALP 2015. LNCS, vol. 9135, pp. 286–298. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-47666-6_23 Google Scholar
  19. 19.
    Kozen, D., Mamouras, K., Silva, A.: Completeness and incompleteness in nominal Kleene algebra. In: Kahl, W., Winter, M., Oliveira, J.N. (eds.) RAMICS 2015. LNCS, vol. 9348, pp. 51–66. Springer, Cham (2015). doi: 10.1007/978-3-319-24704-5_4 CrossRefGoogle Scholar
  20. 20.
    Kozen, D., Smith, F.: Kleene algebra with tests: completeness and decidability. In: Dalen, D., Bezem, M. (eds.) CSL 1996. LNCS, vol. 1258, pp. 244–259. Springer, Heidelberg (1997). doi: 10.1007/3-540-63172-0_43 CrossRefGoogle Scholar
  21. 21.
    Kozen, D., Tiuryn, J.: On the completeness of propositional Hoare logic. Inf. Sci. 139(3–4), 187–195 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Luckham, D.C., Park, D.M.R., Paterson, M.S.: On formalised computer programs. J. Comput. Syst. Sci. 4(3), 220–249 (1970)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Mamouras, K.: On the Hoare theory of monadic recursion schemes. In: Proceedings of the Joint Meeting of the 23rd EACSL Annual Conference on Computer Science Logic (CSL) and the 29th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS 2014, pp. 69:1–69:10 (2014)Google Scholar
  24. 24.
    Mamouras, K.: Extensions of Kleene algebra for program verification. Ph.D. thesis, Cornell University, Ithaca, NY, August 2015Google Scholar
  25. 25.
    Mamouras, K.: Synthesis of strategies and the Hoare logic of angelic nondeterminism. In: Pitts, A. (ed.) FoSSaCS 2015. LNCS, vol. 9034, pp. 25–40. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-46678-0_2 CrossRefGoogle Scholar
  26. 26.
    Mamouras, K.: The Hoare logic of deterministic and nondeterministic monadic recursion schemes. ACM Trans. Comput. Logic (TOCL) 17(2), 13:1–13:30 (2016)MathSciNetCrossRefGoogle Scholar
  27. 27.
    Mamouras, K.: Synthesis of strategies using the Hoare logic of angelic and demonic nondeterminism. Log. Methods Comput. Sci. 12(3), 1–41 (2016)MathSciNetGoogle Scholar
  28. 28.
    Moggi, E.: Notions of computation and monads. Inf. Comput. 93(1), 55–92 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    von Oheimb, D.: Hoare logic for Java in Isabelle/HOL. Concurr. Comput. Pract. Exp. 13(13), 1173–1214 (2001)CrossRefzbMATHGoogle Scholar
  30. 30.
    Plotkin, G., Power, J.: Computational effects and operations. ENTCS 73, 149–163 (2004)zbMATHGoogle Scholar
  31. 31.
    Plotkin, G., Pretnar, M.: Handlers of algebraic effects. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 80–94. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-00590-9_7 CrossRefGoogle Scholar
  32. 32.
    Pratt, V.R.: Semantical considerations on Floyd-Hoare logic. In: Proceedings of the 17th IEEE Annual Symposium on Foundations of Computer Science (FOCS 1976), pp. 109–121 (1976)Google Scholar
  33. 33.
    Saabas, A., Uustalu, T.: A compositional natural semantics and Hoare logic for low-level languages. Theor. Comput. Sci. 373(3), 273–302 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  34. 34.
    Tan, G., Appel, A.W.: A compositional logic for control flow. In: Emerson, E.A., Namjoshi, K.S. (eds.) VMCAI 2006. LNCS, vol. 3855, pp. 80–94. Springer, Heidelberg (2005). doi: 10.1007/11609773_6 CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  1. 1.University of PennsylvaniaPhiladelphiaUSA

Personalised recommendations