Multiple Aggregate Entry Points for Ownership Types

  • Johan Östlund
  • Tobias Wrigstad
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7313)

Abstract

Deep ownership types gives a strong notion of aggregate by enforcing the so-called owners-as-dominators property: every path from a system root to an object must pass through its owner. Consequently, encapsulated aggregates must have a single bridge object that mediates all external interaction with its internal objects.

In this paper, we present an extension of deep ownership that relaxes the single bridge object constraint and allows several bridge objects to collectively define an aggregate with a shared representation. We call such bridge objects ombudsmen to emphasise their benevolent nature; ombudsmen-sharing is explicit and all ombudsmen are created internal to the aggregate, purposely.

The resulting system brings the aggregate notion close to the component notion found in e.g., UML by clearly separating aggregation from the stronger composition, and further allows expressing common programming patterns such as iterators without resorting to systems that give unclear or unprincipled guarantees, or require additional complex machinery such as read-only references.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aldrich, J., Chambers, C.: Ownership Domains: Separating Aliasing Policy from Mechanism. In: Vetta, A. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  2. 2.
    Aldrich, J., Kostadinov, V., Chambers, C.: Alias Annotations for Program Understanding. In: OOPSLA (November 2002)Google Scholar
  3. 3.
    Banerjee, A., Naumann, D.A.: Secure Information Flow and Pointer Confinement in a Java-like Language. In: Proceedings of the Fifteenth IEEE Computer Security Foundations Workshop (CSFW), pp. 253–267. IEEE Computer Society Press (June 2002)Google Scholar
  4. 4.
    Barnett, M., Naumann, J.D.A.: Friends Need a Bit More: Maintaining Invariants Over Shared State. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 54–84. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  5. 5.
    Booch, G., Maksimchuk, R.A., Engle, M.W., Young, B.J., Connallen, J., Houston, K.A.: Object-oriented analysis and design with applications, third edition. SIGSOFT Softw. Eng. Notes, 33, 11:29–11:29 (2008)Google Scholar
  6. 6.
    Boyapati, C., Lee, R., Rinard, M.: Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In: OOPSLA (2002)Google Scholar
  7. 7.
    Boyapati, C., Liskov, B., Shrira, L.: Ownership Types for Object Encapsulation. In: POPL (2003)Google Scholar
  8. 8.
    Boyapati, C., Liskov, B., Shrira, L., Moh, C.-H., Richman, S.: Lazy Modular Upgrades in Persistent Object Stores. In: OOPSLA, pp. 403–417. ACM, New York (2003)Google Scholar
  9. 9.
    Boyapati, C., Salcianu, A., Beebee, W., Rinard, M.: Ownership Types for Safe Region-Based Memory Management in Real-Time Java. In: PLDI (June 2003)Google Scholar
  10. 10.
    Boyland, J., Retert, W., Zhao, Y.: Iterators can be Independent from Their Collections. In: IWACO (2007)Google Scholar
  11. 11.
    Cameron, N.R., Drossopoulou, S., Noble, J., Smith, M.J.: Multiple Ownership. In: OOPSLA (2007)Google Scholar
  12. 12.
    Clarke, D.: Object Ownership and Containment. PhD thesis, School of Computer Science and Engineering, University of New South Wales, Sydney, Australia (2001)Google Scholar
  13. 13.
    Clarke, D., Drossopolou, S.: Ownership, Encapsulation and the Disjointness of Type and Effect. In: OOPSLA (2002)Google Scholar
  14. 14.
    Clarke, D., Wrigstad, T.: External Uniqueness is Unique Enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–201. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  15. 15.
    Clarke, D., Wrigstad, T., Östlund, J., Johnsen, E.B.: Minimal Ownership for Active Objects. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 139–154. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  16. 16.
    Clarke, D.G., Potter, J., Noble, J.: Ownership Types for Flexible Alias Protection. In: OOPSLA, pp. 48–64 (1998)Google Scholar
  17. 17.
    Cunningham, D., Drossopoulou, S., Eisenbach, S.: Universe Types for Race Safety. In: VAMP 2007, pp. 20–51 (September 2007)Google Scholar
  18. 18.
    Dietl, W.: Universe Types: Topology, Encapsulation, Genericity, and Tools. Ph.D., Department of Computer Science, ETH Zurich, Doctoral Thesis ETH No. 18522 (December 2009)Google Scholar
  19. 19.
    Dietl, W., Drossopoulou, S., Müller, P.: Generic Universe Types. In: Bateni, M. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 28–53. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  20. 20.
    Ekman, T., Hedin, G.: The Jastadd Extensible Java Compiler. In: OOPSLA, pp. 1–18. ACM, New York (2007)Google Scholar
  21. 21.
    Ernst, E., Ostermann, K., Cook, W.R.: A Virtual Class Calculus. In: Proceedings of Principles of Programming Languages (POPL) (January 2006)Google Scholar
  22. 22.
    Fahndrich, M., Xia, S.: Establishing Object Invariants with Delayed Types. SIGPLAN Not. 42(10), 337–350 (2007)CrossRefGoogle Scholar
  23. 23.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston (1995)Google Scholar
  24. 24.
    Greenhouse, A., Boyland, J.: An Object-Oriented Effects System. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  25. 25.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems 23(3), 396–450 (2001)CrossRefGoogle Scholar
  26. 26.
    Leino, K.R.M.: Data groups: specifying the modification of extended state. In: OOPSLA, pp. 144–153. ACM, New York (1998)Google Scholar
  27. 27.
    Leino, K.R.M., Müller, P.: Object Invariants in Dynamic Contexts. In: Vetta, A. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 491–515. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  28. 28.
    Li, P., Cameron, N., Noble, J.: Mojojojo - more ownership for multiple owners. In: International Workshop on Foundations of Object-Oriented Languages, FOOL (2010)Google Scholar
  29. 29.
    Lu, Y., Potter, J., Xue, J.: Ownership Downgrading for Ownership Types. In: Hu, Z. (ed.) APLAS 2009. LNCS, vol. 5904, pp. 144–160. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  30. 30.
    Müller, P., Poetzsch-Heffter, A.: Universes: A type system for controlling representation exposure. In: Poetzsch-Heffter, A., Meyer, J. (eds.) Programming Languages and Fundamentals of Programming, pp. 131–140. Technical Report 263, Fernuniversität Hagen (1999)Google Scholar
  31. 31.
    Müller, P., Poetzsch-Heffter, A., Leavens, G.T.: Modular Specification of Frame Properties in JML. In: Concurrency and Computation Practice and Experience (2003)Google Scholar
  32. 32.
    Müller, P., Rudich, A.: Ownership Transfer in Universe Types. In: OOPSLA, pp. 461–478. ACM, New York (2007)Google Scholar
  33. 33.
    Noble, J., Vitek, J., Potter, J.: Flexible Alias Protection. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 158–185. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  34. 34.
    Östlund, J., Wrigstad, T., Clarke, D., Åkerblom, B.: Ownership, Uniqueness, and Immutability. In: Paige, R.F., Meyer, B. (eds.) TOOLS EUROPE 2008. LNBIP, vol. 11, pp. 178–197. Springer, Heidelberg (2008)Google Scholar
  35. 35.
    Potanin, A., Noble, J., Clarke, D., Biddle, R.: Generic Ownership for Generic Java. In: OOPSLA, pp. 311–324. ACM, New York (2006)Google Scholar
  36. 36.
    Schäfer, J., Poetzsch-Heffter, A.: CoBoxes: Unifying Active Objects and Structured Heaps. In: Barthe, G., de Boer, F.S. (eds.) FMOODS 2008. LNCS, vol. 5051, pp. 201–219. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  37. 37.
    Schäfer, J., Poetzsch-Heffter, A.: JCoBox: Generalizing Active Objects to Concurrent Components. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 275–299. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  38. 38.
    Wrigstad, T.: Ownership-Based Alias Management. PhD thesis, Royal Institute of Technology, Kista, Stockholm (May 2006)Google Scholar
  39. 39.
    Wrigstad, T., Pizlo, F., Meawad, F., Zhao, L., Vitek, J.: Loci: Simple Thread-Locality for Java. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 445–469. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  40. 40.
    Zibin, Y., Potanin, A., Li, P., Ali, M., Ernst, M.D.: Ownership and Immutability in Generic Java. In: OOPSLA 2010, pp. 598–617. ACM, New York (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Johan Östlund
    • 1
  • Tobias Wrigstad
    • 1
  1. 1.Uppsala UniversitySweden

Personalised recommendations