<!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>Towards an Automated Fault Localizer while Designing Meta-models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Adel Ferdjoukh</string-name>
          <email>adel.ferdjoukh@univ-nantes.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jean-Marie Mottu</string-name>
          <email>jean-marie.mottu@univ-nantes.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>TU Wien</institution>
          ,
          <addr-line>Vienna</addr-line>
          ,
          <country country="AT">Austria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Nantes, LS2N (UMR CNRS 6004)</institution>
          ,
          <addr-line>Nantes</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <abstract>
        <p>Meta-models are the centrepiece of Model Driven Engineering, required in many activities: modelling, creating DSLs (Domain Specific Languages), xDSLs (executable DSLs), or writing model transformations. Designing large meta-models could be a complicated and error-prone task. Meta-models should then be validated considering their instantiability in particular. Automatic model generators are used and if they are unable to generate models it means the metamodel with its instantiation parameters (e.g. size of the models) is wrong. Several generators exist, but most of them have binary output: success or failure, without helping the meta-model debugging. In this paper, we introduce an approach, in which we statically analyse a meta-model with its instantiation parameters. In this first work, we detect inconsistencies considering each reference or each inheritance separately. Therefore we provide feedback to the meta-model designer to help her to debug the meta-model.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Model Driven Engineering (MDE) is very helpful in managing the
complexity or heterogeneity of software systems. A model-driven
process often begins by the definition of a new meta-model, required,
for instance, to define Domain Specific Language (DSL). The
metamodel plays a key role in all the operations that will be performed
over the software system. For example, meta-models are used to
write model transformations (MT) [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] which transform models into
other models (M2M), or into source code or text (M2T)1.
      </p>
      <p>
        To ensure the correctness of any MDE process, only valid
metamodels must be considered. However designing meta-models is
tedious while dealing with complex systems. It could result in
metamodels invalid for different reasons: semantically wrong w.r.t. its
specification, syntactically wrong (e.g. missing values), or part of
it could be non instantiable, which is the case considered in this
work. Checking the validity of meta-models becomes, de facto, a
very important issue. To validate their meta-models, domain experts
try to instantiate them by creating real life models. However, that
manual checking cannot be applied at a large scale and is therefore
not sufficient. For this task, an existing solution is based on model
generators which are already highly used in the next steps of a
MDE development (e.g., generating test models to validate model
transformations [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]).
      </p>
      <p>
        Several model generation tools exist [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]: e.g., GRIMM [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ],
