<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Case for Custom, Composable Composition Operators</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Wilke Havinga</string-name>
          <email>w.havinga@ewi.utwente.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christoph Bockisch</string-name>
          <email>c.m.bockisch@ewi.utwente.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lodewijk Bergmans</string-name>
          <email>l.m.j.bergmans@ewi.utwente.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Software Engineering group - University of Twente P.</institution>
          <addr-line>O. Box 217, 7500 AE Enschede</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Programming languages typically support a xed set of composition operators, with xed semantics. This may impose limits on software designers, in case a desired operator or semantics are not supported by a language, resulting in suboptimal quality characteristics of the designed software system. We demonstrate this using the well-known State design pattern, and propose the use of a composition infrastructure that allows the designer to de ne custom, composable composition operators. We demonstrate how this approach improves several quality factors of the State design pattern, such as reusability and modularity, while taking a reasonable amount of e ort to de ne the necessary pattern-related code.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>However, we have observed that in each programming
language only a few of the known composition operators are at
the developer's disposal as language features. This hinders
the modularity of source code. Thus, the ability to
modularize source code is limited by the choice of composition
operators made by the language designers. In our research,
we want to enable the developer to freely use and mix all
existing|and future|composition operators.</p>
      <p>
        For most of the composition operators, di erent variations
exist, e.g., when inheriting from a class, either the parent
(e.g., in Beta) or the child implementation (e.g., in Java)
may have precedence. While approaches exist to support
di erent variants of single operators simultaneously (e.g.,
Beta-style and Java-style inheritance in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]), the developer
is typically provided with very limited choice. That is,
different concerns may be well modularizable in di erent
composition styles; but if no language exists that supports all
necessary styles, not all concerns can be optimally
modularized.
      </p>
      <p>To avoid this limitation, often domain-speci c languages
(DSL) are developed that provide composition operators
tailored toward a speci c program domain. However,
developing a DSL only pays o , when it is used su ciently often.</p>
      <p>
        If this approach, thus, is not feasible and a general-purpose
language is used, often the missing composition operators
are emulated by a speci c programming style, e.g., in terms
of design patterns [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], which encode interactions between
(and thus compositions of) objects.
      </p>
      <p>To emulate composition operators, design patterns typically
require some pieces of code which are application-independent
(possibly tailored with element names from the application
program) but cannot be localized in one module; we refer to
these code pieces as boilerplate code. Boilerplate code entails
several disadvantages.</p>
      <p>Firstly, it obfuscates the design; instead of specifying
the relation of two or more modules explicitly, this code
de nes their composition imperatively. Because this
code is scattered over multiple participating modules,
the design intention becomes even more implicit.</p>
      <p>Secondly, boilerplate code is di cult to write. While
it is not very sophisticated, its correctness is not
easily enforced; for example, consider the Visitor
pattern, where each Element class must implement the
method void accept(Visitor visitor){ visitor.accept
(this); }1. Each class contains the same line, but it
is not possible to factor it out into the superclass.
1In languages like Java with an overloading semantics for
methods, the static type of the argument distinguishes
between the accept methods for di erent Element types in a</p>
      <p>Visitor.</p>
      <p>
        Finally, while it is sometimes necessary to combine
multiple composition operators, not all required
operators can be emulated by design patterns. As an
example, consider the expression problem [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], where
the building blocks of the application are data types
and operations on them. With an object-oriented
language, the data types are easily extensible, but not the
operations. The Visitor pattern emulates a functional
composition style, which makes it easy to extend the
operations, but in turn the data types cannot be
easily extended. Di erent language-level solutions to this
problem have been proposed that are all founded on
combining multiple composition operators [
        <xref ref-type="bibr" rid="ref5 ref8">5, 8</xref>
        ].
      </p>
      <p>
        As also others have noticed [
        <xref ref-type="bibr" rid="ref13 ref26 ref7">7, 26, 13</xref>
        ], we claim that quality
characteristics of design pattern implementations can often
be improved if the implementation language supports
particular composition operators. However, while this decreases
the complexity of programs using a supported pattern,
providing such support by extending the syntax of a language
will increase the language's complexity [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>In our research, we are concerned with developing a
composition infrastructure, where the developer can choose from
di erent composition operators and from di erent variations
thereof. However, we do not simply aim at providing a</p>
      <p>xed set of composition operators to choose from; but we
