Skip to main content

A Trace Model for Pointers and Objects

  • Conference paper
  • First Online:
ECOOP’ 99 — Object-Oriented Programming (ECOOP 1999)

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

Included in the following conference series:

Abstract

Object-oriented programs [Dahl, Goldberg, Meyer] are notoriously prone to the following kinds of error, which could lead to increasingly severe problems in the presence of tasking

  1. 1.

    Following a null pointer

  2. 2.

    Deletion of an accessible object

  3. 3.

    Failure to delete an inaccessible object

  4. 4.

    Interference due to equality of pointers

  5. 5.

    Inhibition of optimisation due to fear of (4)

Type disciplines and object classes are a great help in avoiding these errors. Stronger protection may be obtainable with the help of assertions, particularly invariants, which are intended to be true before and after each call of a method that updates the structure of the heap. This note introduces a mathematical model and language for the formulation of assertions about objects and pointers, and suggests that a graphical calculus [Curtis, Lowe] may help in reasoning about program correctness. It deals with both garbage-collected heaps and the other kind. The theory is based on a trace model of graphs, using ideas from process algebra; and our development seeks to exploit this analogy as a unifying principle.

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. M. Abadi and L. Cardelli. A theory of objects. Springer (1998).

    Google Scholar 

  2. L. Cardelli. A semantics of multiple inheritance. Information and Computation 76: 138–164 (1988).

    Article  MathSciNet  MATH  Google Scholar 

  3. W. Cook and J. Palsberg. A denotational semantics of inheritance and its correctness. Information and Computation 114(2), 329–350 (1994).

    Article  MathSciNet  Google Scholar 

  4. S. Curtis and G. Lowe, A graphical calculus. In B. Möller (ed) Mathematics of Program Construction LNCS 947 Springer (1995)

    Google Scholar 

  5. O. Dahl and K. Nygaard. Simula, an Algol-based simulation language. Communications of the ACM 9(9) 671–678 (1966).

    Article  MATH  Google Scholar 

  6. A. Goldberg and D. Robson. Smalltalk-80. The language and its implementation. Addison-Wesley (1983).

    Google Scholar 

  7. C.A.R. Hoare, Communicating Sequential Processes. Prentice-Hall (1985).

    Google Scholar 

  8. S.N. Kamin and U.S. Reddy. Two semantic models of object-oriented languages. In C.A. Gunter and J.C. Mitchell (eds): Theoretical Aspects of Object-Oriented Programming, 463–495, MIT Press, (1994).

    Google Scholar 

  9. P.J. Landin, A correspondence between ALGOL 60 and Church’s lambda-notation Part 1. Communications ACM 8.2 (1965) 89–101

    Article  MathSciNet  Google Scholar 

  10. B. Meyer. Object-oriented Software Construction, Prentice-Hall second edition (1997).

    Google Scholar 

  11. R. Milner. Communication and Concurrency, Prentice Hall (1987)

    Google Scholar 

  12. B. Möller, Towards pointer algebra. Science of Computer Programming 21 (1993), 57–90.

    Article  MATH  MathSciNet  Google Scholar 

  13. B. Möoller, Calculating with pointer structures. Proceedings of Mathematics for Software Construction, Chapman and Hall (1997), 24–48.

    Google Scholar 

  14. J.M. Morris, A general axiom of assignment, Assignment and linked data structure, A proof of the Schorr-Waite algorithm. In M. Broy and G. Schmidt (eds.) Theoretical Foundations of Programming Methodology, 25–51, Reidel 1982 (Proceedings of the 1981 Marktoberdorf Summer School).

    Google Scholar 

  15. G. Nelson, Verifying reachability invariants of linked structures. Proceedings of POPL (1983), ACM Press, 38–47.

    Google Scholar 

  16. N. Suzuki, Analysis of pointer rotation. Communications ACM vol 25 No 5, May (1982), 330–335.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hoare, C.A.R., Jifeng, H. (1999). A Trace Model for Pointers and Objects. In: Guerraoui, R. (eds) ECOOP’ 99 — Object-Oriented Programming. ECOOP 1999. Lecture Notes in Computer Science, vol 1628. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48743-3_1

Download citation

  • DOI: https://doi.org/10.1007/3-540-48743-3_1

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66156-6

  • Online ISBN: 978-3-540-48743-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics