<!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>Operators for Template-Based MDE</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Matthieu Allon</string-name>
          <email>Matthieu.Allon@etudiant.univ-lille1.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Lille - CRIStAL Lab. (UMR CNRS 9189) France</institution>
          ,
          <addr-line>Villeneuve d'Ascq</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>In MDE, design of systems can be improved and accelerated thanks to reusable models which are made available in model repositories or libraries. This paper focuses on the construction and exploitation of \o -the-shelf" model template bases. Model templates are parameterized models which are adaptable to various application contexts. Due to their parameterization, model templates have their own modeling space. In this paper, we present the main modeling activities that underlie this space, their dedicated engineering processes and their actors, and we contribute to the model reuse improvement by detailing new template operators for the described modeling activities. A software environment is shown to illustrate template based engineering in Eclipse.</p>
      </abstract>
      <kwd-group>
        <kwd>Model Templates</kwd>
        <kwd>Model Reuse</kwd>
        <kwd>Model Space</kwd>
        <kwd>Template Engineering</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In MDE, model reuse is a big challenge that aims to facilitate the
capitalization of design e orts and logics (\o -the-shelf" model component libraries [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]),
then to accelerate system design and improve their quality. In existing work, the
main approaches are either based on reuse of composable model pieces, or on
parameterized models which are adaptable to various application contexts [
        <xref ref-type="bibr" rid="ref11 ref2 ref7">2,7,11</xref>
        ].
We contributed to this research by studying model parameterization techniques
such as the one o ered by the UML \Template" construct. Templates di er from
composable model pieces due to template parameterization which clearly
identies what is required for a reusable model: parameterization acts as an interface
specifying what is required [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. We have de ned two approaches that allow the
design of systems by assembling templates through parameterization [
        <xref ref-type="bibr" rid="ref14 ref15 ref3">3, 14, 15</xref>
        ].
      </p>
      <p>Starting from these works, we focus now on the construction and exploitation
of model template bases and the related engineering processes. Our objective is
to increase the capacities for creating, composing and reuse templates within
such bases by proposing new template operators. Resulting model spaces must
be systematically characterized to master and exploit their structuring
properties. After a reminder on model templates (Section 2), we present our vision of
model template spaces (Section 3) and the related operators (Section 4). Then,
we describe a software environment in Eclipse to construct and exploit model
template spaces in UML (Section 5).</p>
    </sec>
    <sec id="sec-2">
      <title>2 Aspectual Templates in UML</title>
      <p>
        UML Templates [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] allow to capture modeling constructs which expose some
of their constituents as parameters. Such constructs can be classes or packages
(but not only). To specify its parameterization, a template owns a signature,
which is a list of formal parameters where each one designates an element that
is part of the templated model. It is the intent of templates to be reused. For
template application, the standard de nes a speci c \template binding"
relationship which allows to specify how the content of a base model is derived from
a template through the substitution of its parameters.
      </p>
      <p>
        In UML, template parameters form an unstructured set of model elements
so that the construct is general and permissive enough to render much of model
parameterization needs such as the modeling of generic classes (such as C++
templates) [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], the capture of Design Patterns [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], View [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] or Aspect
Oriented Modeling [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], we proposed a compatible enhancement of UML
templates (Aspectual Templates ). It consists in enforcing templates to have a
full model as parameter (parameter model ) to improve their consistency,
notably for aspectual usages, but also to better specify the model of systems to
which the functionalities will apply. Following this, the binding mechanism has
been adapted to enable substitution of the model parameter by a conforming
substructure of the base model.
      </p>
      <p>Figure 1 gives an example of such an enhanced template: the observer pattern
template is applied to a base model (the CarHiringSystem application context)
for installing functionalities between an agency and a client for observing car
availability. Each substitution in the binding follows the same mechanism as the
one described for the Subject and Agency bound elements: Subject is bound to
Agency, so all constituents of Subject are injected in Agency.</p>
      <p>One can observe that (1) the template parameters (see the superimposed
dashed box) form the parameter model and (2) its structure is well-preserved by
the substituted elements in the binding.</p>
      <p>Subject</p>
      <p>The previous template construct and application mechanism allow to design
complex systems from assemblies of templates but also to obtain richer templates
from existing ones.</p>
    </sec>
    <sec id="sec-3">
      <title>3 Template Based Model Engineering</title>
      <p>On the basis of the previous model template technique, speci c modeling
spaces with their engineering practices and automatic processes emerge. Fig.2
shows an illustration of such a modeling space with involved actors and activities
around a model repository containing templates and models that they share.</p>
      <p>Model
Repository</p>
      <p>In this modeling space, designers of model templates are mainly concerned
with \design for reuse" and the constitution of libraries. They have to identify
candidate models of functionnalities and render them as model templates for
enabling their reuse. Several activities (see Fig.2) are of interest for this engineering
task :
{ New template creation by the parameterization of unparameterized models
from the selection of model constituents (activity (A)).
{ Composition of existing templates in order to build richer ones, by template
merging or template-to-template binding (activity (B)).
{ Decomposition of a previously identi ed complex template which leads to
identify ner ones (activity (C)).
{ Induction of new templates from previously designed models of systems
which share common functionalities (activity (D)).</p>
      <p>Application modelers are much concerned with \design by reuse"
methodology (right of Fig.2). From template designers, they get the possibility to exploit
model templates for their application needs in a safe manner through \template
binding". This latter allows complex system construction by successive
application of templates.</p>
      <p>All these practices must be controlled in an homogeneous and consistent
manner. This requires a precise formalization and characterization of model
templates as well as their relationships and dedicated operators.</p>
    </sec>
    <sec id="sec-4">
      <title>4 Aspectual Template Operators</title>
      <p>
        To support activities described previously, we can think of many useful
template operators. To our knowledge, there are approaches using templates [
        <xref ref-type="bibr" rid="ref2 ref8 ref9">2, 8, 9</xref>
        ]
and other o er model operator [
        <xref ref-type="bibr" rid="ref4 ref5 ref7">4, 5, 7</xref>
        ]. However, neither approach o ers
operators on templates, i.e. operators considering model parameterization. Table 1
gives the studied operators, with their functional signature (operands and
result), their meaning description and their related activity.
      </p>
      <p>
        In our previous work, we deeply studied the operators for applying templates
through substitutions of their parameters that are the apply [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] and the
instan
      </p>
      <p>Both previous operators are useful to allow a template designer to create
various versions of a template, i.e. templates with the same constituents, but
with di erent parameter models. This is interesting for applications designers
to compose a template 1 with a model which does not need a binding with all
parameter constituents. Concerning the third new operator, extract, it allows a
template designer to obtain a part of template, which can be useful to extract,
for instance, design patterns from others (e.g. a singleton from a factory).</p>
    </sec>
    <sec id="sec-5">
      <title>5 EMF technology</title>
      <p>We are implementing a software environment dedicated to template based
model engineering in Eclipse, with plugins based on the o cial EMF (Eclipse
Modeling Framework), UML and OCL plugins. They o er core functionalities
to specify and verify templates well-formedness and their binding in a compliant
way with UML thanks to a speci c pro le. In addition, these plugins provide
original facilities to support other modeling tasks targeting templates or user
assistance (e.g. signatures and bindings inference and automatic completion). All
these functionalities are reusable for modeling tools handling model templates.</p>
      <p>1For instance, representing a design pattern.</p>
      <p>In our case, they are experimented through an in-progress case study2 in a CASE
tool prototype3 (see Fig. 4).</p>
      <p>
        Following main features are currently under study to support plain template
based engineering:
{ An engine for determining inclusion and typing relationships between
templates and their constituents. Such relationships should permit template
hierarchical structuring, useful to template-based activities. We are developing
this by exploiting our generic submodel engine [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
{ A richer set of template operators. Currently, only parameterization,
merging, instantiation and aspectual binding with their checking, completion and
inference facilities are available. Other operators are under study.
{ Template searching capacities in model repositories. Using the relationships
above, a searching system similar to the one described in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] but speci c
to templates can be developed. From a selected template, this system will
enable to nd similar templates according to its constituents into repositories
and hierarchically present them.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6 Conclusion</title>
      <p>In this paper, starting from our previous work, we sketch the model template
modeling space and its associated engineering. This work presents new operators,
a general method for developing and using the templates, and describes a
workin-progress tool to support the management and use of templates.</p>
      <p>
        De ning the envisioned set of operators raises a large number of issues, and
rst results with the in-progress case study shown that there are still many open
questions: the operator semantics and usages, their algebraic properties and
composition. However, more Fundamental issues need to be investigated to the
help of full template-based modeling and engineering, especially the questions
of model inclusion and model typing within the same meta-modeling space [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>2The case study concerns the modeling of a REST News Server using design
patterns.</p>
      <p>3http://www.cristal.univ-lille.fr/caramel/MBE_Template/
This work will contribute to better theoretical understanding and generalization
of templates for the quest of model reuse and model space structuring.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <source>1. UML 2.4</source>
          .1 Superstructure Speci cation,
          <year>2011</year>
          . http://www.omg.org/spec/UML/2.4.1/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>O.</given-names>
            <surname>Alam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kienzle</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Mussbacher</surname>
          </string-name>
          .
          <article-title>Concern-oriented software design</article-title>
          .
          <source>In International Conference on Model Driven Engineering Languages and Systems</source>
          , pages
          <fpage>604</fpage>
          {
          <fpage>621</fpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Allon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Vanwormhoudt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Carre</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O.</given-names>
            <surname>Caron</surname>
          </string-name>
          .
          <article-title>Isolating and Reusing Template Instances in UML</article-title>
          .
          <source>In 12th European Conference on Modelling Foundations and Applications</source>
          , Vienna, Austria,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>P.A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          .
          <article-title>Applying Model Management to Classical Meta Data Problems</article-title>
          . In CIDR, volume
          <year>2003</year>
          , pages
          <fpage>209</fpage>
          {
          <fpage>220</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>G.</given-names>
            <surname>Brunet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chechik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Easterbrook</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nejati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Niu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Sabetzadeh</surname>
          </string-name>
          .
          <article-title>A manifesto for model merging</article-title>
          .
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>B.</given-names>
            <surname>Carre</surname>
          </string-name>
          , G. Vanwormhoudt, and
          <string-name>
            <given-names>O.</given-names>
            <surname>Caron</surname>
          </string-name>
          .
          <article-title>From subsets of model elements to submodels: A characterization of submodels and their properties</article-title>
          .
          <source>Software &amp; Systems Modeling</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>S.</given-names>
            <surname>Clarke</surname>
          </string-name>
          .
          <article-title>Extending standard UML with model composition semantics</article-title>
          .
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>S.</given-names>
            <surname>Clarke</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.J.</given-names>
            <surname>Walker</surname>
          </string-name>
          .
          <article-title>Generic aspect-oriented design with theme/UML. Aspect-oriented software development</article-title>
          , pages
          <volume>425</volume>
          {
          <fpage>458</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>J. de Lara</surname>
            and
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Guerra</surname>
          </string-name>
          .
          <article-title>From types to type requirements: genericity for modeldriven engineering</article-title>
          .
          <source>Software &amp; Systems Modeling</source>
          , pages
          <volume>453</volume>
          {
          <fpage>474</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>D. D'Souza</surname>
            and
            <given-names>A.C.</given-names>
          </string-name>
          <string-name>
            <surname>Wills</surname>
          </string-name>
          . Catalysis: Objects, Components, and
          <article-title>Frameworks with UML</article-title>
          .
          <source>Object Technology Series. Addison-Wesley</source>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>D. Del Fabro</surname>
            and
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Bezivin</surname>
          </string-name>
          .
          <article-title>Generic model management: from theory to practice</article-title>
          .
          <source>In First International Workshop on Towers of Models - TOWERS</source>
          <year>2007</year>
          , pages
          <issue>1{9</issue>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. M.
          <article-title>Herrmannsdorfer and</article-title>
          <string-name>
            <given-names>B.</given-names>
            <surname>Hummel</surname>
          </string-name>
          .
          <article-title>Library concepts for model reuse</article-title>
          .
          <source>Electronic Notes in Theoretical Computer Science</source>
          , pages
          <volume>121</volume>
          {
          <fpage>134</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>J. Kienzle</surname>
            ,
            <given-names>W. Al</given-names>
          </string-name>
          <string-name>
            <surname>Abed</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Fleurey</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          <string-name>
            <surname>Jezequel</surname>
            , and
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Klein</surname>
          </string-name>
          .
          <article-title>Aspect-oriented design with reusable aspect models</article-title>
          .
          <source>In Transactions on Aspect-Oriented Software Development</source>
          , volume VII, pages
          <volume>272</volume>
          {
          <fpage>320</fpage>
          . Springer,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>A.</given-names>
            <surname>Muller</surname>
          </string-name>
          . Construction de systemes par application de modeles parametres.
          <source>PhD thesis</source>
          , University of Lille 1,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>A.</given-names>
            <surname>Muller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Caron</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Carre</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Vanwormhoudt</surname>
          </string-name>
          .
          <article-title>On some properties of parameterized model application</article-title>
          .
          <source>In Model Driven Architecture{Foundations and Applications</source>
          , pages
          <volume>130</volume>
          {
          <fpage>144</fpage>
          . Springer,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>C.</given-names>
            <surname>Perez</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Bigot</surname>
          </string-name>
          .
          <article-title>Increasing Reuse in Component Models through Genericity</article-title>
          .
          <source>Formal Foundations of Reuse and Domain Engineering Lecture Notes in Computer Science</source>
          ,
          <volume>5791</volume>
          :
          <fpage>21</fpage>
          {
          <fpage>30</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. G. Sunye,
          <string-name>
            <given-names>A.</given-names>
            <surname>Le Guennec</surname>
          </string-name>
          , and
          <string-name>
            <surname>J-M. Jezequel</surname>
          </string-name>
          .
          <article-title>Design Patterns Application in UML</article-title>
          .
          <source>In Proceedings of 14th European Conference on Object-Oriented Programming (ECOOP'2001)</source>
          , pages
          <fpage>44</fpage>
          {
          <fpage>62</fpage>
          . Springer,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>G.</given-names>
            <surname>Vanwormhoudt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Caron</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Carre</surname>
          </string-name>
          .
          <article-title>Aspectual templates in UML: Enhancing the semantics of UML templates in OCL</article-title>
          .
          <source>Software &amp; Systems Modeling, April</source>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. G. Vanwormhoudt,
          <string-name>
            <given-names>B.</given-names>
            <surname>Carre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Caron</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Tombelle</surname>
          </string-name>
          . Recherche de sousmodeles.
          <source>In CIEL 2014, Troisieme Conference en IngenieriE du Logiciel</source>
          , pages
          <volume>126</volume>
          {
          <fpage>130</fpage>
          .
          <string-name>
            <surname>HAL</surname>
          </string-name>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>