A model for composable composition operators: expressing object and aspect compositions with first-class operators

A considerable amount of research, especially within the OO and AOSD communities, has focused on understanding the potential and limitations of various composition techniques. This has led to a large amount of proposals for alternative composition techniques, including many variations of message dispatch, inheritance, and aspect mechanisms. This paper makes the case that there is no single perfect composition technique that suits every situation, since different techniques incur different trade-offs. The proper composition technique to use depends on the particular design problem and its requirements (e.g. w.r.t. adaptability, reusability, understandability, robustness, etc. of the various elements of the design). However, most programming languages limit the available composition techniques to a very few. To address this, we propose a novel composition model. The model provides dedicated abstractions that can be used to express a wide variation of object composition techniques ("composition operators"). Examples include various forms of inheritance, delegation, and aspects. The proposed model unifies objects (with encapsulated state and a message interface) and composition operators; composition operators are specified as first-class citizens. Multiple composition operators can be combined within the same application, and composition operators can even be used to compose new composition operators from existing ones. This opens new possibilities for developing domain-specific composition operators, taxonomies of composition operators, and for reuse and refinement of composition operators. To validate and experiment with the proposed model, we have designed and implemented a simple language, that we also use in this paper to show concrete examples.

[1]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[2]  Alessandro Warth,et al.  Open, Extensible Object Models , 2008, S3.

[3]  Hridesh Rajan,et al.  Nu: a dynamic aspect-oriented intermediate language model and virtual machine for flexible runtime adaptation , 2008, AOSD.

[4]  Craig Chambers,et al.  An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes , 1989, OOPSLA '89.

[5]  Ondrej Lhoták,et al.  abc: an extensible AspectJ compiler , 2005, AOSD '05.

[6]  Lodewijk Bergmans,et al.  Utilizing Design Information in Aspect-Oriented Programming , 2005, NODe/GSEM.

[7]  Éric Tanter,et al.  A versatile kernel for multi-language AOP , 2005, GPCE'05.

[8]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[9]  William G. Griswold,et al.  Adding Implicit Invocation to Languages: Three Approaches , 1993, ISOTAS.

[10]  Noury Bouraqadi,et al.  Towards Unified Aspect-Oriented Programming , 2005, ESUG.

[11]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[12]  Guy L. Steele,et al.  Growing a Language , 1999, High. Order Symb. Comput..

[13]  Ole Lehrmann Madsen,et al.  Object-oriented programming in the BETA programming language , 1993 .

[14]  Antero Taivalsaari,et al.  On the notion of inheritance , 1996, CSUR.

[15]  Wilke Havinga,et al.  On the design of software composition : mechanisms and the analysis of composition conflicts , 2009 .

[16]  David H. Lorenz,et al.  Awesome: an aspect co-weaving system for composing multiple aspect-oriented extensions , 2007, OOPSLA.

[17]  Lodewijk Bergmans,et al.  Prototyping and Composing Aspect Languages , 2008, ECOOP.

[18]  Todd D. Millstein,et al.  Practical predicate dispatch , 2004, OOPSLA.

[19]  Gary Lindstrom,et al.  An Application Framework For Module Composition Tools , 1996, ECOOP.

[20]  H. Rajan,et al.  Classpects: unifying aspect- and object-oriented language design , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[21]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[22]  Lodewijk Bergmans,et al.  Prototyping and Composing Aspect Languages: using an Aspect Interpreter Framework , 2007 .

[23]  Michael Haupt,et al.  A Machine Model for Aspect-Oriented Programming , 2007, ECOOP.

[24]  Guy L. Steele,et al.  Growing a Language , 1999, High. Order Symb. Comput..

[25]  Ivan Kiselev,et al.  Aspect-Oriented Programming with AspectJ , 2002 .

[26]  Bruno C. d. S. Oliveira,et al.  Modular Visitor Components , 2009, ECOOP.

[27]  Lodewijk Bergmans,et al.  Composing crosscutting concerns using composition filters , 2001, CACM.

[28]  Yishai A. Feldman,et al.  Call and Execution Semantics in AspectJ , 2004 .

[29]  Henry Lieberman,et al.  Using prototypical objects to implement shared behavior in object-oriented systems , 1986, OOPLSA '86.

[30]  Robert Hirschfeld,et al.  Aspect-Oriented Programming with AspectS , 2002 .

[31]  Pierre Cointe Reflective languages and metalevel architectures , 1996, CSUR.

[32]  Robert E. Filman,et al.  Inserting ilities by controlling communications , 2002, CACM.

[33]  Christoph Bockisch,et al.  An efficient and flexible implementation of aspect-oriented languages , 2008, Ausgezeichnete Informatikdissertationen.

[34]  Robert Bruce Findler,et al.  Super and inner: together at last! , 2004, OOPSLA '04.

[35]  Mira Mezini,et al.  Object-oriented composition untangled , 2001, OOPSLA '01.

[36]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[37]  Craig S. Kaplan,et al.  Predicate Dispatching: A Unified Theory of Dispatch , 1998, ECOOP.