Unifying Correctness Statements

  • Walter Guttmann
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7342)


Partial, total and general correctness and further models of sequential computations differ in their treatment of finite, infinite and aborting executions. Algebras structure this diversity of models to avoid the repeated development of similar theories and to clarify their range of application. We introduce algebras that uniformly describe correctness statements, correctness calculi, pre-post specifications and loop refinement rules in five kinds of computation models. This extends previous work that unifies iteration, recursion and program transformations for some of these models. Our new description includes a relativised domain operation, which ignores parts of a computation, and represents bound functions for claims of termination by sequences of tests. We verify all results in Isabelle heavily using its automated theorem provers.


Correctness Statement General Correctness Relative Domain Total Correctness Partial Correctness 
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.
    Apt, K.R., de Boer, F.S., Olderog, E.R.: Verification of Sequential and Concurrent Programs, 3rd edn. Springer (2009)Google Scholar
  2. 2.
    de Bakker, J.W.: Semantics and termination of nondeterministic recursive programs. In: Michaelson, S., Milner, R. (eds.) Automata, Languages and Programming: Third International Colloquium, pp. 435–477. Edinburgh University Press (1976)Google Scholar
  3. 3.
    Berghammer, R., Zierer, H.: Relational algebraic semantics of deterministic and nondeterministic programs. Theor. Comput. Sci. 43, 123–147 (1986)MathSciNetzbMATHCrossRefGoogle Scholar
  4. 4.
    Broy, M., Gnatz, R., Wirsing, M.: Semantics of Nondeterministic and Noncontinuous Constructs. In: Bauer, F.L., Broy, M. (eds.) Program Construction. LNCS, vol. 69, pp. 553–592. Springer, Heidelberg (1979)CrossRefGoogle Scholar
  5. 5.
    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
  6. 6.
    Conway, J.H.: Regular Algebra and Finite Machines. Chapman and Hall (1971)Google Scholar
  7. 7.
    De Carufel, J.-L., Desharnais, J.: Demonic Algebra with Domain. In: Schmidt, R.A. (ed.) RelMiCS/AKA 2006. LNCS, vol. 4136, pp. 120–134. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  8. 8.
    Desharnais, J., Möller, B., Struth, G.: Kleene algebra with domain. ACM Transactions on Computational Logic 7(4), 798–833 (2006)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Desharnais, J., Struth, G.: Internal axioms for domain semirings. Sci. Comput. Program. 76(3), 181–203 (2011)MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Dijkstra, E.W.: A Discipline of Programming. Prentice Hall (1976)Google Scholar
  11. 11.
    Dunne, S.: Recasting Hoare and He’s Unifying Theory of Programs in the context of general correctness. In: Butterfield, A., Strong, G., Pahl, C. (eds.) 5th Irish Workshop on Formal Methods. Electronic Workshops in Computing. The British Computer Society (2001)Google Scholar
  12. 12.
    Dunne, S.E., Hayes, I.J., Galloway, A.J.: Reasoning about Loops in Total and General Correctness. In: Butterfield, A. (ed.) UTP 2008. LNCS, vol. 5713, pp. 62–81. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  13. 13.
    Guttmann, W.: General Correctness Algebra. In: Berghammer, R., Jaoua, A.M., Möller, B. (eds.) RelMiCS/AKA 2009. LNCS, vol. 5827, pp. 150–165. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  14. 14.
    Guttmann, W.: Partial, Total and General Correctness. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 157–177. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  15. 15.
    Guttmann, W.: Unifying Recursion in Partial, Total and General Correctness. In: Qin, S. (ed.) UTP 2010. LNCS, vol. 6445, pp. 207–225. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  16. 16.
    Guttmann, W.: Algebras for iteration and infinite computations (submitted, 2011)Google Scholar
  17. 17.
    Guttmann, W.: Extended designs algebraically. Sci. Comput. Program. (to appear, 2012)Google Scholar
  18. 18.
    Guttmann, W., Möller, B.: Normal design algebra. Journal of Logic and Algebraic Programming 79(2), 144–173 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  19. 19.
    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
  20. 20.
    Harel, D.: First-Order Dynamic Logic. LNCS, vol. 68. Springer, Heidelberg (1979)zbMATHCrossRefGoogle Scholar
  21. 21.
    Harel, D.: On the total correctness of nondeterministic programs. Theor. Comput. Sci. 13(2), 175–192 (1981)MathSciNetzbMATHCrossRefGoogle Scholar
  22. 22.
    Hayes, I.J., Dunne, S.E., Meinicke, L.: Unifying Theories of Programming That Distinguish Nontermination and Abort. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 178–194. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  23. 23.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580/583 (1969)zbMATHCrossRefGoogle Scholar
  24. 24.
    Hoare, C.A.R., Hayes, I.J., He, J., Morgan, C.C., Roscoe, A.W., Sanders, J.W., Sorensen, I.H., Spivey, J.M., Sufrin, B.A.: Laws of programming. Commun. ACM 30(8), 672–686 (1987)MathSciNetzbMATHCrossRefGoogle Scholar
  25. 25.
    Hoare, C.A.R., He, J.: Unifying theories of programming. Prentice Hall Europe (1998)Google Scholar
  26. 26.
    Jackson, M., Stokes, T.: Semigroups with if-then-else and halting programs. International Journal of Algebra and Computation 19(7), 937–961 (2009)MathSciNetzbMATHCrossRefGoogle Scholar
  27. 27.
    Jacobs, D., Gries, D.: General correctness: A unification of partial and total correctness. Acta Inf. 22(1), 67–83 (1985)MathSciNetzbMATHCrossRefGoogle Scholar
  28. 28.
    Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular events. Information and Computation 110(2), 366–390 (1994)MathSciNetzbMATHCrossRefGoogle Scholar
  29. 29.
    Kozen, D.: On Hoare logic and Kleene algebra with tests. ACM Transactions on Computational Logic 1(1), 60–76 (2000)MathSciNetCrossRefGoogle Scholar
  30. 30.
    Meertens, L.: Abstracto 84: The next generation. In: Martin, A.L., Elshoff, J.L. (eds.) ACM 1979: Proceedings of the 1979 Annual Conference, pp. 33–39. ACM Press (1979)Google Scholar
  31. 31.
    Möller, B.: The Linear Algebra of UTP. In: Uustalu, T. (ed.) MPC 2006. LNCS, vol. 4014, pp. 338–358. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  32. 32.
    Möller, B.: Kleene getting lazy. Sci. Comput. Program. 65(2), 195–214 (2007)zbMATHCrossRefGoogle Scholar
  33. 33.
    Möller, B., Struth, G.: Algebras of modal operators and partial correctness. Theor. Comput. Sci. 351(2), 221–239 (2006)zbMATHCrossRefGoogle Scholar
  34. 34.
    Möller, B., Struth, G.: wp Is wlp. In: MacCaull, W., Winter, M., Düntsch, I. (eds.) RelMiCS 2005. LNCS, vol. 3929, pp. 200–211. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  35. 35.
    Morgan, C.: The specification statement. ACM Trans. Progr. Lang. Syst. 10(3), 403–419 (1988)zbMATHCrossRefGoogle Scholar
  36. 36.
    Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Program. 9(3), 287–306 (1987)zbMATHCrossRefGoogle Scholar
  37. 37.
    Morris, J.M.: Varieties of weakest liberal preconditions. Inf. Process. Lett. 25(3), 207–210 (1987)CrossRefGoogle Scholar
  38. 38.
    Nelson, G.: A generalization of Dijkstra’s calculus. ACM Trans. Progr. Lang. Syst. 11(4), 517–561 (1989)CrossRefGoogle Scholar
  39. 39.
    von Wright, J.: Towards a refinement algebra. Sci. Comput. Program. 51(1-2), 23–45 (2004)zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Walter Guttmann
    • 1
  1. 1.Institut für Programmiermethodik und CompilerbauUniversität UlmGermany

Personalised recommendations