<!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>Feature-Oriented Model-Driven Software ⋆ Product Lines: The TENTE approach</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lidia Fuentes</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos Nebrera</string-name>
          <email>cnebrera@lcc.uma.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pablo S´anchez</string-name>
          <email>pablo@lcc.uma.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dpto. Lenguajes y Ciencias de la Computaci ́on Universidad de M ́alaga</institution>
          ,
          <addr-line>M ́alaga</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2009</year>
      </pub-date>
      <fpage>67</fpage>
      <lpage>72</lpage>
      <abstract>
        <p>In recent years, modern techniques for advanced separation of concerns and Model-Driven Development (MDD) have provided new means for improving the current methods of Software Product Line (SPL) Engineering. Mechanisms such as family polymorphism and mixin composition can be used to improve the separation and composition of features of an SPL. Using MDD repetitive, laborious and time consuming tasks of SPL processes can be automated. Nevertheless, there is a general lack of SPL processes that integrate advanced mechanisms for separation of concerns with MDD techniques. This paper presents an innovative process, called TENTE, which combines both technologies. The result is a model-driven process that maintains the separation of features both at the architectural design and implementation stages, improving separation of variants; at the same time repetitive, laborious and time consuming tasks are automated.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        A Software Product Line(SPL) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] aims to create the infrastructure for the rapid
production of software systems for a specific market segment. These software
systems share a subset of common features, but variations are also present. Software
Product Line Engineering involves two new issues as compared to engineering
of single software-based systems: variability design and product derivation.
      </p>
      <p>Variability design is concerned with incorporating variation mechanisms into
the software products, which enable the construction of an infrastructure
representing a complete range or family of products. Such an infrastructure will
include both the commonalities and variations of the family of produts.
Product Derivation is the process of constructing specific software products, after
a specific configuration (i.e. a valid set of alternatives and variants) has been
selected.</p>
      <p>
        Modern software decomposition techniques [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], such as family polymorphism
and mixin composition, provides new mechanisms for the separation and
composition of concerns. These mechanisms can be applied to variability design,
⋆ This work has been supported by Spanish MCYT Project TIN2008-01942 and the
      </p>
      <p>
        EC STREP Project AMPLE IST-033710.
