Advertisement

A logic of object-oriented programs

  • Martín Abadi
  • K. Rustan M. Leino
III FASE FASE-5: Semantics
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1214)

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.

Keywords

Transition Relation Operational Semantic Object Type Unary Predicate Method Invocation 
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.

References

  1. [AC96]
    M. Abadi and L. Cardelli. A Theory of Objects. Springer-Verlag, New York, 1996.Google Scholar
  2. [Apt81]
    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.CrossRefGoogle Scholar
  3. [Cla79]
    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.CrossRefGoogle Scholar
  4. [Flo67]
    R.W. Floyd. Assigning meanings to programs. In Proceedings of the Symposium on Applied Math., Vol. 19, pages 19–32. American Mathematical Society, 1967.Google Scholar
  5. [Har94]
    R. Harper. A simplified account of polymorphic references. Information Processing Letters, 51:201–206, 1994.CrossRefGoogle Scholar
  6. [Hoa69]
    C.A.R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576–583, October 1969.CrossRefGoogle Scholar
  7. [Jon92]
    C.B. Jones. An object-based design method for concurrent programs. Technical Report UMCS-92-12-1, University of Manchester, 1992.Google Scholar
  8. [Lea89]
    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.Google Scholar
  9. [Lea91]
    G.T. Leavens. Modular specification and verification of object-oriented programs. IEEE Software, pages 72–80, July 1991.Google Scholar
  10. [Lei95]
    K.R.M. Leino. Toward Reliable Modular Programs. PhD thesis, California Institute of Technology, 1995. Available as Technical Report Caltech-CS-TR-95-03.Google Scholar
  11. [Ler92]
    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.Google Scholar
  12. [LH92]
    K. Lano and H. Haughton. Reasoning and refinement in object-oriented specification languages. In Ole Lehrmann Madsen, editor, Proceedings of the 6th European Conference on Object-Oriented Programming (ECOOP), pages 78–97. Springer-Verlag LNCS 615, June 1992.Google Scholar
  13. [LH94]
    K. Lano and H. Haughton. Object-Oriented Specification Case Studies. Prentice Hall, New York, 1994.Google Scholar
  14. [LW94]
    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.CrossRefGoogle Scholar
  15. [MS88]
    A.R. Meyer and K. Sieber. Towards fully abstract semantics for local variables: Preliminary report. In Conference Record of the Fifteenth Annual ACM Symposium on Principles of Programming Languages, pages 191–203, January 1988.Google Scholar
  16. [OG76]
    S. Owicki and D. Gries. An axiomatic proof technique for parallel programs. Acta Informatica, 6(4):319–340, 1976.CrossRefGoogle Scholar
  17. [OT95]
    P.W. O'Hearn and R.D. Tennent. Parametricity and local variables. Journal of the ACM, 42(3):658–709, May 1995.CrossRefGoogle Scholar
  18. [PPS96]
    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.Google Scholar
  19. [PS93]
    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, Berlin, 1993.Google Scholar
  20. [SG95]
    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.CrossRefGoogle Scholar
  21. [SSC95]
    A. Sernadas, C. Sernadas, and J.F. Costa. Object specification logic. Journal of Logic and Computation, 5(5):603–630, 1995.Google Scholar
  22. [Tof90]
    M. Tofte. Type inference for polymorphic references. Information and Computation, 89(1):1–34, November 1990.CrossRefMathSciNetGoogle Scholar
  23. [WF94]
    A.K. Wright and M. Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38–94, November 1994.CrossRefGoogle Scholar
  24. [YT87]
    A. Yonezawa and M. Tokoro, editors. Object-oriented Concurrent Programming. MIT Press, 1987.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Martín Abadi
    • 1
  • K. Rustan M. Leino
    • 1
  1. 1.Systems Research CenterDigital Equipment CorporationUSA

Personalised recommendations