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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Á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)
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)
Cook, S.A.: Soundness and completeness of an axiom system for program verification. Siam Journal of Computing 7(1), 70–90 (1978)
de Bakker, J.: Mathematical theory of program correctness. Prentice-Hall, Englewood Cliffs (1980)
de Boer, F.: Reasoning about dynamically evolving process structures. PhD thesis, Vrije Universiteit (1991)
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)
Ebbinghaus, H.-D., Flum, J.: Finite Model Theory. Springer, Heidelberg (1995)
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)
Floyd, R.W.: Assigning meaning to programs. In: Proc. Symposium on Applied Mathematics, vol. 19, pp. 19–32. American Mathematical Society, Providence (1967)
Gorelick, G.: A complete axiomatic system for proving assertions about recursive and non-recursive programs. Technical Report 75, Dep. Computer Science, Univ. Toronto (1975)
Gosling, J., Joy, B., Steele, G.: The Java Language Specification. Addison Wesley, Reading (1996)
Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)
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)
Jeffrey, A., Rathke, J.: A fully abstract testing semantics for concurrent objects. In: Proceedings of Logics in Computer Science, pp. 101–112 (2002)
Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1992)
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)
Olderog, E.-R., Apt, K.R.: Fairness in parallel programs: The transformational approach. TOPLAS 10(3), 420–455 (1988)
Owicki, S., Gries, D.: An axiomatic proof technique for parallel programs I. Acta Informatica 6, 319–340 (1976)
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)
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
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)
Tucker, J., Zucker, J.: Program correctness over abstract data types with errorstate semantics. North-Holland, Amsterdam (1988)
von Oheimb, D.: Hoare logic for Java in Isabelle/HOL. Concurrency and Computation: Practice and Experience 13(13), 1173–1214 (2001)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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