aim to provide an infrastructure in which composition
operators can be user-de ned. In addition, our approach
allows to re-use and combine implementations of composition
operators|thereby developing new composition operators|
because they are rst-class. This also makes our approach
open for future developments in the research of composition
operators.</p>
      <p>In this paper we present our approach through the
example of the State pattern and our prototypical Co-op
language. We have chosen this pattern because it is suitable
to demonstrate the interplay between di erent composition
operators, namely forwarding and delegation semantics as
well as aspect-oriented composition. By this example we
show that customizable composition operators can lead to
a re-usable implementation of design patterns as well as to
improved modularity of source code.</p>
      <p>
        First, the State pattern has to be instantiated and tailored to
this speci c application. In general, many patterns
(including the State pattern) specify roles that have to be mapped
to implementation-speci c classes. However, parts of these
classes represent common pattern-de ned behavior, made
speci c for a particular instantiation of the pattern. This
obfuscates the generality of the design pattern, decreases the
As an alternative, the State pattern therefore also explicitly
suggests that all state transitions can be kept in a single
2. COMPOSITION ISSUES DEMONSTRATED location, e.g., a transition table. This addresses the
scatterIn this section, we demonstrate the occurrence of issues ing of transition statements over the program, thus making
caused by language limitations, based on a concrete exam- it easier to, e.g., check whether an instantiation of the State
ple. For this purpose, we discuss the object-oriented \State" pattern matches a corresponding state diagram, or to modify
design pattern [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], which realizes a state machine. several transitions in one go. However, in many languages
this alternative requires additional boiler-plate code, as is
shown in gure 2.
      </p>
      <p>In this alternative design, the constructor of TCPInterface
constructs a table of state transitions. The methods in class
TCPInterface each call the method changeState(..).</p>
      <p>This method is parameterized by the action that is being
executed, which is needed to look up the \next" state in
the transition table. Similar to the code that \manually"
forwards method calls to the current state object, the
invocation of method changeState, passing the action, is thus
replicated for each action supported by the state machine
implementation.</p>
      <p>state