improving the separation and composition of variable features in an SPL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
Model-Driven Development offers mechanisms for automating repetitive and
time consuming tasks of the SPL development lifecycle, such as product
derivation processes [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>Currently there is no process for architectural design and implementation
that: (1) uses advanced techniques for separating variable features at the
architectural design and implementation stages; (2) uses model-driven techniques
for automating repetitive, laborious and time-consuming tasks; and (3) generates
automatically models of specific products for each development stage. This latter
issue is helpful for reengineering specific products according to user requirements
not originally covered by an SPL.</p>
      <p>This paper presents as main contribution a feature-oriented model-driven
process, named TENTE1, for SPL architectural design and implementation.
This process integrates relevant advances, from an SPL point of view, for
separation of concerns and MDD technologies. Advanced mechanisms for separation
of concerns enable the encapsulation of variants in separate units. This
separation simplifies variant management and composition, thereby facilitating
product derivation. Separation of variants is kept both at the architectural design
and implementation levels. Moreover, MDD techniques help to automate part
of this process, such as the generation of the implementation skeletons or the
product derivation process, avoiding the need for repetitive and tedious tasks
to be performed manually. For each specific product derived from the SPL, a
software architecture and an implementation, specific for that product, are
obtained. Moreover, this process does not require any knowledge of model-driven
techniques</p>
      <p>After this introduction, this paper is structured as follows: Section 2 describes
the different steps that comprise our approach. Section 3 discusses the benefits
it provides, and concludes with comments on related and future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The TENTE approach</title>
      <p>
        This section provides a general overview of TENTE. The process is comprised
of five steps, as depicted in Figure 1. It covers the architectural design and
implementation software development stages, both at the domain and
application engineering levels. Software architectural models are expressed in UML 2.0.
The implementation language selected is CaesarJ [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], a language with special
features, such as virtual classes and mixin composition, for Feature-Oriented
Programming (FOP).
      </p>
      <p>The first three steps correspond to the Domain Engineering level. They serve
to create the infrastructure from which specific products will be derived. The
last two steps correspond to the Application Engineering level and they serve to
1 TENTE is the Spanish name for Lego. We have selected this name because we view
an SPL as a Lego game: it is about constructing specific products from prebuilt
blocks.</p>
      <p>Architectural Design</p>
      <p>AArcrhcihtietcetcutruere</p>
      <p>VML</p>
      <sec id="sec-2-1">
        <title>Domain Engineering</title>
      </sec>
      <sec id="sec-2-2">
        <title>Application Eng.</title>
        <p>4
AArcrhchitietcetcuturere
2
5</p>
        <p>Implementation
cclass{
//TODO
}
create specific products inside an SPL. The whole process is as described in the
following subsections.</p>
        <p>First of all, an architectural model for the SPL is constructed (Figure 1, label
1). This architectural model is comprised of three elements: (1) a
cardinalitybased feature model; (2) a UML 2.0 model; and (3) a VML (Variability Modelling
Language) specification.</p>
        <p>
          The cardinality-based feature model [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] specifies which parts of the
architecture are variable and why they are variable. This represents problem space or
variability specification.
        </p>
        <p>
          The UML 2.0 model, which we have named reference architecture, contains
the architectural design of both the commonalities and the variabilities of a
complete family of products. Coarse-grained variants are separated in different UML
packages, which are then combined by means of the UML merge operator,
similarly to Laguna et al [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Each package represents an architectural increment,
which adds new components, interfaces and so forth to an existing architecture,
extending it with new functionalities. Fine-grained variants are supported using
traditional techniques, such as the same interface being implemented by
different components. For modelling the software architecture, component, class,
composite structure, deployment and sequence diagrams are used. At domain
engineering level, component types for constructing specific products are
specified. At application engineering level, instances of these component types are
assembled for configuring specific products.
        </p>
        <p>Figure 2 shows an example of feature and software architectural models for
a Smart Home case study, provided by Siemens in the context of the AMPLE
project2.
2 http://www.ample-project.net
Smart Home</p>
        <p>[1..*]</p>
        <p>Room
LightMng SmartEnergyMng HeaterMng</p>
        <p>[1..*]
Light Celsius</p>
        <p>Farenheit</p>
        <p>WindowMng
cs [ SmartHome]
&lt;&lt;component&gt;&gt;</p>
        <p>House
actuators</p>
        <p>request
gtw : Gateway
: LightCtrl [0..*]
a
c
}
Variant Fahrenheit{</p>
        <p>SELECT:connectG(ateway,FahrenheitHtrCtrl)through interface(IHeater;)</p>
        <p>UNSELECT:remove(FahrenheitHtrCtrl);</p>
        <p>
          The link between the feature model and the reference architecture is
established using VML (Variability Modelling Language) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] (see Figure 3), an
innovative language for connecting variability specification (i.e problem space) with
variability realisation (i.e. solution space). A VML specification also contains
all the information required for automatically deriving the architectural model
of a specific product from the reference architecture. For each variant, special
primitives specify which actions must be carried out if a variant is selected or
deselected. Figure 3 shows an excerpt of a VML specification for the example of
Figure 2.
        </p>
        <sec id="sec-2-2-1">
          <title>Step 2: Transformation of architectural models into implementation</title>
          <p>
            Using a code generator, part of the implementation is automatically
generated from the reference architecture (Figure 1, label 2). More specifically, the
skeleton of components and the logic for connecting them are generated. The
part corresponding to the behaviour of each method is left empty for the
completion at the implementation level. Separation of variants achieved at modelling
level is preserved at the implementation level using CaesarJ family classes and
mixin composition [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ].
          </p>
        </sec>
        <sec id="sec-2-2-2">
          <title>Step 3: Domain engineering implementation</title>
          <p>Each component skeleton previously generated is completed with its
corresponding business logic. As a result, a set of components implementing the family
of products is obtained. We only need to appropriately instantiate and connect
these components in order to obtain a specific product. This is addressed at the
application engineering level. This step completes the domain engineering level.
2.2</p>
          <p>Application Engineering level
At the application engineering level, a specific product is configured by selecting
those features that must be included in that product and subsequently
instantiating and connecting components according to that selection of features.</p>
        </sec>
        <sec id="sec-2-2-3">
          <title>Step 4: Derivation of a specific architectural model</title>
          <p>
            The first step in our process is the creation of a configuration of the feature
model, i.e. a valid selection of variants to be included in a specific product. Using
this configuration, the architectural model of the desired product is
automatically derived from the reference architecture, by executing the VML
specification. A VML specification is compiled into a set of model transformations that
actually implement the product derivation process [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ]. The main contribution
of VML is that the software architect does not need to have any expertise in
model transformation techniques, since the transformations are automatically
generated by the VML compiler.
          </p>
        </sec>
        <sec id="sec-2-2-4">
          <title>Step 5: Derivation of a specific implementation</title>
          <p>The software architectural model obtained in the previous step is
automatically transformed into a complete implementation in CaesarJ, using a code
generator. This code generator basically creates the component instances which
are required for assembling a specific product. These component instances are
also appropriately initialised and connected by the code generator. As a result,
the complete implementation of a specific product is obtained.
3</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusions and Future Work</title>
      <p>
        This work has presented TENTE, a model-driven process for SPL architectural
design and implementation. As compared to other approaches, TENTE provides:
1. Separation of coarse-grained variants both at the architectural and at the
implementation levels, using UML packages combined by means of merge
operators and CaesarJ family classes, respectively. The separation of
variants is therefore kept at the implementation level, unlike other model-driven
approaches [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. CaesarJ provides a stronger type system that enables feature
instantiation and its polymorphic use. It also facilitates feature dependency
management, compared to other feature-oriented approaches, such as
Laguna et al [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] or Trujillo et al [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
2. Several parts of the process are automated by means of model
transformations. The application engineering level and product derivation processes are
fully automated. At the domain engineering level, 30%-70% of the
implementation code is automatically generated.
3. The generation of software architectural models at the application
engineering level allows the software architecture of a specific product to be adapted
according to new user requirements. Other approaches, such as Trujillo et
al [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], only consider the creation of artefacts for specific products at the
implementation level. Thus, the benefits of using models at different abstraction
levels are lost at the application engineering level.
      </p>
      <p>As future work, we have planned to add behavioural diagrams, such as UML
2.0 state machines for describing component protocols, to the the software
architecture description. This will allow a larger amount of code to be directly
derived from models, increasing the level of abstraction at which software
systems are developed. We will also integrate the process presented in this paper
with methodologies for SPL requirements engineering, in order to cover all the
stages of the software lifecycle.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Pohl</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          et al: Software Product Line Engineering: Foundations, Principles and Techniques. Springer (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Aracic</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          et al:
          <article-title>An Overview of CaesarJ</article-title>
          .
          <source>In: Transactions on Aspect-Oriented Software Development I.</source>
          (
          <year>2006</year>
          )
          <fpage>135</fpage>
          -
          <lpage>173</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Mezini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ostermann</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Variability Management with Feature-Oriented Programming and Aspects</article-title>
          .
          <source>In: 12th Int. Symp. on Foundations of Software Engineering (FSE)</source>
          .
          <article-title>(</article-title>
          <year>2004</year>
          )
          <fpage>127</fpage>
          -
          <lpage>136</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Trujillo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          et al:
          <article-title>Feature Oriented Model Driven Development: A Case Study for Portlets</article-title>
          .
          <source>In: 29th Int. Conference on Software Engineering (ICSE)</source>
          .
          <article-title>(</article-title>
          <year>2007</year>
          )
          <fpage>44</fpage>
          -
          <lpage>53</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Czarnecki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          et al:
          <article-title>Staged Configuration through Specialization and Multilevel Configuration of Feature Models</article-title>
          .
          <source>Software Process: Improvement and Practice</source>
          <volume>10</volume>
          (
          <year>2005</year>
          )
          <fpage>143</fpage>
          -
          <lpage>169</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Laguna. M.</surname>
          </string-name>
          <article-title>A</article-title>
          . et al:
          <article-title>Seamless Development of Software Product Lines</article-title>
          .
          <source>In: 6th Int. Conference on Generative Programming and Component Engineering (GPCE)</source>
          .
          <article-title>(</article-title>
          <year>2007</year>
          )
          <fpage>85</fpage>
          -
          <lpage>94</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. S´anchez, P. eh al.:
          <article-title>Engineering Languages for Specifying Product-derivation Processes in Software Product Lines</article-title>
          .
          <source>In: 1st Int. Conference on Software Language Engineering (SLE)</source>
          .
          <article-title>(</article-title>
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Voelter</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Groher</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Product Line Implementation using Aspect-Oriented and Model-Driven Software Development</article-title>
          .
          <source>In: 11th Int. Software Product Line Conference (SPLC)</source>
          .
          <article-title>(</article-title>
          <year>2007</year>
          )
          <fpage>233</fpage>
          -
          <lpage>242</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>