PRAMANA [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], EMFtoCSP [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], USE [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. They instantiate a meta-model
in order to build conformed models. The inputs of a generator are: a
meta-model, a set of OCL constraints and instantiation parameters.
With these, the user configures the generator in order to choose the
characteristics of instantiated model(s) (e.g., setting the number of
instances generated for each class). Then, the tool transforms those
inputs to send them to a solver which returns model(s) in case of
success or error messages if it fails to generate a valid solution.
However, even if it can alert on the non instantiability of meta-models, it
provides too few help to debug them.
      </p>
      <p>The goal of the approach that is described in this paper, is to
help the meta-model designers to detect and fix invalid meta-models
before facing the annoying but frequent case of generation failure.
We develop an automated fault localizer to help them in debugging
a non instantiable meta-model. Our approach uses Systems of Linear
Inequalities (SLI) and focuses on the class’ relations in the
metamodel and the instantiation parameters. The structure of an Ecore
meta-model is translated into SLI and our custom solver checks
the consistency of a model generation process. In this paper, we
show the first version of the translation of a meta-model into a linear
system, and we describe how we use this in order to provide fixing
suggestions for meta-model designers. The contributions are already
implemented in a tool named TIWIZI which is independent from any
model generation tool.</p>
      <p>The rest of the paper is organised as follows: Section 2 gives
the context and the motivation of the work. Section 3 describes
the fault localization mechanism and presents TIWIZI, a tool that
implements our contribution. Section 4 discusses existing work.
Finally, Section 5 draws conclusions and opens perspectives.
2</p>
    </sec>
    <sec id="sec-2">
      <title>CONTEXT &amp; MOTIVATION</title>
      <p>In this section, we describe the context and the motivations of the
paper when tackling non instantiability of meta-models.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>Meta-Modelling</title>
      <p>The meta-models we consider are written using the EMF/Ecore
language.</p>
      <p>Each class can have one or more attributes. The possible types for
attributes are all the usual primitive types (integer, char, string, etc)
and enumerations.</p>
      <p>In our approach, we consider the relations between classes and
their three variations in an Ecore diagram: reference, bidirectional
reference (a reference and its opposite), composition (a bidirectional
reference in which one class contains the other one). Each relation
has two cardinalities (lower and upper bound) that bound the
number of objects that could be linked to a given object. Bidirectional
references have cardinalities in both sides. As a good practice rule, a
unique root class is the top container and it is instantiated only once
as a root of a tree of containment relations between all the objects
in a model. We also consider classes inheriting from other classes.
This is defined by a super type relation.</p>
      <p>A meta-model can also have constraints, typically written in OCL,
to precise its semantics. However considering the constraints is out
of the scope of this first work.
2.2</p>
    </sec>
    <sec id="sec-4">
      <title>Meta-model instantiation</title>
      <p>Depending on how the models will be used during the development
of a MDE tool chain (DSLs, transformations), they are created as
instances of a meta-model. Instantiability of a meta-model should
be considered to prevent issues on the models in a MDE process:
For instance, a real life model provided by a user or another part
of the chain could fail to conform the meta-model, preventing it
to be transformed for instance. Moreover, representative models
should be generated to validate DSLs or model transformations
implementation. A model generator then requires instantiable
metamodels to compute valid instances as test models.</p>
      <p>2.2.1 Instantiation parameters. It gathers the information that
is required to instantiate a meta-model, e.g. by a model generation
tool. For example in the model generator GRIMM, it concerns the
following information:
• Number of exact instances for each class of the meta-model.
• Bounds for unbounded references.
• Values for enumerations.
• Domains for attributes (optional but suitable for more
precision).</p>
      <p>• Probability distributions for links between classes.</p>
      <p>Depending on the scope considered when validating the
metamodel instantiability, some instantiation parameters are used as
candidate values:</p>
      <p>DEFINITION 1. Candidate Values (CV) are information given by
the user and used in checking instantiability of meta-models. They
consist of two different kinds of information:
• Number of exact instances for each class of the meta-model.
• Bounds for unbounded references.</p>
      <p>2.2.2 Non instantiable Meta-models. A meta-model is non
intantiable when at least one part of its meta-elements (classes, relations,
etc.) could not be instantiated in a model. We distinguish three major
reasons why meta-model instantiation could be not possible:
• Unreachable candidate values. The instance that the user tries
to generate is not reachable because given CV cannot satisfy
the cardinality of at least one reference in the meta-model.
• Inconsistent meta-model structure. A combination of
elements is impossible to instantiate. For example, three classes
are linked by a cycle of relations and no combination of values
that satisfies all the cardinalities is possible.
• Incorrect OCL constraints. The source of errors in this case
are the OCL constraints of the meta-model.</p>
      <p>Remark Another obvious source of error is a faulty syntax (e.g.
an unnamed class). This kind of errors can be checked using Ecore
validator in Eclipse for instance.</p>
      <p>In this first work, we consider only unreachable CV. Our ideas for
tackling the two other sources of problems are discussed in section 5.
2.3</p>
    </sec>
    <sec id="sec-5">
      <title>Meta-model validation</title>
      <p>Meta-model could be invalid for different reasons: semantically
wrong w.r.t. its specification, syntactically wrong (e.g. missing
values), or part of it could be non instantiable, which is the case
considered in this work.</p>
      <p>The domain expert is supposed to design valid meta-model. Her
expertise helping to focus on its semantic. She could additionally be
a meta-modelling expert and manage to follow good meta-modelling
practices2. However, a dedicated step of validation is required, such
as for any development. In that case, current technique using model
generators could be not a skill of the domain expert.</p>
      <p>2.3.1 Model Generators. Usually, the first automatic non
validation of a meta-model is done by a model generator when it fails to
instantiate it.</p>
      <p>
        Generators are based on a translation into a search-based or
combinatorial technique to find models. The most famous techniques that
are used are: SAT [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], CSP (Constraint Satisfaction Problem) [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ],
Alloy [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] and SMT (SAT Modulo Theory) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Such techniques
always provide existing and easy-to-use solvers to find solutions.
Those solvers return a binary output: success if a model is found or
failure if there is no solution. However, they give too few information
about the origin of failure.
      </p>
      <p>
        A user study from the authors [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], shows that the users of model
generation tools, as GRIMM [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], PRAMANA [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ] or EMFtoCSP [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ],
have many difficulties when they meet a failure, because most of
them are familiar with either Ecore or one the combinatorial
techniques that tools use: CSP, SAT or SMT. An Ecore expert can
manually check the meta-model and its elements, mainly references. Then,
she tries to debug the generation algorithm. Beside that, a CSP or
SAT expert can look up into the intermediary files (eg. xcsp files),
that are generated by the tool and try to find what is wrong inside
them. All these verifications have to be done manually. They are
time consuming. Worse, they have to be done each time the tool fails
to generate a model. Another solution would be the use of the Fault
Localization mechanisms that combinatorial techniques provide. For
example, in Constraint Programming, there exists a sub-field called
Max-CSP [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], in which the goal is to identify the subset of
constraints responsible of the failure. However, Max-CSP suffers from
a lack of scalability and a reverse step has to be done in order to
map from constraints into meta-models elements. An equivalent
mechanism exists in SAT [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] as well, but without providing more
help to debug.
      </p>
      <p>In summary, model generators use search-based techniques and
do not provide fault localization mechanisms to help the users in
debugging. Some of search-based and combinatorial techniques have
kind of debuggers and fault localizers. Unfortunately, they are hard
to use for MDE experts and reverse engineering is needed to map
bugs into meta-models elements. For all these reasons, meta-model
designers prefer to not use a tool for model generation. They validate
their meta-models only manually. To fix that, a Fault Localization
mechanism during meta-model instantiation is needed.</p>
      <p>2.3.2 Tiwizi and Model Generators complementarity. The
objective of this work is to reconcile meta-model designers with model
2https://sites.google.com/site/metamodelingantipatterns/
generation tools. We provide a user friendly tool to assist them
during design task. Concretely, we developed TIWIZI, an interactive
fault localizer. The role of TIWIZI is to help to validate Ecore
metamodels. TIWIZI does not generate models. GRIMM, PRAMANA or
EMFtoCSP keep their role for meta-model instantiation.
3</p>
    </sec>
    <sec id="sec-6">
      <title>AUTOMATED FAULT LOCALIZATION</title>
      <p>This section presents the main contribution of our paper. We describe
how to perform automated fault localization and provide fixing
suggestions. As well, we present TIWIZI, the fault localizer we created.</p>
      <p>
        Our fault localization mechanism is based on Systems of Linear
Inequalities (SLI). Fradet et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] successfully useds SLI to check
consistency for multiple view software architectures.An SLI is a set
of Linear Inequalities between the same variables. Each inequality
has the following shape:
      </p>
      <p>a1x1 + a2x2 + . . . + anxn [&lt;, ≤ , &gt;, ≥ , =, ,] b</p>
      <p>
        The variables are xi. ai are called coefficients and b is a constant