separation between application-speci c and pattern-generic
code, and makes it harder to reuse common parts of the
pattern implementation (\boilerplate" code).</p>
      <p>
        Speci cally in this example, the most important occurrence
of boilerplate code is found in the methods de ned in class
TCPInterface. For each action (e.g., openPort,
receiveSyn, etc.) supported by the state machine, this interface
class has to de ne a method that forwards calls to the
currently active state. As shown in gure 1, the forwarding
method has to pass the this reference to the state object,
such that it can, e.g., call changeState on the context
object. Similarly, whenever a new action has to be added
to the state machine, additional boilerplate code has to be
added to both the State superclass TCPState, as well as
TCPInterface. Both issues can be addressed more
concisely in languages that support explicit delegation [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
      </p>
      <p>Second, pattern implementations may impose limitations on
the way a particular concept is expressed. In the case of the
State pattern implementation as shown in gure 1, the
behavior associated with each state is modularized. However,
state transitions are encoded as part of the actions, and
thus become scattered over multiple State implementation
classes.
One way to improve on the situation described above, is
by addressing limitations in the underlying implementation
language. In this case speci cally, both implementations
can bene t from a language that supports explicit
delegation, whereas the table-based design can additionally bene t
from a language that supports pointcut-advice constructs.</p>
      <p>We demonstrate this in detail in the next section; it should
be noted, however, that this example is meant as a
demonstrator for the usefulness of more exible composition
operator support in general, even if space limitations prevent us
from discussing other examples here.
3. USING COMPOSABLE COMPOSITION</p>
      <p>
        OPERATORS
Our approach is based on a composition infrastructure, which
supports composition primitives that allow programmers to
design custom or domain-speci c composition operators. This
infrastructure is implemented as an object-based language
called Co-op, which is discussed in detail elsewhere [
        <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
        ].
      </p>
      <p>Figure 3 shows a schematical overview of a Co-op-based
design of the State pattern, applied to the TCP/IP example.</p>
      <p>As is the case with the original OO pattern, it supports both
design alternatives discussed in the previous section (i.e.,
encoding transitions as part of the state implementations, or as
a separate transition table). The lower half of the diagram
contains the reusable, pattern-generic parts, which should
ful ll two main tasks. First, it establishes and controls a
delegation relation between a context object (as it is called
in the original pattern description; in our example, class
TCPInterface ful lls the role of context ) and state
implementation objects (instances of TCPClosed, TCPListen,
etc.). Second, in case a table-based implementation is
desired, it automatically ensures that the speci ed state
transitions are executed at the appropriate moment, i.e., without
adding any invocations to the application-speci c state
implementations (in the upper half of the diagram).</p>
      <p>Below, we discuss each module described in the diagram in
some detail, and show how this approach reduces the amount
of boiler-plate code in the application-speci c part.</p>
      <p>Listing 1 shows the implementation of the generic, reusable
parts of the State pattern. An instance of the State
pattern can be created by constructing an instance of module</p>
      <p>TCPInterface
@portNumber
@stateObjects
@fsm
init(portNumber)
getPortNumber()
getStateObject(stateName)
getFSM()</p>
      <p>&lt;&lt;Delegation&gt;&gt;
&lt;&lt;creates&gt;&gt;</p>
      <p>&lt;&lt;creates&gt;&gt;</p>
      <p>StatePattern
@target
@currState
@currDelegator
init(target, initState)
addTransition()
getCurrentState()
getDelegatorOperator()
changeDelegatorOperator(newState)</p>
      <p>TCPClosed
openPort()
StatePattern. To facilitate the delegation from the
context object to an object representing the current state, each
state pattern instance keeps references to the context and
currentState objects, and a reference to the delegation
operator2. These instance variables of the pattern are
de</p>
      <p>ned on line 2. The constructor (lines 4{8) calls the
operation that establishes the delegation relation (line 7). This
operation, changeDelegatorOperator(..) (lines 10{
18), which should be invoked whenever a state change is
required, deactivates the delegation to the current state object
(lines 12{13), and activates a new delegation relation from
the context object to the new state object (lines 16{17).</p>
      <p>
        We lack the space to discuss the internal details of the
Delegation operator in detail, but a discussion of this exact
operator can be found in prior work [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Here, it su ces
to know that the constructor of the Delegation module
establishes and activates delegation from the object
referenced by the rst argument (here: @context) to the object
referenced by the second argument (here: newState).
Effectively, this means that invocations on the context object
are forwarded to the indicated state object, while the
\this"object still refers to the context object (i.e., this-calls are
all directed to the context object).
      </p>
      <p>
        Finally, lines 20{22 implement the state transition
mechanism used in the table-based pattern implementation: by
invoking addTransition, a pointcut-advice instance is
constructed, which triggers after the speci ed action is
invoked on the fromState. Whenever the pointcut triggers,
as an advice the operation stateChangeImpl is invoked,
as de ned on lines 33{35, which changes the state to the
selected toState. The module StateTransition stores
references to the pattern instance, as well as the desired
toState, so that these can be used by the advice3.
2In Co-op, operators are themselves implemented as
modules, and can be referenced as rst-class objects. For a
detailed explanation, see [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ].
3Ideally, these could be supplied as advice parameters,
makinitWithContext:aContext initState:initState {
context = aContext;
currState = initState;
this changeDelegatorOperator: initState;
Listing 1: Co-op-based implementation of the State
pattern
As mentioned in section 2, we found two types of
functionality in the State pattern that can be made more reusable,
while also removing the need for a lot of boilerplate code.
      </p>
      <p>First, by using delegation, it is no longer necessary to write
manual forwarding operations in the context class (here:
TCPInterface). Second, when using a table-based
implementation, the pointcut-advice composition operator
removes the need to manually invoke a method that decides
about the next state. Note that although our approach
allows the use of such a transition table, this is by no means
obligatory; embedding transitions in action implementations
works ne, as well. However, when transition tables are
used, our approach removes the need for boilerplate
associated with the original implementation.</p>
      <p>Listing 2 shows how the State pattern implementation
de</p>
      <p>ned above as a custom, \pluggable" composition operator
that can be used in any Co-op program, is applied to the</p>
      <p>TCP/IP example discussed in section 2.
1 module TCPInterface {
2 var portNumber, fsm;
3
4
5
6
init:aPortNumber {
var closedState, listenState, synReceivedState,</p>
      <p>establishedState;
}
stateChangeImpl {
patternInstance changeDelegatorOperator: toState;
35 }
36 }
37 // etc. for other TCP states not shown here
ing the module StateTransition super uous, but our
much simpli ed implementation of AspectJ-like
pointcutadvice does not support this at present.
1 module Main {
2 main { var tcpserver;
3 tcpserver = TCPInterface new: "80";
4 tcpserver openPort; // Request port open</p>
      <p>Listing 2: Application of the generic State-pattern
implementation
In this listing, the constructor of module TCPInterface,
found on lines 4{21, sets up the state machine: it creates an
instance of each TCP state modeled in this example (lines
8{11), and initializes a State pattern instance (line 14),
appointing itself as the context object, and setting
closedState as the initial state object. In this example, we also
used the pointcut-advice based transition mechanism, which
is initialized in lines 16{19. Note that all the
initialization code here is completely application-speci c, and also,
no boilerplate related to the internal \machinery" required
by the pattern implementation is visible. Once the state
machine is thus set up, the delegation and pointcut-advice
operators automatically take care of e ectuating the desired
state machine behavior.</p>
      <p>The remaining code in listing 2 shows the mock-up state
implementations. Note that the state modules do not contain
or need any references to the state pattern. Still, because of
delegation, you can still use behavior of class TCPInterface
by means of this-calls, such as this getPortNumber (line
27).</p>
      <p>An example demonstrating how the complete state machine
can be instantiated and executed is shown in listing 3. Note
that in listing 3, no boilerplate code or references to the
state pattern are necessary either.
5
6
7 } }
tcpserver receiveSyn; // Receive incoming conn.</p>
      <p>//etc.</p>
      <p>Listing 3: Using the state machine implementation
When the state machine is initialized (line 5), calls will be
delegated to the initial state, an instance of TCPClosed.</p>
      <p>Thus, when openPort is invoked (line 6), the call is
delegated to the operation openPort in TCPClosed, as shown
before. After this action has been executed, the
pointcutadvice that executes the state transition to listenState,
an instance of TCPListen, is automatically invoked, since it
triggers after the invocation of openPort on the instance of
TCPClosed. Thus the state machine implementation
automatically delegates calls to the appropriate implementation,
and automatically triggers state changes.</p>
      <p>
        The complete example as well as a prototype Co-op-interpreter
(a plain jar- le, no installation required) can be downloaded
from the Co-op website [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
4. RELATED WORK
The work in this paper is related to a large body of
research on de ning new languages that support novel
composition techniques, especially in the domain of object-based
and aspect languages. Many papers also present a (small)
set of composition techniques that aim at unifying
existing ones. However, most of such related research proposes
a xed set of composition operators, presented as part of a
language, extension of a language, or an application
framework. In contrast, our work focuses on a language that has
no|or just one|built-in composition operators, but rather
is a platform for constructing a wide range of user-de ned
composition operators.
      </p>
      <p>
        To the best of our knowledge, there are no other languages
that o er dedicated support for user-de ned composition
operators (that can be reused and combined), at least not
within the domain of object-oriented and aspect-oriented
languages. Please note that this excludes languages that
offer generic extension mechanisms|such as macros in Lisp|
or allow for the extension and modi cation of the program
through metaprogramming; our work is particularly related
to metaprogramming [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and especially meta-object
protocols [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. As explained, e.g., in [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], the power of
metaprogramming comes with more complexity and responsibility.
      </p>
      <p>This means that the di culty of language design|except for
the concrete syntax|is now on the MOP designer. Indeed,
our work might just as well have been presented as a novel
design of a MOP, but for practical reasons we chose to use
a concrete language, Co-op. We are not aware of any MOPs
(or languages, or frameworks) that o er similar generic
abstractions and structure as we presented in this paper. In
particular, we do not know any MOPs that provide
abstractions for de ning new composition operators with similar
variety, expressiveness and composability. For example,
Coop explicitly supports a variety of object-oriented as well as
aspect-oriented composition operators.</p>
      <p>
        Of the research that aims at providing frameworks for
higherlevel languages through re ection or meta object protocols,
we just mention COLA [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], AspectS [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], MetaClassTalk [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]:
please refer to [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] for a discussion of these. There are several
frameworks that aim at o ering a generic platform for OO
and AOP language implementations. For such platforms,
the designers have typically made e orts to nd a small set
of generic constructs that typically serve as a target
`language' for a compiler/code transformation. An important
distinction with our work is that these platforms do not aim
at, and hence do not support, the ability of creating
userde ned composition operators within the same language.
      </p>
      <p>We have used the example of a modular, reusable
implementation of a design pattern to exemplify that a single xed
composition technique is insu cient, while at the same time
demonstrating that a design pattern implementation can in
fact be modeled as a composition operator that `extends'
the language.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], Bosch argues that language support is needed for
explicit representation of design patterns in programming
languages. The LayOM language o ers a number of
common design patterns as built-in constructs. These can be
extended by growing the language, which supports modular
extension of the lexer, parser and code generators for a new
pattern: in contrast to our approach, the extension is not
speci ed in the programming language itself. Also in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ],
techniques for explicit representation of design patterns are
proposed that are based on extension of the language and,
consequently, the compiler.
      </p>
      <p>
        Rajan and Sullivan [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] argue that design patterns are a
suitable test case for evaluating and comparing aspect
languages, because (1) design patterns are standard,
well-documented design structures, and (2) existing examples [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]
of design pattern implementations in AOPLs are available.
      </p>
      <p>
        They base their evaluation of the EOS language on a
comparison with the AspectJ implementations of patterns in
[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], following the metrics that have been proposed by
Garcia et al. in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Several e orts have been made to represent design patterns
as rst-class entities. For example, in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], the fragment
model is introduced to represent design patterns and their
components. The FACE approach [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] extends the OMT
notation with pattern-speci c entities. Similarly, [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]
proposes a modeling notation for representing design patterns|
speci cally for the support of the design and integration of
object-oriented frameworks. All of these approaches build
on the assumption that a design pattern has roles, which
must be lled in by entities that use the design pattern.
      </p>
      <p>
        These roles are called participants in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        Hanneman and Kiczales [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] shows how to implement the
GoF design patterns using aspect-oriented modularization
techniques; in several cases this enables the modularization
of all pattern-generic code within a single module (aspect).
5. EVALUATION AND CONCLUSION
Support for exible, user-de nable composition operators
can help to improve the modularity and reusability of design
pattern implementations, as we have shown for the State
design pattern speci cally in this paper.
      </p>
      <p>
        Although this paper shows only one example, the results
can be generalized. As has been discussed by the example
of the Visitor pattern in section 1, or by the example of other
patterns in [
        <xref ref-type="bibr" rid="ref13 ref15 ref16 ref2">16, 15, 2, 13</xref>
        ], rich composition operators in the
language provide a powerful way to solve problems which are
typically only \worked-around" by means of Design Patterns,
i.e., requiring boilerplate code in several locations.
      </p>
      <p>In addition, our approach of using a composable composition
infrastructure (called Co-op) allows the de nition of new
composition operators that reuse existing ones. We have
shown this by expressing the State design pattern as a
custom composition operator, which reuses two existing
operators that implement explicit delegation and a basic
pointcutadvice mechanism. Also as a result of this, we could de ne
such a relatively complex and reusable operator in less than
50 lines of code.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>[1] Co-op homepage</article-title>
          , http: //wwwhome.cs.utwente.nl/~havingaw/coop/,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.</given-names>
            <surname>Bockisch</surname>
          </string-name>
          .
          <article-title>An E cient and Flexible Implementation of Aspect-Oriented Languages</article-title>
          .
          <source>PhD thesis</source>
          , Technische Universita
          <source>t Darmstadt</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Bosch</surname>
          </string-name>
          .
          <article-title>Design patterns as language constructs</article-title>
          .
          <source>JOOP</source>
          ,
          <volume>11</volume>
          (
          <issue>2</issue>
          ):
          <volume>18</volume>
          {
          <fpage>32</fpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N.</given-names>
            <surname>Bouraqadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Seriai</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Leblanc</surname>
          </string-name>
          .
          <article-title>Towards uni ed aspect-oriented programming</article-title>
          .
          <source>In Proceedings of ESUG 2005 (13th international smalltalk conference)</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C.</given-names>
            <surname>Clifton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Millstein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. T.</given-names>
            <surname>Leavens</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Chambers</surname>
          </string-name>
          . MultiJava:
          <article-title>Design rationale, compiler implementation, and applications</article-title>
          .
          <source>ACM Transactions on Programming Languages and Systems</source>
          ,
          <volume>28</volume>
          (
          <issue>3</issue>
          ):
          <volume>517</volume>
          {
          <fpage>575</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>P.</given-names>
            <surname>Cointe</surname>
          </string-name>
          .
          <article-title>Re ective languages and metalevel architectures</article-title>
          .
          <source>ACM Computing Surveys</source>
          ,
          <fpage>28</fpage>
          -
          <lpage>4</lpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Dominus</surname>
          </string-name>
          .
          <article-title>Patterns are signs of weakness in programming languages</article-title>
          , http://blog.plover. com/prog/design-patterns.
          <source>html.</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R. B.</given-names>
            <surname>Findler</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Flatt</surname>
          </string-name>
          .
          <article-title>Modular object-oriented programming with units and mixins</article-title>
          .
          <source>In Proceedings of the ACM SIGPLAN international conference on Functional programming</source>
          , pages
          <volume>94</volume>
          {
          <fpage>104</fpage>
          , New York, NY, USA,
          <year>1998</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Florijn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Meijers</surname>
          </string-name>
          , and P. van Winsen.
          <article-title>Tool support for object-oriented patterns</article-title>
          .
          <source>In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP</source>
          <year>1997</year>
          ),
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>E.</given-names>
            <surname>Gamma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Helm</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Johnson</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Vlissides</surname>
          </string-name>
          .
          <article-title>Design patterns: elements of reusable object-oriented software</article-title>
          .
          <source>Addison-wesley Reading</source>
          , MA,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Garcia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sant'Anna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Figueiredo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Kulesza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lucena</surname>
          </string-name>
          , and A. von Staa.
          <article-title>Modularizing design patterns with aspects: A quantitative study</article-title>
          . In P. Tarr, editor,
          <source>Proc. 4rd Int' Conf. on Aspect-Oriented Software Development (AOSD-2005)</source>
          , pages
          <fpage>3</fpage>
          <lpage>{</lpage>
          14. ACM Press,
          <year>Mar</year>
          .
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Goldberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. B.</given-names>
            <surname>Findler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Flatt</surname>
          </string-name>
          . Super and inner: together at last!
          <source>In OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications</source>
          , pages
          <volume>116</volume>
          {
          <fpage>129</fpage>
          , New York, NY, USA,
          <year>2004</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J.</given-names>
            <surname>Hannemann</surname>
          </string-name>
          and
          <string-name>
            <given-names>G.</given-names>
            <surname>Kiczales</surname>
          </string-name>
          .
          <article-title>Design pattern implementation in Java and AspectJ</article-title>
          .
          <source>In Proceedings of the 17th ACM conference on Object-oriented programming, systems, languages, and applications</source>
          , pages
          <volume>161</volume>
          {
          <fpage>173</fpage>
          . ACM Press,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>W.</given-names>
            <surname>Havinga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bergmans</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Aksit</surname>
          </string-name>
          .
          <article-title>A model for composable composition operators: Expressing object and aspect compositions with rst-class operators</article-title>
          .
          <source>In Proceedings of the 9th international conference on Aspect-Oriented Software Development</source>
          ,
          <year>Mar 2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>W. K.</given-names>
            <surname>Havinga</surname>
          </string-name>
          .
          <article-title>On the Design of Software Composition Mechanisms and the Analysis of Composition Con icts</article-title>
          .
          <source>PhD thesis</source>
          , University of Twente, Enschede,
          <year>June 2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>W. K.</given-names>
            <surname>Havinga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. M. J.</given-names>
            <surname>Bergmans</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Aksit</surname>
          </string-name>
          .
          <article-title>Prototyping and composing aspect languages: using an aspect interpreter framework</article-title>
          .
          <source>In Proceedings of 22nd European Conference on Object-Oriented Programming (ECOOP</source>
          <year>2008</year>
          ), Paphos, Cyprus, volume
          <volume>5142</volume>
          /2008 of Lecture Notes in Computer Science, pages
          <volume>180</volume>
          {
          <fpage>206</fpage>
          , Berlin,
          <year>2008</year>
          . Springer Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>G.</given-names>
            <surname>Hedin</surname>
          </string-name>
          .
          <article-title>Language Support for Design Patterns Using Attribute Extension</article-title>
          .
          <source>In Proceedings of the Workshops on Object-Oriented Technology</source>
          , pages
          <volume>137</volume>
          {
          <fpage>140</fpage>
          . Springer-Verlag London, UK,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>R.</given-names>
            <surname>Hirschfeld</surname>
          </string-name>
          .
          <article-title>Aspect-oriented programming with AspectS</article-title>
          . In M. Aksit and M. Mezini, editors,
          <source>Net.Object Days</source>
          <year>2002</year>
          , Oct.
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>R.</given-names>
            <surname>Johnson</surname>
          </string-name>
          .
          <article-title>Design patterns and language design</article-title>
          , http: //www.cincomsmalltalk.com/userblogs/ ralph/blogView?entry=
          <fpage>3335803396</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>G.</given-names>
            <surname>Kiczales.</surname>
          </string-name>
          <article-title>It's not metaprogramming</article-title>
          .
          <source>Software Development Magazine</source>
          , (
          <volume>10</volume>
          ),
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>G.</given-names>
            <surname>Kiczales</surname>
          </string-name>
          , J. des Rivieres, and
          <string-name>
            <given-names>D. G.</given-names>
            <surname>Bobrow.</surname>
          </string-name>
          <article-title>The Art of the Metaobject Protocol</article-title>
          . MIT Press, Cambridge, Massachusetts,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>H.</given-names>
            <surname>Lieberman</surname>
          </string-name>
          .
          <article-title>Using prototypical objects to implement shared behavior in object-oriented systems</article-title>
          .
          <source>SIGPLAN Not</source>
          .,
          <volume>21</volume>
          (
          <issue>11</issue>
          ):
          <volume>214</volume>
          {
          <fpage>223</fpage>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>T. D. Meijler</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Demeyer</surname>
            , and
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Engel</surname>
          </string-name>
          .
          <article-title>Making design patterns explicit in FACE: a frame work adaptive composition environment</article-title>
          .
          <source>In ESEC '97/FSE-5: Proceedings of the 6th European SOFTWARE ENGINEERING conference held jointly with the 5th ACM SIGSOFT international symposium on Foundations of software engineering</source>
          , pages
          <volume>94</volume>
          {
          <fpage>110</fpage>
          , New York, NY, USA,
          <year>1997</year>
          . Springer-Verlag New York, Inc.
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>I.</given-names>
            <surname>Piumarta</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Warth</surname>
          </string-name>
          . Open,
          <article-title>extensible object models</article-title>
          .
          <source>In Self-Sustaining Systems</source>
          , volume
          <volume>5146</volume>
          /2008 of Lecture Notes in Computer Science, pages
          <fpage>1</fpage>
          <lpage>{</lpage>
          30. Springer, Springer Berlin/Heidelberg,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>H.</given-names>
            <surname>Rajan</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.</given-names>
            <surname>Sullivan</surname>
          </string-name>
          .
          <article-title>Design Patterns: A Canonical Test of Uni ed Aspect Model</article-title>
          .
          <source>Technical report</source>
          , Iowa State University,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>D.</given-names>
            <surname>Riehle</surname>
          </string-name>
          and
          <string-name>
            <given-names>T.</given-names>
            <surname>Gross</surname>
          </string-name>
          .
          <article-title>Role model based framework design and integration</article-title>
          .
          <source>SIGPLAN Not</source>
          .,
          <volume>33</volume>
          (
          <issue>10</issue>
          ):
          <volume>117</volume>
          {
          <fpage>133</fpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>