Encapsulation and Aggregation

Stuart Kent, Ian Maung · Kent Academic Repository (University of Kent) · 1995

A notion of object ownership is introduced as a solution to difficult problems of specifying and reasoning about complex linked structures and of modeling aggregates (composite objects). Syntax and semantics are provided for extending Eiffel with language support for object ownership annotation and checking. The ideas also apply to other OOPLs such as C++. 1. Overview In section 2, we analyse the requirements of a mechanism for implementing the components of an aggregation or composite object, and we evaluate the extent to which the techniques of inheritance, expanded type attributes, reference type attributes and selective export satisfy these requirements. We restrict consideration to examples of composite objects from the solution (programming) domain. In section 3, we propose the use of reference type attributes with ownership properties to implement components and propose a syntax and semantics for object ownership. Section 4 shows how object ownership can be used in the natural modelling of aggregation structures identified in the problem domain. Section 5 discusses related work and section 6 concludes with a summary of contributions and issues for further investigation. 1.1 Terminology We adopt the Eiffel terminology for OO systems [Meyer 88,92] throughout this article.

Read the paper · More papers on PaperTik