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.
Following a null pointer
-
2.
Deletion of an accessible object
-
3.
Failure to delete an inaccessible object
-
4.
Interference due to equality of pointers
-
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.
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 (1998).
L. Cardelli. A semantics of multiple inheritance. Information and Computation 76: 138–164 (1988).
W. Cook and J. Palsberg. A denotational semantics of inheritance and its correctness. Information and Computation 114(2), 329–350 (1994).
S. Curtis and G. Lowe, A graphical calculus. In B. Möller (ed) Mathematics of Program Construction LNCS 947 Springer (1995)
O. Dahl and K. Nygaard. Simula, an Algol-based simulation language. Communications of the ACM 9(9) 671–678 (1966).
A. Goldberg and D. Robson. Smalltalk-80. The language and its implementation. Addison-Wesley (1983).
C.A.R. Hoare, Communicating Sequential Processes. Prentice-Hall (1985).
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).
P.J. Landin, A correspondence between ALGOL 60 and Church’s lambda-notation Part 1. Communications ACM 8.2 (1965) 89–101
B. Meyer. Object-oriented Software Construction, Prentice-Hall second edition (1997).
R. Milner. Communication and Concurrency, Prentice Hall (1987)
B. Möller, Towards pointer algebra. Science of Computer Programming 21 (1993), 57–90.
B. Möoller, Calculating with pointer structures. Proceedings of Mathematics for Software Construction, Chapman and Hall (1997), 24–48.
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).
G. Nelson, Verifying reachability invariants of linked structures. Proceedings of POPL (1983), ACM Press, 38–47.
N. Suzuki, Analysis of pointer rotation. Communications ACM vol 25 No 5, May (1982), 330–335.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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