A Syntax-Directed Hoare Logic for Object-Oriented Programming Concepts

  • Cees Pierik
  • Frank S. de Boer
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2884)


This paper outlines a sound and complete Hoare logic for a sequential object-oriented language with inheritance and subtyping like Java. It describes a weakest precondition calculus for assignments and object-creation, as well as Hoare rules for reasoning about (mutually recursive) method invocations with dynamic binding. Our approach enables reasoning at an abstraction level that coincides with the general abstraction level of object-oriented languages.


Method Call Abstraction Level Correctness Formula Instance Variable Dynamic Binding 
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.


  1. 1.
    Poetzsch-Heffter, A., Müller, P.: A programming logic for sequential Java. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 162–176. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  2. 2.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12, 576–580 (1969)CrossRefzbMATHGoogle Scholar
  3. 3.
    Pierik, C., de Boer, F.S.: A syntax-directed Hoare logic for object-oriented programming concepts. Technical Report UU-CS-2003-010, Institute of Information and Computing Sciences, Utrecht University, The Netherlands (2003), Available at
  4. 4.
    Kowaltowski, T.: Axiomatic approach to side effects and general jumps. Acta Informatica 7, 357–360 (1977)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Gosling, J., Joy, B., Steele, G.: The Java Language Specification. Addison-Wesley, Reading (1996)zbMATHGoogle Scholar
  6. 6.
    Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: A behavioral interface specification language for Java. Technical Report 98-06u, Department of Computer Science, Iowa State University (2003)Google Scholar
  7. 7.
    de Boer, F.S.: A wp-calculus for OO. In: Thomas, W. (ed.) FOSSACS 1999. LNCS, vol. 1578, pp. 135–149. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    de Boer, F., Pierik, C.: Computer-aided specification and verification of annotated object-oriented programs. In: Jacobs, B., Rensink, A. (eds.) FMOODS V, pp. 163–177. Kluwer Academic Publishers, Dordrecht (2002)Google Scholar
  9. 9.
    Reus, B., Wirsing, M., Hennicker, R.: A Hoare calculus for verifying Java realizations of OCL-constrained design models. In: Hussmann, H. (ed.) FASE 2001. LNCS, vol. 2029, pp. 300–317. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  10. 10.
    von Oheimb, D.: Hoare logic for Java in Isabelle/HOL. Concurrency and Computation: Practice and Experience 13, 1173–1214 (2001)CrossRefzbMATHGoogle Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Abraham-Mumm, E., de Boer, F., de Roever, W., Steffen, M.: Verification for Java’s reentrant multithreading concept. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 5–20. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  13. 13.
    Distefano, D., Katoen, J.P., Rensink, A.: On a temporal logic for object-based systems. In: Smith, S.F., Talcott, C.L. (eds.) FMOODS III, pp. 305–326. Kluwer Academic Publishers, Dordrecht (2000)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2003

Authors and Affiliations

  • Cees Pierik
    • 1
  • Frank S. de Boer
    • 1
    • 2
  1. 1.Institute of Information and Computing SciencesUtrecht UniversityThe Netherlands
  2. 2.CWIAmsterdamThe Netherlands

Personalised recommendations