Abstract
Containment of objects is a natural concept that has been poorly supported in object-oriented programming languages. For a predefined set of ownership contexts, this paper presents a type system that enforces certain containment relationships for run-time objects. A fixed ordering relationship is presumed between the owners.
The formalisation of ownership types has developed from our work with flexible alias protection together with an investigation of structural properties of object graphs based on dominator trees. Our general ownership type system permits fresh ownership contexts to be created at run-time. Here we present a simplified system in which the ownership contexts are predefined. This is powerful enough to express and enforce constraints about a system’s high-level structure.
Our formal system is presented in an imperative variant of the object calculus. We present type preservation and soundness results. Furthermore we highlight how these type theoretic results establish a containment invariant for objects, in which access to contained objects is only permitted via their owners. In effect, the predefined ownership ordering restricts the permissible inter-object reference structure.
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
Martín Abadi and Luca Cardelli. A Theory of Objects. Springer-Verlag, 1996.
Jonathan Aldrich, Craig Chambers, Emin Gun Sirer, and Susan Eggers. Static analyses for eliminating unnecessary synchronization from Java programs. In Sixth International Static Analysis Symposium. Springer-Verlag, September 1999.
Paulo Sérgio Almeida. Balloon Types: Controlling sharing of state in data types. In ECOOP Proceedings, June 1997.
David F. Bacon, Robert E. Strom, and Ashis Tarafdar. Guava: A dialect of Java without data races. In OOPSLA’00 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, volume 35, pages 382–400, New York, October 2000. ACM Press.
Henry G. Baker. ’Use-once’ variables and linear objects-storage management, reflection and multi-threading. ACM SIGPLAN Notices, 30(1), January 1995.
Bruno Blanchet. Escape analysis for object-oriented languages. application to Java. In OOPSLA Proceedings, pages 20–34. ACM, 1999.
Jeff Bogda and Urs Hölzle. Removing unnecessary synchronization in Java. In OOPSLA Proceedings, pages 35–46. ACM, 1999.
Boris Bokowski and Jan Vitek. Confined Types. In OOPSLA Proceedings, 1999.
John Boyland. Alias burying. Software—Practice & Experience, 2001. To appear.
Edwin C. Chan, John T. Boyland, and William L. Scherlis. Promises: Limitied specifications for analysis and manipulation. In IEEE International Conference on Software Engineering (ICSE), 1998.
Jong-Deok Choi, M. Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. Escape analysis for Java. In OOPSLA Proceedings, pages 1–19. ACM, 1999.
Franco Civello. Roles for composite objects in object-oriented analysis and design. In OOPSLA Proceedings, 1993.
David Clarke. An object calculus with ownership and containment. In Foundations of Object-Oriented Languages (FOOL) 2001, 2001.
David Clarke. Object Ownership and Containment. PhD thesis, School of Computer Science and Engineering, University of New SouthWales, Sydney, Australia, 2001. In preparation.
David G. Clarke, John M. Potter, and James Noble. Ownership types for flexible alias protection. In OOPSLA Proceedings, 1998.
Alain Deutsch. Interprocedural May-Alias Analysis for Pointers: Beyond klimiting. In Proceedings of the ACM SIGPLAN’94 Conference on Programming Language Design and Implementation, June 1994.
Jin Song Dong and Roger Duke. Exclusive control within object oriented systems. In TOOLS Pacific 18, 1995.
Daniela Genius, Martin Trapp, and Wolf Zimmermann. An approach to improve locality using sandwich types. In Proceedings of the 2nd Types in Compilation workshop, number 1473 in Lecture Notes in Computer Science, pages 194–214, Kyoto, Japan, March 1998. Springer-Verlag.
A. D. Gordon, P. D. Hankin, and S. B. Lassen. Compilation and equivalence of imperative objects. Journal of Functional Programming, 9(4):373–426, July 1999.
Peter Grogono and Patrice Chalin. Copying, sharing, and aliasing. In Proceedings of the Colloquium on Object Orientation in Databases and Software Engineering (COODBSE’94), Montreal, Quebec, May 1994.
Douglas E. Harms and Bruce W. Weide. Copying and swapping: Influences on the design of reusable software components. IEEE Transactions on Software Engineering, 17(5), May 1991.
Laurie J. Hendren and G. R. Gao. Designing programming languages for analyzability: A fresh look at pointer data structures. In Proceedings of the IEEE 1992 International Conference on Programming Languages, April 1992.
John Hogg. Islands: Aliasing protection in object-oriented languages. In OOPSLA Proceedings, November 1991.
John Hogg, Doug Lea, Alan Wills, Dennis de Champeaux, and Richard Holt. The Geneva convention on the treatment of object aliasing. OOPS Messenger, 3(2), April 1992.
Neil D. Jones and Steven Muchnick. Flow analysis and optimization of LISPlike structures. In Steven Muchnick and Neil D. Jones, editors, Program Flow Analysis: Theory and Applications. Prentice Hall, 1981.
Stuart Kent and Ian Maung. Encapsulation and aggregation. In TOOLS Pacific 18, 1995.
William Landi. Undecidability of static analysis. ACM Letters on Programming Languages and Systems, 1(4), December 1992.
K. Rustan M. Leino and Raymie Stata. Virginity: A contribution to the specification of object-oriented software. Technical Report SRC-TN-97-001, Digital Systems Research Center, April 1997.
Bertrand Meyer. Eiffel: The Language. Prentice Hall, 1992.
Naftaly Minsky. Towards alias-free pointers. In ECOOP Proceedings, July 1996.
P. Müller and A. Poetzsch-Heffter. Universes: A type system for controlling representation exposure. In A. Poetzsch-Heffter and J. Meyer, editors, Programming Languages and Fundamentals of Programming. Fernuniversitäat Hagen, 1999.
James Noble, David Clarke, and John Potter. Object ownership for dynamic alias protection. In TOOLS Pacific, Melbourne, Australia, November 1999.
James Noble, Jan Vitek, and Doug Lea. Report of the Intercontinental Workshop on Aliasing in Object-Oriented Systems, volume 1743 of Lecture Notes in Computer Science. Springer, Berlin, Heidelberg, New York, 2000.
James Noble, Jan Vitek, and John Potter. Flexible alias protection. In Eric Jul, editor, ECOOP’98— Object-Oriented Programming, volume 1445 of Lecture Notes In Computer Science, pages 158–185, Berlin, Heidelberg, New York, July 1998. Springer-Verlag.
John Potter and James Noble. Conglomeration: Realising aliasing protection. In Proceedings of the Australian Computer Science Conference (ACSC), Canberra, January 2000.
John Potter, James Noble, and David Clarke. The ins and outs of objects. In Australian Software Engineering Conference, Adelaide, Australia, November 1998. IEEE Press.
Amr Sabry and Matthias Felleisen. Reasoning about programs in continuationpassing style. In 1992 ACM Conference on LISP and Functional Programming, pages 288–298, San Francisco, CA, June 1992. ACM.
John Whaley and Martin Rinard. Compositional pointer and escape analysis for Java programs. In OOPSLA’99 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, volume 34, pages 187–206, New York, October 1999. ACM Press.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Clarke, D.G., Noble, J., Potter, J.M. (2001). Simple Ownership Types for Object Containment. In: Knudsen, J.L. (eds) ECOOP 2001 — Object-Oriented Programming. ECOOP 2001. Lecture Notes in Computer Science, vol 2072. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45337-7_4
Download citation
DOI: https://doi.org/10.1007/3-540-45337-7_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42206-8
Online ISBN: 978-3-540-45337-6
eBook Packages: Springer Book Archive