term. Every inequality must have one of the inequality symbols
(&lt;, ≤ , &gt;, ≥ , =, ,). For a more complete overview of this area, please
refer to [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ].
      </p>
      <p>To perform fault localization, the structure of a meta-model is
automatically translated into a system of linear inequalities (SLI):
considering classes’ name, relations and their cardinalities,
inheritance, as detailed in this section. The pair composed of the generated
SLI and the input candidate values is checked in order to localize
errors in the process of model generation. Figure 1 shows the steps
of our method and tool (TIWIZI). It consists on three important steps:
(1) generate the SLI, (2) check the consistency of the generated
system and (3) deduce fixing suggestions. Each one of these steps is
explained in a dedicated sub-section.
3.1</p>
    </sec>
    <sec id="sec-7">
      <title>Generation of Linear Inequalities</title>
      <p>This section describes the System of Linear Inequalities (SLI) we
build, in order to localize faults while designing meta-models. The
work described in this paper focuses on four main elements of
metamodels: unidirectional references, bidirectional references,
containments and inheritance.</p>
      <p>3.1.1 Unidirectional references. They associate two classes
(possibly the same) of the meta-model in one direction only. An example
of unidirectional reference is shown in Figure 2. In this example we
want to say that objects of type House are connected to objects of
type Room by a reference called rooms. The cardinality (1..5) means
that a House is linked to at least 1 and to at most 5 Rooms.</p>
      <p>Let us assume that we have only one instance of class House.
In Figure 3, we show the minimal and maximal configurations
for the previous reference. In the minimal configuration we have
#House = #Room (one room per house) and in the maximal #Room =
5 ∗ #House (5 rooms per house). This means that all consistent
configurations are between these two bounds. So, to translate an
unidirectional reference into SLI, we create the following pair of
inequalities:
#House ≤ #Room
#Room ≤ 5 × #House</p>
      <p>3.1.2 Bidirectional references. They associate two classes
