Skip to main content

Simple Ownership Types for Object Containment

  • Conference paper
  • First Online:
ECOOP 2001 — Object-Oriented Programming (ECOOP 2001)

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

Included in the following conference series:

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.

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. Martín Abadi and Luca Cardelli. A Theory of Objects. Springer-Verlag, 1996.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. Paulo Sérgio Almeida. Balloon Types: Controlling sharing of state in data types. In ECOOP Proceedings, June 1997.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. Henry G. Baker. ’Use-once’ variables and linear objects-storage management, reflection and multi-threading. ACM SIGPLAN Notices, 30(1), January 1995.

    Google Scholar 

  6. Bruno Blanchet. Escape analysis for object-oriented languages. application to Java. In OOPSLA Proceedings, pages 20–34. ACM, 1999.

    Google Scholar 

  7. Jeff Bogda and Urs Hölzle. Removing unnecessary synchronization in Java. In OOPSLA Proceedings, pages 35–46. ACM, 1999.

    Google Scholar 

  8. Boris Bokowski and Jan Vitek. Confined Types. In OOPSLA Proceedings, 1999.

    Google Scholar 

  9. John Boyland. Alias burying. Software—Practice & Experience, 2001. To appear.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. Franco Civello. Roles for composite objects in object-oriented analysis and design. In OOPSLA Proceedings, 1993.

    Google Scholar 

  13. David Clarke. An object calculus with ownership and containment. In Foundations of Object-Oriented Languages (FOOL) 2001, 2001.

    Google Scholar 

  14. David Clarke. Object Ownership and Containment. PhD thesis, School of Computer Science and Engineering, University of New SouthWales, Sydney, Australia, 2001. In preparation.

    Google Scholar 

  15. David G. Clarke, John M. Potter, and James Noble. Ownership types for flexible alias protection. In OOPSLA Proceedings, 1998.

    Google Scholar 

  16. 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.

    Google Scholar 

  17. Jin Song Dong and Roger Duke. Exclusive control within object oriented systems. In TOOLS Pacific 18, 1995.

    Google Scholar 

  18. 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.

    Chapter  Google Scholar 

  19. 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.

    Article  MATH  MathSciNet  Google Scholar 

  20. 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.

    Google Scholar 

  21. 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.

    Google Scholar 

  22. 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.

    Google Scholar 

  23. John Hogg. Islands: Aliasing protection in object-oriented languages. In OOPSLA Proceedings, November 1991.

    Google Scholar 

  24. 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.

    Google Scholar 

  25. 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.

    Google Scholar 

  26. Stuart Kent and Ian Maung. Encapsulation and aggregation. In TOOLS Pacific 18, 1995.

    Google Scholar 

  27. William Landi. Undecidability of static analysis. ACM Letters on Programming Languages and Systems, 1(4), December 1992.

    Google Scholar 

  28. 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.

    Google Scholar 

  29. Bertrand Meyer. Eiffel: The Language. Prentice Hall, 1992.

    Google Scholar 

  30. Naftaly Minsky. Towards alias-free pointers. In ECOOP Proceedings, July 1996.

    Google Scholar 

  31. 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.

    Google Scholar 

  32. James Noble, David Clarke, and John Potter. Object ownership for dynamic alias protection. In TOOLS Pacific, Melbourne, Australia, November 1999.

    Google Scholar 

  33. 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.

    Google Scholar 

  34. 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.

    Chapter  Google Scholar 

  35. John Potter and James Noble. Conglomeration: Realising aliasing protection. In Proceedings of the Australian Computer Science Conference (ACSC), Canberra, January 2000.

    Google Scholar 

  36. John Potter, James Noble, and David Clarke. The ins and outs of objects. In Australian Software Engineering Conference, Adelaide, Australia, November 1998. IEEE Press.

    Google Scholar 

  37. 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.

    Google Scholar 

  38. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics