First-Class Compositions - Defining and Composing 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 number 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 tradeoffs. The proper composition technique to use depends on the particular design problem and its requirements (such as the required adaptability, reusability, understandability and robustness). However, most programming languages limit the available composition techniques to a very few. To address this, we propose a novel composition model, called Co-op. The model provides dedicated abstractions that can be used to express a wide variety 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, Co-op/I, that we also use in this paper to show concrete examples.

[1]  Gregor Kiczales,et al.  Design pattern implementation in Java and aspectJ , 2002, OOPSLA '02.

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

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

[4]  Erik Ernst,et al.  ECOOP 2007 - Object-Oriented Programming, 21st European Conference, Berlin, Germany, July 30 - August 3, 2007, Proceedings , 2007, ECOOP.

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

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

[7]  Hidehiko Masuhara,et al.  Modeling Crosscutting in Aspect-Oriented Mechanisms , 2003, ECOOP.

[8]  Raphael A. Finkel,et al.  Advanced programming language design , 1995 .

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

[10]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

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

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

[13]  Gary T. Leavens,et al.  MultiJava: Design rationale, compiler implementation, and applications , 2006, TOPL.

[14]  Mehmet Aksit,et al.  Transactions on Aspect-Oriented Software Development I , 2006, Trans. Aspect-Oriented Software Development I.

[15]  Pierre Cointe ECOOP ’96 — Object-Oriented Programming , 1996, Lecture Notes in Computer Science.

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

[17]  Rémi Douence,et al.  Composition, reuse and interaction analysis of stateful aspects , 2004, AOSD '04.

[18]  Dirk Riehle,et al.  Role model based framework design and integration , 1998, OOPSLA '98.

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

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

[21]  Robert Bruce Findler,et al.  Modular object-oriented programming with units and mixins , 1998, ICFP '98.

[22]  D. A. Turner,et al.  Miranda: A Non-Strict Functional language with Polymorphic Types , 1985, FPCA.

[23]  Oscar Nierstrasz,et al.  Traits: A mechanism for fine-grained reuse , 2006, TOPL.

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

[25]  Lodewijk Bergmans,et al.  A model for composable composition operators: expressing object and aspect compositions with first-class operators , 2010, AOSD.

[26]  Jan Bosch,et al.  Design Patterns as Language Constructs , 1998, J. Object Oriented Program..

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

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

[29]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

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

[31]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[32]  Akinori Yonezawa,et al.  Abstracting Object Interactions Using Composition Filters , 1993, ECOOP Workshop.

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

[34]  Joseph Gil,et al.  Design Patterns and Language Design , 1998, Computer.

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

[36]  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.

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

[38]  R van Engelen,et al.  Ideals : evolvability of software-intensive high-tech systems : a collaborative research project on maintaining complex embedded systems , 2007 .

[39]  Theo D'Hondt ECOOP 2010 - Object-Oriented Programming, 24th European Conference, Maribor, Slovenia, June 21-25, 2010. Proceedings , 2010, ECOOP.

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

[41]  Luca Cardelli,et al.  ECOOP 2003 – Object-Oriented Programming , 2003, Lecture Notes in Computer Science.

[42]  Satoshi Matsuoka,et al.  Object Technologies for Advanced Software , 1996, Lecture Notes in Computer Science.

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

[44]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[45]  Christoph Bockisch,et al.  A Case for Custom, Composable Composition Operators , 2010 .

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

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

[48]  Lodewijk Bergmans,et al.  Compose*: a Language- and Platform-Independent Aspect Compiler for Composition Filters , 2008 .

[49]  Yaron Kashai,et al.  Modules as Objects in Newspeak , 2010, ECOOP.

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

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

[52]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

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

[54]  Henry Lieberman,et al.  Using Prototypical Objects to Implement Shared Behavior in Object Oriented Systems , 1986, OOPSLA.

[55]  Jan Vitek,et al.  ECOOP 2008 - Object-Oriented Programming, 22nd European Conference, Paphos, Cyprus, July 7-11, 2008, Proceedings , 2008, ECOOP.

[56]  Oscar Nierstrasz,et al.  Object-Based Distributed Programming , 1993, Lecture Notes in Computer Science.

[57]  Simon Thompson,et al.  Programming Language Semantics using Miranda , 1995 .

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

[59]  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).

[60]  Steven te Brinke First-order function dispatch in a Java-like programming language , 2011 .

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

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

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

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

[65]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.