(possibly the same) in two opposite directions. It is modelized in Ecore
with two references, each one being the eOpposite of the other one.
The main difference between one unidirectional reference and a pair
of bidirectional references, is that this last requests two cardinality
constraints (one for each direction) to be checked at the same time,
while instantiating them.</p>
      <p>We cannot process this configuration by considering two
unidirectional references, otherwise many false-positive examples are
encountered. We then propose a way to manage the bidirectional
references as a pair. Let us explain our solution by translating the
bidirectional references of the Figure 4.</p>
      <p>
        This solution is based on a particular graph, called regular
bipartite graph [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]. A bipartite graph G = (U,V, E ) is regular bipartite
if all the nodes of U have the same degree x and all the nodes of V
have the same degree y. It is denoted (x, y)-regular. Regular bipartite
graphs have an interesting characteristic: x × | U | = y × | V |.
      </p>
      <p>We use this kind of graphs because the instantiation of a reference
always produces a bipartite graph. The instances of the first class
(e.g., Room) are the first part U of the graph and the instances of the
second class (e.g., Wall) are the second part V .</p>
      <p>First, we consider instances of class Room, and the number of
connected instances of class Wall. The extreme configurations are
the following:
• Minimal configuration . Rooms share as many walls as
possible. It means that each wall is connected to a maximum
number of rooms (= 2). This configuration produces a (4,
2)regular graph (Figure 5.a).
• Maximal configuration . Rooms do not share their walls. Each
wall is connected to only one room. This configuration then
produces a (4, 1)-regular graph (Figure 5.b).</p>
      <p>These two configurations remain valid whatever the number of
rooms and walls. It is only related to the cardinalities of
corresponding references: 1..2 &amp; 4..4.</p>
      <p>The previous regular graphs are characterized by the following
formulas:</p>
      <p>4 × #Room = 1 × #Wall ∨ 4 × #Room = 2 × #Wall</p>
      <p>It means that all consistent configurations must respect the
following inequalities:</p>
      <p>1 × #Wall ≤ 4 × #Room ∨ 4 × #Room ≤ 2 × #Wall</p>
      <p>So, to encode the pair of opposite references, we create 4
inequalities:</p>
      <p>
        3.1.3 Composition references. A composition relation (A to B)
with cardinalities (l..u) is treated as a pair of bidirectional references
with cardinalities (1..1) in one side and (l..u) in the other side. This
is done this way in order to force involved objects to have a unique
container. This gives us the following inequalities:
 14 #Room ≤ #Wall
 #Wall ≤ 24 #Room
 24 #Wall ≤ #Room

 #Room ≤ 41 #Wall
 1u #A ≤ #B
 #B ≤ 1l #A
 l × #B ≤ #A
 #A ≤ u × #B
