Skip to main content

How to Cook a Complete Hoare Logic for Your Pet OO Language

  • Conference paper
Formal Methods for Components and Objects (FMCO 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3188))

Included in the following conference series:

Abstract

This paper introduces a general methodology for obtaining complete Hoare logics for object-oriented languages. The methodology is based on a new completeness result of a Hoare logic for a procedural language with dynamically allocated variables. This new result involves a generalization of Gorelick’s seminal completeness result of the standard Hoare logic for recursive procedures with simple variables. We show how this completeness result can be generalized to existing Hoare logics for typical object-oriented concepts like method calls, sub-typing and inheritance, and dynamic binding, by transforming an encoding of these concepts into this procedural language with dynamically allocated variables.

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

Access this chapter

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 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Leino, R.: A logic of object-oriented programs. In: Bidoit, M., Dauchet, M. (eds.) CAAP 1997, FASE 1997, and TAPSOFT 1997. LNCS, vol. 1214, pp. 682–696. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  2. Ábrahám-Mumm, E., de Boer, F.S., de Roever, W.-P., 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)

    Chapter  Google Scholar 

  3. Apt, K.R.: Ten Years of Hoare’s Logic: A Survey - Part I. ACM Transactions on Programming Languages and Systems 3(4), 431–483 (1981)

    Article  MATH  Google Scholar 

  4. Cook, S.A.: Soundness and completeness of an axiom system for program verification. Siam Journal of Computing 7(1), 70–90 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  5. de Bakker, J.: Mathematical theory of program correctness. Prentice-Hall, Englewood Cliffs (1980)

    MATH  Google Scholar 

  6. de Boer, F.: Reasoning about dynamically evolving process structures. PhD thesis, Vrije Universiteit (1991)

    Google Scholar 

  7. 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 

  8. Ebbinghaus, H.-D., Flum, J.: Finite Model Theory. Springer, Heidelberg (1995)

    MATH  Google Scholar 

  9. Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation (PLDI), pp. 234–245 (2002)

    Google Scholar 

  10. Floyd, R.W.: Assigning meaning to programs. In: Proc. Symposium on Applied Mathematics, vol. 19, pp. 19–32. American Mathematical Society, Providence (1967)

    Google Scholar 

  11. Gorelick, G.: A complete axiomatic system for proving assertions about recursive and non-recursive programs. Technical Report 75, Dep. Computer Science, Univ. Toronto (1975)

    Google Scholar 

  12. Gosling, J., Joy, B., Steele, G.: The Java Language Specification. Addison Wesley, Reading (1996)

    MATH  Google Scholar 

  13. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  14. Hoare, T.: Assertions. In: Broy, M., Pizka, M. (eds.) Models, Algebras and Logic of Engineering Software. NATO Science Series, vol. 191, pp. 291–316. IOS Press, Amsterdam (2003)

    Google Scholar 

  15. Jeffrey, A., Rathke, J.: A fully abstract testing semantics for concurrent objects. In: Proceedings of Logics in Computer Science, pp. 101–112 (2002)

    Google Scholar 

  16. Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1992)

    MATH  Google Scholar 

  17. Nipkow, T.: Hoare logics for recursive procedures and unbounded nondeterminism. In: Bradfield, J.C. (ed.) CSL 2002 and EACSL 2002. LNCS, vol. 2471, pp. 103–119. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  18. Olderog, E.-R., Apt, K.R.: Fairness in parallel programs: The transformational approach. TOPLAS 10(3), 420–455 (1988)

    Article  Google Scholar 

  19. Owicki, S., Gries, D.: An axiomatic proof technique for parallel programs I. Acta Informatica 6, 319–340 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  20. Pierik, C., de Boer, F.S.: A syntax-directed Hoare logic for object-oriented programming concepts. In: Najm, E., Nestmann, U., Stevens, P. (eds.) FMOODS 2003. LNCS, vol. 2884, pp. 64–78. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  21. 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 (March 2003), Available from http://www.cs.uu.nl/research/techreps/UU-CS-2003-010.html

  22. Poetzsch-Heffter, A., Müller, P.O.: A programming logic for sequential Java. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 162–176. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  23. Tucker, J., Zucker, J.: Program correctness over abstract data types with errorstate semantics. North-Holland, Amsterdam (1988)

    MATH  Google Scholar 

  24. von Oheimb, D.: Hoare logic for Java in Isabelle/HOL. Concurrency and Computation: Practice and Experience 13(13), 1173–1214 (2001)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

de Boer, F.S., Pierik, C. (2004). How to Cook a Complete Hoare Logic for Your Pet OO Language. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, WP. (eds) Formal Methods for Components and Objects. FMCO 2003. Lecture Notes in Computer Science, vol 3188. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30101-1_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30101-1_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22942-1

  • Online ISBN: 978-3-540-30101-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics