Multiple aggregate entry points for ownership types

  • Authors:
  • Johan Östlund;Tobias Wrigstad

  • Affiliations:
  • Uppsala University, Sweden;Uppsala University, Sweden

  • Venue:
  • ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

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.