<!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>Quality Assurance of Textual Models within Eclipse using OCL and Model Transformations</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Thorsten Arendt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gabriele Taentzer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Weber</string-name>
          <email>weber87g@informatik.uni-marburg.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Philipps-Universitat Marburg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Modern software development processes often use domainspeci c modeling languages (DSMLs) combined with custom code generators and/or interpreters. Especially textual DSMLs as provided by Eclipse Xtext are becoming more and more popular. As a consequence, software quality assurance frequently leads back to quality assurance of the involved textual models. Here, various quality aspects have to be considered depending on the modeling purpose and domain. In this paper, we present a quality assurance tool set for textual models in Eclipse using several interrelated components like Xtext, EMF Refactor, Henshin and the OCL tools which are all based on the Eclipse Modeling Framework (EMF). The practicability and exibility of this tool set are demonstrated by the design and implementation of a case study that is based on a textual modeling language for simple web applications named SWM (Simple Web Modeling Language).</p>
      </abstract>
      <kwd-group>
        <kwd>model-based development</kwd>
        <kwd>textual modeling</kwd>
        <kwd>quality assurance</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The use of models in modern software development processes is becoming more
and more popular. Model-based software development (MBSD) lifts software
models to be the primary artifacts in the software development process. This
is especially true in model-driven software development (MDSD) where
models are nally used for code generation purposes. Moreover, the use of (often
textual) domain-speci c modeling languages (DSMLs) is a promising trend in
modern software development processes to overcome the drawbacks concerned
with the universality and the broad scope of general-purpose languages like the
Uni ed Modeling Language (UML) [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. Such a DSML can help to bridge the
gap between a domain experts view and the implementation.
      </p>
      <p>
        Often, a DSML comes along with a code generator and/or interpreter to
provide functionality that should be hidden from the domain expert. In the
generator case, high code quality can be reached only if the quality of input
models is already high. Typical quality assurance techniques considering the
model syntax are model metrics, model smells, and model refactorings. In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
we present the integration of these techniques in a prede ned quality assurance
process that can be adapted to speci c project needs.
      </p>
      <p>
        This paper contributes a exible quality assurance tool set for textual
models supporting quality assurance techniques like model metrics, smells, and
refactorings integrated in textual model editors within the Eclipse IDE [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This
set integrates the following tools which are all build atop the Eclipse
Modeling Framework (EMF) [
        <xref ref-type="bibr" rid="ref20 ref8">20, 8</xref>
        ], a widely used open source technology used in
MBSD: Xtext [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] for providing the language infrastructure, EMF Refactor [
        <xref ref-type="bibr" rid="ref4 ref9">4,
9</xref>
        ] for providing model quality assurance tooling, query languages like the Object
Constraint Language (OCL/MDT) [
        <xref ref-type="bibr" rid="ref15 ref17 ref21">17, 15, 21</xref>
        ] for specifying quality assurance
techniques, and the model transformation language Henshin [
        <xref ref-type="bibr" rid="ref1 ref13">1, 13</xref>
        ] for
specifying refactorings. Here, EMF Refactor's code generation facilities provide the
designer to concentrate on the essential speci cation parts only.
      </p>
      <p>To demonstrate the practicability and exibility of this tool set we present a
case study for quality assurance of textual models. As example language we take
a DSML called Simple Web Model (SWM) for de ning a speci c kind of web
applications in a platform-independent way1. In the case study, we concentrate
on quality aspect completeness, i.e., we analyze whether SWM models are ready
for code generation and improve model parts using domain-speci c refactorings.
The case study shows that Eclipse is particularly valuable for implementing
model quality assurance tools. On the one hand, the plugin technology provides
a exible choice of concrete speci cation languages. On the other hand, the use
of the abstract syntax (provided by EMF) for implementing quality assurance
techniques provides a exible use for visual and textual models in Eclipse.</p>
      <p>The paper is structured as follows: In Section 2, we re ect the used model
quality assurance process. Section 3 presents the textual SWM language and an
example SWM instance model being used in Section 4 to discuss and present
techniques and tool support for quality assurance of SWM models. Finally, we
conclude with related work in Section 5 and a summary in Section 6.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Model quality assurance</title>
      <p>
        The increasing use of model-based or model-driven software development
processes induces the need for high-quality software models. In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we propose a
model quality assurance process that consists of two sub-processes: a process for
the speci cation of project-speci c model quality assurance techniques, and a
process for applying them on concrete software models during a MBSD process
(see right-hand side of Figure 1). For a rough model overview (for example,
during a model review), a report on model metrics might be helpful. Furthermore,
a model can be checked against the existence (respectively absence) of speci ed
model smells. Each model smell found has to be interpreted in order to
evaluate whether it should be eliminated by a suitable model modi cation (either by
a manual model change or a refactoring). This check-improve cycle should be
performed as long as needed to get a reasonable model quality.
      </p>
      <p>
        In our approach, we de ne a process for specifying new quality assurance
techniques as shown in the left-hand side of Figure 1. After having identi ed the
1 Several variations of SWM are used in literature, for example in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
intended modeling purpose the most important quality goals are selected. Here,
we have to consider several conditions in uencing the selection of signi cant
quality aspects being the most important ones for modeling in a speci c software
project. The selection of signi cant quality aspects depends on the modeling
purpose. Since modeling purposes are quite di erent and vary in several software
projects, a quality aspect that is very important in one software project might
be less important in other ones.
      </p>
      <p>In the next step, static syntax checks for these quality aspects are de ned.
This is done by formulating questions that should lead to so-called model smells
hinting to model parts that might violate a speci c model quality aspect. Some of
these answers can be based on metrics. Other questions may be better answered
by considering speci c patterns which can be formulated on the abstract syntax
of the model. A speci ed smell serves as precondition of at least one model
refactoring that can be used to restructure models in order to improve model
quality aspects but appreciably do not in uence the semantics of the model.
3</p>
    </sec>
    <sec id="sec-3">
      <title>SWM: simple web modeling language</title>
      <p>
        In the case study, we assume the following scenario (taken from [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]): A
software development company is repeatedly building simple web applications
being mostly used to populate and manage persistent data in a database. Here, a
typical three-layered architecture following the Model-View-Controller (MVC)
pattern [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] is used. As implementation technologies, a relational database for
persisting the data as well as plain Java classes for retrieving and modifying the
data are employed for building the model layer. The company decided to
develop its own textual DSML called Simple Web Modeling Language (SWM) for
de ning their speci c kind of web applications in a platform-independent way.
Based on SWM instances, platform-speci c models following the MVC pattern
should be derived with model transformations from which the Java-based
implementations are nally generated. Considering this transformation chain, the
nally generated Java code de nes the semantics of the SWM language.
      </p>
      <p>The SWM language is de ned as follows. A WebModel consists of two parts:
a DataLayer for modeling entities which should be persisted in the database,
and a HypertextLayer presenting the web pages of the application. An Entity
owns several Attributes (each having a SimpleType) and can be related to
several other entities. A Page is either a StaticPage having a static content or
a DynamicPage (IndexPage or DataPage) having a dynamic content depending
on a referenced entity type. An IndexPage lists objects of this entity whereas
a DataPage shows concrete information on a speci c entity like its name,
attributes, and references. Finally, pages are connected by Links.</p>
      <p>
        A prominent environment for textual modeling in Eclipse is Xtext [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]
providing an exhaustive language infrastructure for the development of textual,
grammar-based DSMLs. Listing 1 shows an excerpt of the SWM Xtext
grammar2. This excerpt shows altogether three production rules, i.e. for Entity,
Attribute, and IndexPage elements. The language terminals are de ned
using inverted commas (like 'index page' ). The additional information to derive
a meta model is given by assignments. The assignments representing attributes
and cross references are de ned as single-valued assignments (= operator for
mandatory attributes like name; additional ? operator for the optionally
referenced entity) whereas the assignments representing containment references are
all de ned to be multi-valued (+ operator is used in addition to the = operator).
      </p>
      <p>Listing 1. Part of the constructive Xtext grammar of the SWM language
. . .</p>
      <p>E n t i t y : ' e n t i t y ' name=ID ' f '
a t t r i b u t e s+=A t t r i b u t e
r e f e r e n c e s+=R e f e r e n c e ' g ' ;
A t t r i b u t e : ' a t t ' name=ID ' : ' t y p e=SimpleType ;
. . .</p>
      <p>IndexPage :
' i n d e x page ' name=ID ( ' shows e n t i t y ' e n t i t y =[ E n t i t y ] ) ? ' f '
l i n k s+=Link ' g ' ;
. . .
4</p>
    </sec>
    <sec id="sec-4">
      <title>Quality assurance for SWM models</title>
      <p>
        In this section, we use the structured model quality assurance process presented
in Section 2 for textual models of the SWM language. First, we de ne concrete
quality assurance techniques for SWM. Then, we demonstrate how these
techniques are applied on a concrete SWM instance model. Finally, we show concrete
speci cations using di erent speci cation languages.
2 The complete grammar can be found in Appendix A and is partially taken from [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
4.1
      </p>
      <p>
        Quality assurance techniques for SWM models
Since platform-speci c models should be derived from SWM models and should
be used to generate the Java-based implementations, the major quality aspect to
be ful lled on SWM models is Completeness. A model is complete if it contains
all relevant information, and if it is detailed enough according to the modeling
purpose [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. This means for SWM models that (A) on the data layer each entity
must contain all relevant attributes and references to other entities whereas (B)
the hypertext layer must contain a complete set of (potentially linked) pages
which should be depicted within the web application. Potential SWM model
smells violating quality aspect Completeness are:
Empty Entity The entity does not have any attributes or references to other
entities. (This violates completeness issues of type A.)
No Dynamic Page The entity is not referenced by a dynamic page to be
depicted in the web application. (type B)
Unused Entity The entity is referenced neither by a dynamic page nor by
another entity. (types A and B)
Missing Link The index page is not linked by the start page of the web
application. (type B)
      </p>
      <p>Furthermore, several metrics can be used to analyze completeness of SWM
models. For example, metrics Number of Entities in the Model (NEM) and
Number of Dynamic Pages in the Model (NDPM) can be used to get a rst overview
on the model structure. Here, a ratio between the values of these metrics less
than 1 : 2 might be a hint for missing dynamic pages 3. Similarly, metrics
Average number of Attributes (resp. References) in Entities of the Model (AvNAE
resp. AvNRE) are useful to detect missing information in the data layer.</p>
      <p>After having speci ed appropriate model smells, suitable refactorings have
to be de ned in order to support the handling of smelly SWM models. Smells
No Dynamic Page and Unused Entity can be eliminated by a refactoring which
inserts both an index page and a data page referencing the corresponding entity
to the hypertext model (refactoring Insert Dynamic Pages). For eliminating
smell Missing Link an appropriate refactoring Update Links to Index Pages
can be used that ensures that the start page owns links to all index pages of the
model. Finally, there is no adequate refactoring to eliminate smell Empty Entity.
Here, manual model changes should be performed.
4.2</p>
      <p>Application of quality assurance techniques to SWM models
We now assume that the software company has to develop a web application
for the rental system of a vehicle rental company. Listing 2 shows a rst SWM
model being developed in an early stage of the development process.</p>
      <p>For the rst overview on a model, a report on project-speci c model metrics
might be helpful. Calculated metric values are presented in a speci c view within
the Eclipse workbench. For reporting purposes, the results can be exported using
3 I.e., one entity should be referenced by both an index page and a data page.
several output formats (like PDF, HTML, or widely used MS O ce formats)
and designs (like simple lists or tube diagrams). In our concrete example model,
metrics NEM and NDPM (see Section 4.1) are calculated to 4 and 3, respectively.
This means that there are more entities in the web model than dynamic pages
hinting to potentially missing dynamic pages.</p>
      <p>Listing 2. Example SWM instance model before model review
webmodel VehicleRentalCompany f
data f
e n t i t y Customer f
a t t name : String
a t t e m a i l : Email
r e f a d d r e s s : A d d r e s s g
e n t i t y A d d r e s s f
a t t s t r e e t : String
a t t c i t y : String g
e n t i t y Car f</p>
      <p>a t t t y p e : String g
e n t i t y Agency f g g
hypertext f
index page c a r i n d e x shows e n t i t y Car f</p>
      <p>l i n k to page c a r d a t a g
data page c a r d a t a shows e n t i t y Car f g
index page a g e n c y i n d e x shows e n t i t y Agency f
s t a t i c page i n d e x p a g e f
l i n k to page c a r i n d e x
l i n k to page a g e n c y i n d e x g
s t a r t page i s i n d e x p a g e
g
g
g</p>
      <p>To make this problems more explicit (and thus more obvious), EMF Refactor
supports analysis functionality with respect to so-called model smells
representing model parts to be improved. As for model metrics, our tool environment
provides a con guration of speci c model smells being relevant within the
current project. Similarly to the metrics calculation process, a smell analysis can be
triggered from an an element shown in the textual model editor. The results of
a smell analysis are presented in a speci c view within the Eclipse workbench.
The bottom part of Figure 2 shows two entities being not referenced by a
dynamic page (smell No Dynamic Page on entities Customer and Address) and
one occurrence of smells Empty Entity and Unused Entity each. After
selecting a concrete smell occurrence in the tree-based view the involved element is
highlighted in the textual editor (see top part of Figure 2).</p>
      <p>Besides manually changing the model, refactoring is the technique of choice
to eliminate occurring smells. In our example, we can use refactoring Insert
Dynamic Pages to eliminate smell No Dynamic Page on entity Customer 4.
4 Note that we do not eliminate smell No Dynamic Page on entity Address since this
entity is referenced by entity Customer, i.e. it is part of this entity.</p>
      <p>The refactoring is triggered
from the context menu of
entity Customer (see highlighted
part in Figure 2). Then, the
tool set provides two previews:
the rst for visualizing model
changes performed by the
refactoring, the second for a
concrete overview on smell
occurrence changes when
applying the refactoring. The result
of refactoring Insert Dynamic
Pages is shown in Figure 3.</p>
      <p>Two dynamic pages (an index
page and a data page)
referencing entity Customer are in- Fig. 2. Report of concrete smell occurrences in
serted into the hypertext layer our example SWM model and highlighting of
inof the model. Furthermore, the tvhoelvteedxteuleamleXnttexint semdietlolrNo Dynamic Page within
inserted data page is linked by
the index page which is in turn linked by the static page named indexpage being
the starting page of the hypertext layer (see Listing 2).</p>
      <p>
        Due to space limitations,
we have to skip further model
analysis and refactoring steps
here. However, we think that
the application of the
quality assurance process and the
handling of the supporting
Fig. 3. Inserted and changed model elements after tools are su ciently and
plauapplying refactoring Insert Dynamic Pages sibly presented. For more
detailed discussions on process
and tooling we refer to [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. An improved version of the example model
concerning quality aspect completeness can be found in Appendix B of this paper.
4.3
      </p>
      <p>Speci cation of quality assurance techniques for SWM models
EMF Refactor provides a wizard-based speci cation process for quality assurance
techniques as well as basic code generation facilities. This has the advantage that
the designer can concentrate on the essential speci cation part only.</p>
      <p>Listing 3. OCL speci cation of SWM smell No Dynamic Page
context WebModel
def : noDynamicPages ( ) : Set ( E n t i t y ) =</p>
      <p>E n t i t y . a l l I n s t a n c e s ( ) &gt; e x c l u d e s A l l
( DynamicPage . a l l I n s t a n c e s ( ) &gt; c o l l e c t ( e n t i t y ) )</p>
      <p>
        OCL has been proven to be well-suited to specify metrics. For example, metric
NEM is simply de ned using OCL expression self.dataLayer -&gt; size() on
context element WebModel. Listing 3 shows the OCL speci cation of SWM model
smell No Dynamic Pages. OCL operation noDynamicPages() returns the set of
entities being not referenced by any dynamic page (line 2): Starting from all
instances of type Entity within the web model (line 3), we exclude those which
are referenced by at least one dynamic page (line 4).
For refactoring speci cation we use Java and the EMF model transformation
language Henshin [
        <xref ref-type="bibr" rid="ref1 ref13">1, 13</xref>
        ] combined with OCL expressions being used for
precondition checking (not shown here). Here, the use of a model transformation
language like Henshin for refactoring speci cations is a straightforward task.
Figure 4 shows the Henshin rule specifying refactoring Insert Dynamic Pages.
It uses elements of the SWM meta model which is generated by the Xtext
framework. Nodes (and edges) tagged by hhpreserveii represent unchanged model
elements whereas those tagged by hhcreateii represent new ones. In our example,
starting with the contextual element of type Entity (speci ed using node name
selectedEObject ), both a new index page and a new data page referencing this
entity are created. Moreover, the inserted data page is linked by the index page
which is in turn linked by the starting page of the hypertext layer.
      </p>
      <p>
        All the sources of the case study (code, models, quality assurance techniques,
etc.) can be found in the download section of the EMF Refactor web site [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>
        In this section, we give an overview on quality assurance tools within the EMF
world, especially in the eld of textual modeling using Xtext. For a
comprehensive overview also considering quality assurance of UML models we refer to [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        To the best of our knowledge, explicit tool support for metrics calculation on
EMF models is not yet available (besides the EMF Refactor tooling). The EMF
Query Framework [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] can be used to construct and execute query statements
to compute metrics and to check constraints. The con guration of queries in
suites as well as reports on query results in various forms are not provided. The
EMF Validation Framework [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] supports the construction and assurance of
well-formedness constraints for EMF models. To the best of our knowledge, the
functionalities of both frameworks are not integrated into textual Xtext editors.
      </p>
      <p>
        The Epsilon language family [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] provides the Epsilon Validation Language
(EVL) to validate EMF-based models with respect to constraints that are, in
their simplest form, quite similar to OCL constraints. For reporting, EVL
supports a speci c validation view reporting the identi ed inconsistencies in a
textual way. Suitable quick xes are formulated in the Epsilon Object Language
(EOL) being the core language of Epsilon. It is therefore not speci cally
dedicated to model refactoring. For this purpose, Epsilon provides the Epsilon
Wizard Language (EWL) [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. We compare our rst refactoring prototype with EWL
in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Again, to the best of our knowledge, functionalities provided by Epsilon
languages can not be used within textual Xtext editors in an integrated way.
      </p>
      <p>
        In another approach, the authors propose the de nition of EMF-based
refactoring in a generic way [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. However, they do not consider the comprehensive
speci cation of preconditions. Our experiences in refactoring speci cation show
that it is mainly the preconditions that cannot be de ned generically.
      </p>
      <p>Xtext has outstanding support for static model analysis and validation.
Custom constraints and quick xes can be de ned to tackle errors and warnings
instantaneously. However, the main purpose of these constraints and quick xes
is to address model consistency. They are not especially dedicated to quality
assurance in a common sense. Moreover, there is no support for custom
congurations of validation suites. Furthermore, Xtext provides basic refactoring
functionality for generic renaming of arbitrary model elements. Support for
custom refactorings (for example, for custom DSMLs like SWM) is not provided.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and Future Work</title>
      <p>In this paper, we present a exible tool set for quality assurance of textual models
within Eclipse. The tool set integrates a number of tools which are all built atop
EMF (Xtext, EMF Refactor, OCL/MDT, and Henshin). In a case study, we use
a DSML for de ning a speci c kind of web applications and concentrate on the
quality aspect completeness. We use model metrics and model smells for static
analysis and model refactoring for improving the structure of the models.</p>
      <p>
        The implementation shows that (1) the structured model quality assurance
process presented in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] can be also adapted to textual models and that (2) the
tool set presented in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] is exible enough to be integrated in textual model
editors provided by Xtext. Here, EMF Refactor's code generation facilities
provide the designer to concentrate on the essential speci cation parts only.
Moreover, the case study shows that Eclipse is particularly valuable for implementing
model quality assurance tools. On the one hand, the plugin technology provides
a exible choice of concrete speci cation languages. On the other hand, the use
of the abstract syntax (provided by EMF) for implementing quality assurance
techniques provides a exible use for visual and textual models in Eclipse.
      </p>
      <p>Future work on the topic presented in this paper is separated into two
directions. On the one hand, we want to integrate further speci cation languages
into the EMF Refactor infrastructure. Here, we are currently working on the
integration of EMF Query. On the other hand, it would be useful to provide a
suite of prede ned metrics, smells, and refactorings for speci c Xtext grammars
in order to analyze and improve the structure of the corresponding language.
A Complete Xtext grammar of the SWM language
grammar org . e c l i p s e . emf . r e f a c t o r . examples . SimpleWebModel
with org . e c l i p s e . x t e x t . common . Terminals
generate simpleWebModel " http : / /www. e c l i p s e . org /SWM/ 1 . 0 "
WebModel : ' webmodel ' name=ID ' f '
dataLayer=DataLayer
hypertextLayer=HypertextLayer
' g ' ;
DataLayer : ' data f ' f DataLayer g</p>
      <p>e n t i t i e s+=Entity
' g ' ;
Entity :</p>
      <p>' e n t i t y ' name=ID ' f '
a t t r i b u t e s+=A t t r i b u t e
r e f e r e n c e s+=R e f e r e n c e
' g ' ;
A t t r i b u t e : ' att ' name=ID ' : ' type=SimpleType</p>
      <p>;
enum SimpleType : Boolean j Email j I n t e g e r j S t r i n g
;
R e f e r e n c e : ' r e f ' name=ID ' : ' type =[ Entity ]</p>
      <p>;
HypertextLayer : ' h y p e r t e x t f '
pages+=Page+
' s t a r t page i s ' s t a r t P a g e =[ S t a t i c P a g e ]
' g ' ;
Page : S t a t i c P a g e j DynamicPage</p>
      <p>;
S t a t i c P a g e : ' s t a t i c page ' name=ID ' f '
l i n k s+=Link
' g ' ;
Link : ' l i n k to page ' t a r g e t =[Page ]</p>
      <p>;
DynamicPage : IndexPage j DataPage</p>
      <p>;
IndexPage :
' index page ' name=ID ( ' shows e n t i t y ' e n t i t y =[ Entity ] ) ? ' f '
l i n k s+=Link
' g ' ;
DataPage :
' data page ' name=ID ( ' shows e n t i t y ' e n t i t y =[ Entity ] ) ? ' f '
l i n k s+=Link
' g ' ;</p>
      <p>Listing 4. Complete Xtext grammar of the SWM language
webmodel VehicleRentalCompany f
data f
entity Customer f
att name : String
att email : Email
ref a d d r e s s : Address
ref account : BankAccount g
entity Address f
att s t r e e t : String
att postalCode : I n t e g e r
att c i t y : String g
entity BankAccount f
att number : I n t e g e r
att bankCode : String
att bankName : String g
entity Car f
att manufacturer : String
att type : String
att power : I n t e g e r g
entity Agency f</p>
      <p>ref a d d r e s s : Address g
g
hypertext f
index page c a r i n d e x shows entity Car f</p>
      <p>link to page cardata g
data page cardata shows entity Car f g
index page agencyindex shows entity Agency f</p>
      <p>link to page agencydata g
data page agencydata shows entity Agency f g
index page customerindex shows entity Customer f
link to page customerdata g
data page customerdata shows entity Customer f g
s t a t i c page indexpage f
link to page agencyindex
link to page c a r i n d e x
link to page customerindex g
start page i s indexpage</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Arendt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Biermann</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jurack</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krause</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taentzer</surname>
          </string-name>
          , G.:
          <article-title>Henshin: Advanced Concepts and tools for In-Place EMF Model Transformation</article-title>
          .
          <source>In: MoDELS 2010</source>
          . pp.
          <volume>121</volume>
          {
          <fpage>135</fpage>
          . LNCS, Springer (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Arendt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kranz</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mantz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Regnat</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taentzer</surname>
          </string-name>
          , G.:
          <article-title>Towards Syntactical Model Quality Assurance in Industrial Software Development: Process De nition and Tool Support</article-title>
          .
          <source>In: Software Engineering. LNI</source>
          , vol.
          <volume>183</volume>
          , pp.
          <volume>63</volume>
          {
          <fpage>74</fpage>
          .
          <string-name>
            <surname>GI</surname>
          </string-name>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Arendt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mantz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taentzer</surname>
          </string-name>
          , G.:
          <article-title>Model Refactoring in Eclipse by LTK, EWL, and EMF Refactor: A Case Study</article-title>
          .
          <source>In: Model-Driven Software Evolution, Workshop Models and Evolution</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Arendt</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taentzer</surname>
          </string-name>
          , G.:
          <article-title>A tool environment for quality assurance based on the Eclipse Modeling Framework</article-title>
          .
          <source>Journal on Automated Software Engineering</source>
          <volume>20</volume>
          , 141{
          <fpage>184</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. A mann, U.,
          <string-name>
            <surname>Bartho</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Burger,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Cech</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Demuth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Heidenreich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Johannes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Karol</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Polowinski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Reimann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Schroeter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Seifert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Thiele</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Wende</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Wilke</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          :
          <article-title>DropsBox: the Dresden Open Software Toolbox</article-title>
          .
          <source>Software &amp; Systems</source>
          Modeling pp.
          <volume>1</volume>
          {
          <issue>37</issue>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Brambilla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabot</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wimmer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Model-Driven Software</surname>
          </string-name>
          Engineering in Practice.
          <source>Synthesis Lectures on Software Engineering</source>
          , Morgan &amp; Claypool (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7. Eclipse. http://www.eclipse.org/</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Eclipse</given-names>
            <surname>Modeling</surname>
          </string-name>
          <article-title>Framework (EMF)</article-title>
          . http://www.eclipse.org/modeling/emf/
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>EMF</given-names>
            <surname>Refactor</surname>
          </string-name>
          . http://www.eclipse.org/emf-refactor/
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>EMF</given-names>
            <surname>Validation</surname>
          </string-name>
          <article-title>Framework</article-title>
          . http://www.eclipse.org/modeling/emf/?project=validation
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Epsilon</surname>
          </string-name>
          . http://www.eclipse.org/epsilon/
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Helm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Johnson, R.,
          <string-name>
            <surname>Vlissides</surname>
          </string-name>
          , J.: Design Patterns:
          <article-title>Elements of Reusable Object-Oriented Software</article-title>
          . Addison-Wesley, Boston, MA, USA (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Henshin</surname>
          </string-name>
          . http://www.eclipse.org/henshin/
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Kolovos</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paige</surname>
            ,
            <given-names>R.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polack</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rose</surname>
            ,
            <given-names>L.M.</given-names>
          </string-name>
          :
          <article-title>Update Transformations in the Small with the Epsilon Wizard Language</article-title>
          .
          <source>Journal of Object Technology</source>
          <volume>6</volume>
          (
          <issue>9</issue>
          ),
          <volume>53</volume>
          {
          <fpage>69</fpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Model Development</surname>
          </string-name>
          <article-title>Tools (MDT)</article-title>
          . http://www.eclipse.org/modeling/mdt/
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Mohagheghi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dehlen</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neple</surname>
          </string-name>
          , T.:
          <article-title>De nitions and Approaches to Model Quality in Model-Based Software Development { A Review of Literature</article-title>
          .
          <source>Information and Software Technology</source>
          <volume>51</volume>
          (
          <issue>12</issue>
          ),
          <volume>1646</volume>
          {
          <fpage>1669</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>OMG:</surname>
          </string-name>
          <article-title>Object Constraint Language (OCL)</article-title>
          . http://www.omg.org/spec/OCL/2.3.1/
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>18. OMG: Uni ed Modeling Language (UML), http://www.uml.org</mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>19. EMF Query. http://www.eclipse.org/projects/project.php?id=modeling.emf.query</mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Steinberg</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Budinsky</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patenostro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Merks</surname>
          </string-name>
          , E.: EMF:
          <article-title>Eclipse Modeling Framework, 2nd Edition</article-title>
          . Addison
          <string-name>
            <surname>Wesley</surname>
          </string-name>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Willink</surname>
          </string-name>
          , E.D.:
          <article-title>Modeling the OCL Standard Library</article-title>
          .
          <source>ECEASST</source>
          <volume>44</volume>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Xtext</surname>
          </string-name>
          . http://www.eclipse.org/Xtext
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>