Abstract
We develop a logic for reasoning about object-oriented programs. The logic is for a language with an imperative semantics and aliasing, and accounts for self-reference in objects. It is much like a type system for objects with subtyping, but our specifications go further than types in detailing pre- and postconditions. We intend the logic as an analogue of Hoare logic for object-oriented programs. Our main technical result is a soundness theorem that relates the logic to a standard operational semantics.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
M. Abadi and L. Cardelli. A Theory of Objects. Springer-Verlag, 1996.
M. Abadi and K. R. M. Leino. A logic of object-oriented programs. In TAPSOFT’ 97: Theory and Practice of Software Development, volume 1214 of Lecture Notes in Computer Science, pages 682-696. Springer-Verlag, April 1997.
K. R. Apt. Ten years of Hoare’s logic: A survey—Part I. ACM Transactions on Programming Languages and Systems, 3(4):431–483, October 1981.
J. Barwise. An introduction to first-order logic. In J. Barwise, editor, The Handbook of Mathematical Logic, Studies in Logic and Foundations of Mathematics, pages 5-46. North Holland, 1977.
E. M. Clarke. Programming language constructs for which it is impossible to obtain good Hoare axiom systems. Journal of the ACM, 26(1):129–147, January 1979.
F. S. de Boer. A proof system for the parallel object-oriented laguage POOL. In M. S. Paterson, editor, Proceedings of the Seventeenth International Colloquium on Automata, Languages and Programming, volume 443 of Lecture Notes in Computer Science, pages 572-585. Springer-Verlag, 1990.
Special issue: formal techniques for Java programs. Concurrency and Computation: Practice and Experience, 13(13), November 2001. Edited by S. Eisenbach and G. T. Leavens.
C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. ACM SIGPLAN Notices, 37(5):234-245, June 2002. Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation.
R. W. Floyd. Assigning meanings to programs. In Proceedings of the Sym posium on Applied Math., Vol. 19, pages 19-32. American Mathematical Society, 1967.
R. Harper. A simplified account of polymorphic references. Information Processing Letters, 51:201–206, 1994.
C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576–583, October 1969.
M. Hofmann and F. Tang. Implementing a program logic of objects in a higherorder logic theorem prover. In Theorem Proving in Higher Order Logics, 13th International Conference, TPHOLs 2000, volume 1869 of Lecture Notes in Computer Science, pages 268-282. Springer-Verlag, 2000.
B. Jacobs and E. Poll. Coalgebras and monads in the semantics of Java. Theoretical Computer Science, 291(3):329–349, 2003.
C. B. Jones. An object-based design method for concurrent programs. Technical Report UMCS-92-12-1, University of Manchester, 1992.
K. Lano and H. Haughton. Reasoning and refinement in object-oriented specification languages. In O. L. Madsen, editor, Proceedings of the 6th Euro pean Conference on Object-Oriented Programming (ECOOP), volume 615 of Lecture Notes in Computer Science, pages 78-97. Springer-Verlag, June 1992.
K. Lano and H. Haughton. Object-Oriented Specification Case Studies. Prentice Hall, New York, 1994.
G. T. Leavens. Verifying Object-Oriented Programs that Use Subtypes. PhD thesis, MIT Laboratory for Computer Science, February 1989. Available as Technical Report MIT/LCS/TR-439.
G. T. Leavens. Modular specification and verification of object-oriented programs. IEEE Software, pages 72-80, July 1991.
K. R. M. Leino. Toward Reliable Modular Programs. PhD thesis, California Institute of Technology, 1995. Available as Technical Report Caltech-CS-TR-95-03.
K. R. M. Leino. Recursive object types in a logic of object-oriented programs. Nordic Journal of Computing, 5(4):330–360, 1998.
K. R. M. Leino and G. Nelson. Data abstraction and information hiding. ACM Transactions on Programming Languages and Systems, 24(5):491–553, September 2002.
X. Leroy. Polymorphic typing of an algorithmic language. Technical report, Institut National de Recherche en Informatique et en Automatique, October 1992. English version of the author’s PhD thesis.
B. H. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems, 16(6):1811–1841, November 1994.
A. R. Meyer and K. Sieber. Towards fully abstract semantics for local variables: Preliminary report. In Conference Record of the Fi f teenth Annual ACM Sym posium on Principles of Programming Languages, pages 191-203, January 1988.
P. Müller. Modular Specification and Verification of Object-Oriented Programs, volume 2262 of Lecture Notes in Computer Science. Springer-Verlag, 2002. PhD thesis, FernUniversität Hagen.
P. W. O’Hearn and R. D. Tennent. Parametricity and local variables. Journal of the ACM, 42(3):658–709, May 1995.
S. Owicki and D. Gries. An axiomatic proof technique for parallel programs. Acta Informatica, 6(4):319–340, 1976.
S. Peyton Jones, W. Partain, and A. Santos. Let-floating: moving bindings to give faster programs. In Proceedings of the 1996 ACM SIGPLAN International Conference on Functional Programming (ICFP’ 96), pages 1-12, May 1996.
A. M. Pitts and I. D. B. Stark. Observable properties of higher order functions that dynamically create local names, or: What’s new? In Mathematical Foundations of Computer Science, Proc. 18th Int. Symp., Gdańsk, 1993, volume 711 of Lecture Notes in Computer Science, pages 122-141. Springer-Verlag, 1993.
A. Poetzsch-Heffter. Specification and verification of object-oriented programs. Habilitationsschrift, Technische Universität München, 1997. Available at www.eickel.informatik.tu-muenchen.de/persons/poetzsch/habil.ps.gz.
A. Poetzsch-Heffter and P. Müller. Logical foundations for typed object-oriented languages. In D. Gries and W.-P. de Roever, editors, Programming Concepts and Methods (PROCOMET’98), IFIP, pages 404-423. Chapman & Hall, June 1998.
B. Reus and T. Streicher. Semantics and logic of object calculi. In Proceedings of the Seventeenth Annual IEEE Symposium on Logic in Computer Science, pages 113-122, July 2002.
A. Sernadas, C. Sernadas, and J. F. Costa. Object specification logic. Journal of Logic and Computation, 5(5):603–630, 1995.
R. Stata and J. V. Guttag. Modular reasoning in the presence of subclassing. ACM SIGPLAN Notices, 30(10):200-214, October 1995. OOPSLA’ 95 conference proceedings.
F. H.-L. Tang. Towards feasible, machine-assisted verification of object-oriented programs. PhD thesis, University of Edinburgh, 2002. Available at www.dcs.ed.ac.uk/home/fhlt/docs/fhlt-thesis.pdf.
M. Tofte. Type inference for polymorphic references. Information and Computation, 89(1):1–34, November 1990.
M. Utting. An Object-Oriented Refinement Calculus with Modular Reasoning. PhD thesis, University of New South Wales, 1992. Available at www.cs.waikato.ac.nz/~marku/phd.html.
J. van den Berg and B. Jacobs. The LOOP compiler for Java and JML. In Tools and Algorithms for the Construction and Analysis of Systems, 7th International Conference, TACAS 2001 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2001, Proceedings, volume 2031, pages 299-313, 2001.
D. von Oheimb. Hoare logic for Java in Isabelle/HOL. Concurrency and Computation: Practice and Experience, 13(13):1173–1214, November 2001.
D. von Oheimb and T. Nipkow. Hoare logic for NanoJava: Auxiliary variables, side effects and virtual methods revisited. In Formal Methods — Getting IT Right, volume 2391 of Lecture Notes in Computer Science, pages 89-105. Springer-Verlag, July 2002.
A. K. Wright and M. Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38–94, November 1994.
A. Yonezawa and M. Tokoro, editors. Object-oriented Concurrent Programming. MIT Press, 1987.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Abadi, M., Leino, K.R.M. (2003). A Logic of Object-Oriented Programs. In: Dershowitz, N. (eds) Verification: Theory and Practice. Lecture Notes in Computer Science, vol 2772. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39910-0_2
Download citation
DOI: https://doi.org/10.1007/978-3-540-39910-0_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21002-3
Online ISBN: 978-3-540-39910-0
eBook Packages: Springer Book Archive