 EMF Model Repair (Installation and running example)
First of all, the following Figure presents our approach:

Installation Guide
1. Please install the Eclipse Modeling Tool:
http://www.eclipse.org/downloads/packages/eclipsemodelingtools/mars2
2. Install the Henshin language which is used as a model transformation language. To install Henshin in Eclipse, you can use the following update site in help>install new software:
http://download.eclipse.org/modeling/emft/henshin/updates/release
3. Finally, please use our update site below and install our tool EMF Model Repair using the update manager in Eclipse (i.e. help>install new software):[On 04082017 a new version is released]
http://www.mathematik.unimarburg.de/~nassarn/modelrepair/release/

The artifacts of the running example:
1. The Webpage metamodel. Please use the link below to install the Webpage domain (metamodel) of our running example (using the update manager in Eclipse, i.e., help>install new software)
http://www.mathematik.unimarburg.de/~nassarn/modelrepair/webpage/update/
2. The invalid webpage model: Please download and
import the zip file which contains the invalid Webpage model presented
in the paper.
http://www.mathematik.unimarburg.de/~nassarn/modelrepair/webpage/icmt17.webpage.instances.zip
 Use Guide:
 Generating the model transformation system containing the repair
rules from a given metamodel: It could be done via File > New
> Other > EMF Model Repair> Create EMF Repair grammar
project. Then, select the metamodel from registry. The output is
an Eclipse plugin containing the corresponding model transformation
system. Please note that the model transformation system is generated
once to repair instance models of the given metamodel.
 Repair a given instance model of the given metamodel: First run
the generated Eclipse plugin which contains the corresponding model
transformation system (repair actions) , e.g., by starting a new
Eclipse instance via right mouseclick on it and selecting Run As
> Eclipse application. After that, you are able to use the
tool to repair any instance model of the given metamodel. Note that
the instance model has to contain exactly one root node of the root
type. (Regarding our running example, you can here import the previous
zip file containing the invalid Webpage model and repair it using our
tool)
To repair your model at any time of the model design, right click on an element of the instance model (opened by the EMF editor) and then you will get the following EMF Model Repair options as shown in the Figure below:
 Repair Interactively (Semiautomatic)
 Trim Model (Randomly)
 Complete Model (Randomly)
 Set Required Attribute Values (Randomly)
 Set Required Attribute Values (JSON file)
Please note that model repair may be interleaved with model editing, i.e., the modeler starts creating a model, let it repair (or complete) at some point, continues editing, let it repair (or complete), and so on. Additionally, the tool can automatically guide the modeller to repair the whole model in two modes: randomly or interactively.
Fully instantiable metamodel: We call a metamodel fully instantiable (fully finitely instantiable) if it satisfies the property that for every given finite model M w.r.t. the metamodel such that the model M does not violate any upper bound, there exists a finite valid model M' w.r.t the metamodel which satisfies the lower bounds and upper bounds of the metamodel and the model M is a submodel of the model M'.
 Generating the model transformation system containing the repair
rules from a given metamodel: It could be done via File > New
> Other > EMF Model Repair> Create EMF Repair grammar
project. Then, select the metamodel from registry. The output is
an Eclipse plugin containing the corresponding model transformation
system. Please note that the model transformation system is generated
once to repair instance models of the given metamodel.
 An example of the semiautomatic repair (supporting user
interaction):
We present an example of repairing the invalid Webpage model (presented in Fig. 2 of the paper) in a semiautomatic way.
Figures 19 show all the dialogs presented to the modeler to interactively repair the whole model step by step.Figure 11 presents the second output of the repair process. The second output is an ordered list of rule applications presented as a log model. The log model presents all the repair actions and their model contexts which are selected by the modeller to repair the whole model.
Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11 The second output: An ordered list of the selected rule applications with their contexts
 Scalability test case
An interesting test case that motivates us to carry out a
scalability study in the future is that we have applied the tool to
randomly resolve more than
150 inconsistencies of three different kinds in a model with 10,000
elements. The tool just took about 58 milliseconds to complete such a
large model. The
used metamodel composes 8 constrained element types and the test model
is designed so that its structure is increased fairly w.r.t the model
size: The test
model is composed of copies of an initial valid model part containing
elements of all given metamodel types.
Please note that the metamodel used in the scalability test is a much more complex version than the one presented in the paper.
Artifacts:
1. Please download and import the following zip file containing the
metamodel and the derived repair rules to your first Eclipse
instance.
http://www.mathematik.unimarburg.de/~nassarn/modelrepair/scalability/scalibility_domain_grammars.zip.
2. Please download and import the following zip file containing the
instance model with 10,000 elements and 160 inconsistencies of three
different kinds.
http://www.mathematik.unimarburg.de/~nassarn/modelrepair/scalability/scalabilitylargetestcase.zip
 Rule Schemes and example rules can be found here.
 Correctness proof:
Please note that in [1] the whole formalization of the work and the correctness proof are presented.
[1] Nebras Nassar, Jens Kosiol and Hendrik Radke: Rulebased Repair of EMF Models: Formalization and Correctness Proof. In: 8th International Workshop on Graph Computation Models (GCM), 2017. accepted. (to appear).