Publication
Theory and Practice of Object Systems
Paper

Specifying subject-oriented composition

View publication

Abstract

Subject-oriented programming supports composition of object-oriented programs or program fragments called subjects. This article presents an approach to specifying desired compositions in a convenient and concise manner. We motivate the need for subject composition, and illustrate the key issues. We define a low-level model in which composition is controlled by detailed attributes. We then describe higher-level composition rules as collections of attributes that, together, provide some desired aspect of composition functionality. Compositions are specified by means of composition expressions written as collections of rules, typically a general rule along with rules specifying exceptions. A rule library is thus an open-ended collection of useful abstractions in terms of which to define compositions. We give definitions of a few common rules, including merge and override, as a first step towards a generally useful composition rule library. We also outline an object-oriented framework for implementing our composition approach, which we are currently building as part of our support for subject-oriented programming in C++.