Skip to content
arno_b edited this page May 11, 2016 · 24 revisions

Kompren User Guide

Video Demonstration

The following video explains how to start with Kompren and describes how to create a model slicer. There is no sound yet, so it is advised to read papers on Kompren or to look at examples before watching it.

Click on the following picture to start or download the video.
If you cannot read Webm videos within your browser, update it or download the video to read it with VLC.

video

The 3 model slicers of the demonstration are:

Requirements and Installation

The simplest way to use Kompren is to download the Diverse Studio (an Eclipse IDE supplemented with all the required plugins).

Otherwise, you can install manually the required plugins into our Eclipse (version 4.3 at least) using update sites: EMF, [Xtend] (http://www.eclipse.org/xtend/download.html), and Kermeta3.

The use of Maven is also strongly recommended to easily add the required dependencies. Maven can be used within Eclipse using the Maven Eclipse plugin or in command line (e.g. mvn eclipse:eclipse for configurating your project using the POM file). If you do not want to use Maven, you can add the dependencies manually (project properties -> add library -> find the required jar files in your Eclipse installation, or convert your project as a plugin project to edit the manifest and its dependencies).

To install Kompren, the following update should be used: https://ci.inria.fr/kompren/view/Core/job/fr.inria.diverse.kompren.manifestfirst_master/lastSuccessfulBuild/artifact/kompren-releng/fr.inria.diverse.kompren.p2updatesite/target/site/

Development bundles are available on the Kompren Jenkins.

Description

Inspired by program slicing, model slicers are tools that extract a subset of model elements for a specific purpose. Model slicers provide a mechanism to isolate and focus on parts of the model, thereby improving the overall analysis process. Model slicers find application in different domains. For instance in model-driven engineering, given a model operation on a large metamodel, model slicing can extract the effective metamodel used by the operation, for various purposes: model operation comprehension, analysis, etc. Similarly in human-computer interaction, understanding and manipulating large models require visualization techniques to provide meaningful navigation capabilities. Model slicing can be used to slice large models graphically. It thus permits users to focus on model elements of interest thanks to visualisation techniques based on model slicing.

Kompren is a DSML to model model slicers for a particular domain (captured in a metamodel). The knowledge gained from practical experience and current model slicers, lead to the design choices of the Kompren language. The primary objective of Kompren is the selection of classes and properties in an input metamodel. Kompren promotes the definition of slicers that slice all necessary elements to make the slice a valid instance of the input metamodel. Kompren also facilitates the relaxation of the conformance required by the input metamodel. Kompren offers a set of language features to generate model slicers that can still be parameterized to process the model slice for a specific purpose. The different characteristics of Kompren tackle two goals for our generative approach: automatically building model slicers for any DSML; have model slicers that can extract different forms of slices, depending on the purpose of the slice.

The Kermeta implementation of Kompren is distributed under the terms of the GNU General Public License and the EPL license.

Cite Kompren

You can refer to this SoSyM paper:

Blouin A., Combemale B., Baudry B., Beaudoux O. Kompren: Modeling and Generating Model Slicers, Journal of Software and Systems Modeling (SoSyM), 2012

@ARTICLE{BLO12b,
author = {Arnaud Blouin and Benoit Combemale and Benoit Baudry and Olivier Beaudoux},
title = {Kompren: Modeling and Generating Model Slicers},
journal = {Software and Systems Modeling (SoSyM)},
year = {2012},
pages={1-17},
publisher = {Springer-Verlag}
}

Applications of Kompren:
Slicing-based Techniques for Visualizing Large Metamodels, Arnaud Blouin, Naouel Moha, Benoit Baudry, Houari Sahraoui, VISSOFT'14 NIER Track, 2014

Create a new Kompren Model Slicer

You have to use Eclipse as described in the first section. Then, follow these steps:

  1. Get a template of Kompren project from github to be imported in Eclipse. This template project also contains a POM file that defines the dependencies and the compilation process.
  2. The Kompren model slicer can be found in the folder src/main/model. While editing this model, the Xtend code is automatically generated in the folder src/main/kompren-gen. Do not edit these files. These Xtend classes are then automatically compiled in Java in the folder src/main/xtend-main. A current Eclipse (or Xtext) bug does not permit the Xtend classes to be automatically compiled. So, after having edited a Kompren slicer, remove the source folder that contains the Java files generated by Xtend, i.e. normally the folder src/main/xtend-gen.

Examples of Kompren Slicers

We developed several examples of model slicers stored on our github repository.

Visualising Metamodels with Explen

Explen is a metamodel visualiser developed to illustrated the benefits of slicing metamodels to understand them. This visualiser embeds slicing-based visualisation features developed on the top of Kompren. These features permit to show the inheritance or sub-inheritance tree of a given class. Another feature permit to prune a minimal metamodel from a given class. Explen is freely available (Java 8 required).

This prototype can load ecore metamodels (using the button load or by drag-and-dropping them into the viewer.

Explen

All the code is available on github.