3.1.4 Super type relations. The methodology we propose for
treating inheritance between classes is inspired by the translation of
a meta-model into CSP that is performed in GRIMM tool [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Let us
take the illustrative example in Figure 6. We can see a class A linked
to a class B which had two sub-classes C and D. It means that an
instance of A can be linked to 1..5 instances of B, C and D at the
same time (instances of concrete classes are only considered). This
case is translated into SLI using the following inequalities:
#A ≤ (#B + #C + #D)
(#B + #C + #D) ≤ 5 × #A
Remark equivalent treatments are applied for bidirectional
references with inheritance.
3.2
      </p>
    </sec>
    <sec id="sec-8">
      <title>SLI Checker</title>
      <p>Here, we explain how we use input candidate values in order to check
the consistency of the generated SLI. The algorithm in Listing 1
explains how a generated SLI is checked according to the candidate
values. For each one of the inequalities, we check if the candidate
values given by the user are consistent. When the checking fails, we
consider that an anomaly is detected. The next step is to generate a
ifxing suggestion to help the user.
input: SystemLinearInequalities sli</p>
      <p>CandidateValues cvs
output: List &lt; DetectedAnomaly &gt; anomalies
begin
foreach (i: Inequality in sli ) do
if ( not check (i, cvs .get(i))) then
a: new DetectedAnomaly (i, cvs .get(i))
anomalies .add(a)
endif
endfor
return( anomalies )
end</p>
      <p>Listing 1. Algorithm for checking SLIs</p>
      <p>
        Our goal is not to solve the system of linear inequalities in order to
ifnd a valid solution because we use the CV given by the user. For this
reason, we check the SLI instead of solving it. One improvement
of our current work would be mixing solving (using an existing
solver) and checking. Indeed, sometimes the user does not want to
give all the candidate values, because the meta-model is too big for
example. In this case, we could try to solve the SLI as well, in order
to suggest a whole consistent input configuration or to complete a
partial one. The complexity of solving SLIs is much greater than
checking that a vector of CVs is a solution. However, there exist a
polynomial algorithm for checking that a homogeneous SLI has no
solution [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. An SLI is homogeneous if all constant terms (b values
of inequalities) are zeros. The SLI that is created from the translation
of meta-models is homogeneous.
Once an inconsistency between an inequality and a list of candidate
values is met by the SLI checker, a fixing suggestion is automatically
calculated and returned to the user. The goal is to help her/him to
quickly fix the problem.
      </p>
      <p>Here we give an example of such a suggestion. Let us
reconsider again the example of reference given in Figure 2, in which
an instance of class House can be linked to 1..5 instances of class
Room. Listing 2 shows a fixing suggestion provided by our tool. The
problem here is that the user tries to create an inconsistent model
containing 1 instance of House and 6 instances of Room. This
conifguration violates inequality 2 because 6 ≰ 5 × 1. To satisfy this
inequality, we must decrease its left side or increase its right side.
The tool then suggests to reconsider either the cardinality (&gt; 5), the
value for Room (&lt; 6) or House (&gt; 1).</p>
      <p>By default, the suggestions are written in a very succinct mode
directly in the terminal. But, for a better readability, the user can ask
for a verbose mode that generates a tiwizi log file for all detected
anomalies (as shown in Listing 2). A pdf file summarising all the
suggestions is then created using our custom syntax highlighting
(calling LATEX).</p>
      <p>
        Fixing suggestions are useful because big meta-models contain
dozens of classes and references. Thus, it is hard to manually
localize all possible faults. Moreover, conducted user experiments [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
show that many problems come from the CVs. The suggestions are
automatically generated by TIWIZI. However, fixing meta-models
and modifying the CVs is manually done by an expert.
3.4
      </p>
    </sec>
    <sec id="sec-9">
      <title>Tooling</title>
      <p>All the contributions of this paper are implemented in a tool called
TIWIZI. The tool is designed as a plug-in for any model generation
tool: it garantee the instantiability of the meta-model before the
generator try to instantiate it. Currently, TIWIZI is plugged to GRIMM
as an initial step of its generation process. Such a connection can
easily be done with any model generator and our code is open source.</p>
      <p>The core part of the code that concerns the generation and the
checking of a system of linear inequalities is written in Java. We
preferred to write our own SLI checker because available checkers
need big efforts to adapt them to our MDE purpose. Our checker
was carefully tested on diverse meta-models to ensure it correctness.
Both the pdf creation task for verbose suggestions and the connection
to GRIMM tool are written in bash.</p>
      <p>TIWIZI needs two inputs: a meta-model and a configuration file
that contains the candidate values. The tool is fully automated and
giving the input is the only manual task. The output is a list of fixing
suggestions in case of failure or a call to the model generation tool
in case of success. The first release of TIWIZI is available on our
github repository (https://github.com/ferdjoukh/tiwizi/).</p>
      <p>Remark Filling the configuration file manually is very often
timeconsuming and boring, as the size of the meta-model is growing. In
order to help the users to quickly fill all this information, our tool
generates a pre-filled file. Users only need to bring their modifications
if necessary.
4</p>
    </sec>
    <sec id="sec-10">
      <title>RELATED WORK</title>
      <p>In this section, we list several works that consider the quality of
metamodels with different approaches and other approaches assessing
the quality of modelling using Linear Algebra as well.</p>
      <p>
        A first set of works identifies pattern and anti-pattern which
increase and reduce the quality of the meta-models. They do not focus
on the instantiability of the meta-model but prevent to build models
of low quality, e.g. in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], Hinkel et al. confirm thanks to an empirical study the
importance of the instantiability. It was already considered by Cadavid
et al. in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Such as most of the existing works, they request test
model instances of the meta-model to validate it.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], Lopez et al. present a language, called mmSpec
whose the main purpose is to define quality criteria over meta-models.
For example, one can ensure the strong connection of meta-models
or the reachability of classes by using such criteria. The objective
is both assisting in meta-modelling and analysing existing
metamodels. There is a complementarity between this work and our
approach. Therefore, users should use both tools for a more accurate
validation of meta-models.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], Ma et al. define metrics over meta-models with the
purpose of assessing their quality. These metrics are inspired for classic
object oriented metrics (e.g. depth of inheritance tree). The authors
also found correlations between their metrics and quality properties,
such as, reusability or understandability of meta-models.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], Boufares et al. consider the consistency of
cardinalities in UML diagrams and ER-Schemas. In both papers, they
translate the cardinality systems into Integer Linear Programming
(ILP). An ILP solver then solves it and answers if the cardinalities
are consistent or no. However, the papers do not give much details
about the fault localization mechanism which seems to be manual.
5
      </p>
    </sec>
    <sec id="sec-11">
      <title>CONCLUSION &amp; FUTURE WORK</title>
      <p>In this paper, we present a method for automated fault localization
during the task of designing meta-models. The main objective of
our work is to help users to check if their meta-models could be
instantiated and to localize the origin of failure if not. This first work
focuses on errors occurring between the candidate values that are
chosen by the user and some elements of the meta-model: references,
bidirectional references, compositions and inheritance relations.</p>
      <p>Our method is based on Linear Algebra. We model the problem of
consistency of meta-models as a System of Linear Inequalities (SLI)
and we check their consistency in order to localize bugs. The
contributions of the paper are implemented in a tool called TIWIZI. TIWIZI
takes a meta-model and candidate values (instantiation parameters)
as input and provides fixing suggestions. Those suggestions are
guidelines for the user. They are used to modify and correct the
meta-model and the instantiation parameters. The role of our tool is
to guarantee the success of a model generation process or to debug
it and automatically localize anomalies. Beside that, model
generators keep their role for meta-model instantiation. The complexity
of TIWIZI is linear and depends only on the number of references
of the meta-model, not on the size of generated models. In addition,
the tool is fully automated.
5.1</p>
    </sec>
    <sec id="sec-12">
      <title>Limitations &amp; Future work</title>
      <p>This sections aims to list the limitations of our work, and the future
challenges that rise from it.</p>
      <p>The current version of our tool considers the structure of the
meta-model (references between classes and inheritance) and all
the fixing suggestions we generate are related to these elements of
the meta-model. We did not include the attributes of classes in our
translation into SLI. We think that we can add some features to our
tool in order to take into account the attributes as well. All this can
be inspired from what model generators do for attributes. We could
for example detect anomalies in types or missing values.</p>
      <p>As described in section 2.2.2, non-instantiability of meta-models
is due to three major reasons. The first one is the topic of the current
paper. However, for a complete fault localizer, we must consider the
two other sources of errors. Hereinafter, we discuss the promising
ideas for improving this work.</p>
      <p>
        Some meta-models are faulty because of their own structure
without regarding the CV. For example, in some cycles of linked classes,
wrong cardinalities exclude any possibility of success (the work
in [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ] explains that for UML models). Therefore, we could identify,
define and detect such suspicious patterns for Ecore diagrams and
apply our approach on a larger scope of meta-model elements. This
would help us to target larger or more accurate fixing suggestions.
      </p>
      <p>The usefulness of a fault localization mechanism for OCL is
undoubted. Again, we can use the OCL translators of model generators
in order to tackle this interesting challenge and take into account
OCL constraints of meta-models. We can imagine a solution that
ifnds the maximum set of consistent constraints. Then, we could
suggest to the user to correct only the suspicious set. This solution
can for example iterate on the OCL constraints and translate only
one at each step. If an inconsistency is detected then the constraint
is added to the set of suspicious candidates.</p>
      <p>The final improvement of this work is of course an experimental
study to measure the benefits of our proposal. We plan to run two
different steps: (i) statistical and quantitative study and (ii) user
experience study.</p>
      <p>The statistical and quantitative study consists in the running of the
tool on several meta-models of different sizes and origins. The goal
here is to show that TIWIZI is able to localize faults precisely whereas
model generators are only able to notice failures. For example, if we
create mutant of the meta-models, we can count the number of bugs
that our tool discovers.</p>
      <p>The goal of the user experience study is to show that TIWIZI
really helps people to localize bugs during meta-modelling. We can
measure the time that a user needs to find a bug using several existing
model generation tools and compare it to the time that TIWIZI needs
to automatically localize the same bugs.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Biere</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Heule</surname>
          </string-name>
          , and H. van Maaren.
          <source>Handbook of satisfiability</source>
          , volume
          <volume>185</volume>
          . IOS press,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>F.</given-names>
            <surname>Boufares</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Bennaceur</surname>
          </string-name>
          .
          <article-title>Consistency Problems in ER Schemas for Database Systems</article-title>
          .
          <source>Information Sciences</source>
          ,
          <volume>163</volume>
          (
          <issue>4</issue>
          ):
          <fpage>263</fpage>
          -
          <lpage>274</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Boufarès</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Bennaceur</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Osmani</surname>
          </string-name>
          .
          <article-title>On the Consistency of Cardinality Constraints in UML Modelling</article-title>
          .
          <source>In ISPE, International Conference on Enhanced Interoperable Systems</source>
          , pages
          <fpage>287</fpage>
          -
          <lpage>292</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Cabot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Clarisó</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Riera</surname>
          </string-name>
          .
          <article-title>Verification of UML/OCL Class Diagrams using Constraint Programming</article-title>
          .
          <source>In ICSTW, IEEE International Conference on Software Testing Verification and Validation Workshop</source>
          , pages
          <fpage>73</fpage>
          -
          <lpage>80</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Cadavid</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Baudry</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Sahraoui</surname>
          </string-name>
          .
          <article-title>Searching the boundaries of a modeling space to test metamodels</article-title>
          .
          <source>In Fifth IEEE International Conference on Software Testing, Verification and Validation</source>
          , Montréal, Canada, Apr.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>H.</given-names>
            <surname>Cho</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Gray</surname>
          </string-name>
          .
          <article-title>Design patterns for metamodels</article-title>
          .
          <source>In Proceedings of the compilation of the co-located workshops of SPLASH</source>
          <year>2011</year>
          , pages
          <fpage>25</fpage>
          -
          <lpage>32</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>L. M. De Moura</surname>
            and
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Bjørner</surname>
          </string-name>
          . Satisfiability Modulo Theories:
          <article-title>Introduction and Applications</article-title>
          .
          <source>Communications of the ACM Journal</source>
          ,
          <volume>54</volume>
          (
          <issue>9</issue>
          ):
          <fpage>69</fpage>
          -
          <lpage>77</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>L. L.</given-names>
            <surname>Dines</surname>
          </string-name>
          .
          <article-title>Systems of linear inequalities</article-title>
          .
          <source>Annals of Mathematics</source>
          , pages
          <fpage>191</fpage>
          -
          <lpage>199</lpage>
          ,
          <year>1919</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ferdjoukh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.-E.</given-names>
            <surname>Baert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Bourreau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chateau</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Nebut</surname>
          </string-name>
          .
          <article-title>Instantiation of Meta-models Constrained with OCL: a CSP Approach</article-title>
          .
          <source>In 3rd International Conference on Model-Driven Engineering and Software Development (MODELSWARD</source>
          <year>2015</year>
          ), pages
          <fpage>213</fpage>
          -
          <lpage>222</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ferdjoukh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Galinier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Bourreau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chateau</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Nebut</surname>
          </string-name>
          .
          <article-title>Measurement and generation of diversity and meaningfulness in model driven engineering</article-title>
          . IJAS,
          <source>International Journal On Advances in Software</source>
          ,
          <volume>11</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>131</fpage>
          -
          <lpage>146</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>P.</given-names>
            <surname>Fradet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. Le</given-names>
            <surname>Métayer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Périn</surname>
          </string-name>
          .
          <article-title>Consistency checking for multiple view software architectures</article-title>
          .
          <source>In Software Engineering-ESEC/FSE'99</source>
          , pages
          <fpage>410</fpage>
          -
          <lpage>428</lpage>
          . Springer,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Fu</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Malik</surname>
          </string-name>
          .
          <article-title>On solving the partial max-sat problem</article-title>
          .
          <source>In International Conference on Theory and Applications of Satisfiability Testing</source>
          , pages
          <fpage>252</fpage>
          -
          <lpage>265</lpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gogolla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Büttner</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Richters</surname>
          </string-name>
          .
          <article-title>USE: A UML-based specification environment for validating UML and OCL</article-title>
          .
          <source>Science of Computer Programming</source>
          ,
          <volume>69</volume>
          (
          <issue>1-3</issue>
          ):
          <fpage>27</fpage>
          -
          <lpage>34</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>W.</given-names>
            <surname>Hao</surname>
          </string-name>
          .
          <source>Automated Metamodel Instance Generation Satisfying Quantitative Constraints</source>
          .
          <source>PhD thesis</source>
          , National University of Ireland Maynooth,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G.</given-names>
            <surname>Hinkel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. E.</given-names>
            <surname>Kramer</surname>
          </string-name>
          , E. Burger,
          <string-name>
            <given-names>M.</given-names>
            <surname>Strittmatter</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Happe</surname>
          </string-name>
          .
          <article-title>An empirical study on the perception of metamodel quality</article-title>
          .
          <source>In 4th International Conference onModel-Driven Engineering and Software Development (MODELSWARD</source>
          <year>2016</year>
          ), pages
          <fpage>145</fpage>
          -
          <lpage>152</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>D.</given-names>
            <surname>Jackson</surname>
          </string-name>
          .
          <article-title>Software Abstractions: logic, language, and analysis</article-title>
          . MIT Press,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>J.</given-names>
            <surname>Larrosa</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Meseguer</surname>
          </string-name>
          .
          <article-title>Exploiting the use of DAC in Max-CSP</article-title>
          .
          <source>In CP, International Conference on Principles and Practice of Constraint Programming</source>
          , pages
          <fpage>308</fpage>
          -
          <lpage>322</lpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>J.</given-names>
            <surname>López-Fernández</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Guerra</surname>
          </string-name>
          , and J. de Lara.
          <article-title>Assessing the quality of metamodels</article-title>
          . In Workshop on Model-Driven Engineering, Verification and Validation co-located
          <source>with International Conference on Model Driven Engineering Languages and Systems</source>
          , pages
          <fpage>3</fpage>
          -
          <lpage>12</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>J. López</given-names>
            <surname>Fernández</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Guerra</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Lara</surname>
          </string-name>
          .
          <article-title>Meta-model validation and verification with metabest</article-title>
          .
          <source>In ASE, ACM/IEEE International Conference on Automated Software Engineering</source>
          , pages
          <fpage>831</fpage>
          -
          <lpage>834</lpage>
          ,
          <year>09 2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Ma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>He</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>Assessing the quality of metamodels</article-title>
          .
          <source>Frontiers of Computer Science</source>
          ,
          <volume>7</volume>
          (
          <issue>4</issue>
          ):
          <fpage>558</fpage>
          -
          <lpage>570</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>J.-M. Mottu</surname>
            ,
            <given-names>S. S.</given-names>
          </string-name>
          <string-name>
            <surname>Simula</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Cadavid</surname>
            , and
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Baudry</surname>
          </string-name>
          .
          <article-title>Discovering model transformation pre-conditions using automatically generated test models</article-title>
          .
          <source>In Proceedings of the 2015 IEEE 26th International Symposium on Software Reliability Engineering</source>
          , pages
          <fpage>88</fpage>
          -
          <lpage>99</lpage>
          , Gaithersburg,
          <string-name>
            <surname>MD</surname>
          </string-name>
          , USA,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>F.</given-names>
            <surname>Rossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Van Beek</surname>
          </string-name>
          , and T. Walsh, editors.
          <source>Handbook of Constraint Programming. Elsevier Science Publishers</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>E. R.</given-names>
            <surname>Scheinerman</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. H.</given-names>
            <surname>Ullman</surname>
          </string-name>
          .
          <article-title>Fractional graph theory: a rational approach to the theory of graphs</article-title>
          .
          <source>Courier Corporation</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>S.</given-names>
            <surname>Sen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Baudry</surname>
          </string-name>
          , and J.
          <string-name>
            <surname>-M. Mottu</surname>
          </string-name>
          .
          <article-title>On Combining Multi-formalism Knowledge to Select Models for Model Transformation Testing</article-title>
          .
          <source>In ICST, IEEE International Conference on Software Testing, Verification and Validation</source>
          , pages
          <fpage>328</fpage>
          -
          <lpage>337</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>S.</given-names>
            <surname>Sendall</surname>
          </string-name>
          and
          <string-name>
            <given-names>W.</given-names>
            <surname>Kozaczynski</surname>
          </string-name>
          .
          <article-title>Model transformation: The heart and soul of model-driven software development</article-title>
          .
          <source>IEEE software</source>
          ,
          <volume>20</volume>
          (
          <issue>5</issue>
          ):
          <fpage>42</fpage>
          -
          <lpage>45</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>G.</given-names>
            <surname>Sierksma</surname>
          </string-name>
          .
          <article-title>Linear and integer programming: theory and practice</article-title>
          . CRC Press,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>R.</given-names>
            <surname>Wille</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Soeken</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Drechsler</surname>
          </string-name>
          .
          <article-title>Debugging of inconsistent uml/ocl models</article-title>
          .
          <source>In DATE</source>
          , Design, Automation and Test in Europe, pages
          <fpage>1078</fpage>
          -
          <lpage>1083</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>