EMF Modeling Operations

Attention: open in a new window. PDFPrintE-mail

Predefined automatically applicable composite operations such as refactorings are a prerequisite for efficient software modeling. Some modeling environments provide an initial set of basic refactorings, but they hardly offer extension points for user-specified refactorings. Even if extension points exist, the introduction of new refactorings requires programming skills and deep knowledge of the respective metamodel of the used modeling language.

EMF Modeling Operations is an EMF based framework for specifying and executing composite operations within the user's modeling language and editor of choice. Comparable to macro recording in Microsoft Office products, a new specification is created by demonstrating the composite operation, fine-tuning the automatically derived operation's pre- and postconditions, and, if necessary, adding additional augmentations such as iterations using the so-called Operation Recorder.

Once a model operation is specified, it may be recurrently applied to arbitrary models using the Operation Execution Engine. This engine enables a time-saving repetition of recurring refactoring in modeling environments. Moreover, to help developers retrospectively understanding a model's evolution, applications of specified model operations, applied between two successive versions of an evolving model, may be detected a posteriori using the Operation Detection Engine.

 

The Specification Process at a Glance

The specification of new composite operations follows a two-step specification process:

Phase 1: Modeling. First, the user creates the initial model containing all essential model elements to apply the composite operation. Next, each element of the initial model is automatically annotated with an ID, and a so-called working model, i.e., a copy of the initial model for demonstrating the composite operation, is created. The IDs preserve the relationship of the original elements in the initial model and the changed elements in the working model. Finally, the user performs the complete composite operation on the working model in her familiar modeling environment by applying all necessary atomic operations. The output of this step is the revised model, which is together with the initial model the input for the second phase of the operation specification process.

Phase 2: Configuration & Generation. Due to the unique IDs of the model elements, the atomic operations of the operation may precisely be determined automatically using a state-based comparison. The results are saved in a diff model containing all detected atomic changes. Subsequently, an initial version of the pre- and postconditions of the operation is inferred by analyzing the initial model and revised model, respectively. Sometimes, the automatically inferred conditions do not completely express the intended pre- and postconditions of the operation. Thus, they only act as a basis for accelerating the operation specification process and may be refined by the user. In particular, conditions may be relaxed, enforced, and modified and further annotations such as iterations and user inputs may be specified. Finally, the Operation Specification Model is generated, which is a self-contained and complete description of the specified operation consisting of the initial and revised model, the diff model, and the pre- and postconditions.

The specification is supported by the Operation Recorder which is depicted in the following screenshot:

 Screenshot of the Operation Recorder

 

Install EMF Modeling Operations

To install the Operation Recorder and the Operation Execution Engine, please use our update site:

http://www.modelversioning.org/updatesite/

If you are unfamiliar with installing eclipse plug-ins from update sites, please follow the steps shown in the installation screen cast or consult the help pages of eclipse. Our plug-ins has been tested for Eclipse Galileo and Helios. Be sure to install all required plug-ins first! The easiest way to satisfy all dependencies is to download and install EMF Modeling Operations in the latest Modeling Bundle (including incubation).

 

How to use EMF Modeling Operations

To get a first idea on how to use EMF Modeling Operations, please refer to the following screen casts (steadily extended):

Basically, you can specify operations for any ecore-based modeling languages (including Ecore itself), given the metamodel and an associated (diagram or tree) editor is registered in your Eclipse installation.

For specifying pre- and postconditions, any valid OCL expressions can be used. If you need to refer to values of other model elements in these expressions, please use the notation #{template-name}. For instance, use #{EClass_0}.name to refer to the name of the model element associated to the template EClass_0. You can also refer to simple values of the initial model (before the operation has been applied) from postconditions, using the template prefix initial, as for instance #{initial:EClass_0}.name.

A detailed help document is currently under development!

 

Get involved!

We kindly invite you to contribute and participate in any sort. We would be very happy, if you either

To do so, please use the EMF Modeling Operations project page (forums and tracker) at sourceforge. Thank you!

Stay tuned for updates on EMF Modeling Operations using our plug-in update site and the project's news feed!

 

Get the sources

EMF Modeling Operations is developed under the EPL and its source code is hosted at sourceforge:

https://sourceforge.net/projects/emfmo/

We kindly invite you to download the source code, test, use, and evaluate EMF Modeling Operations! Please use the sourceforge project page (forums and bug tracker) to post questions, comments, bugs, and feature requests!

 

Evaluation: Existing Operation Specifications

We have successfully used EMF Modeling Operations to specify numerous composite operations and refactorings for Ecore and UML 2. We will soon provide some examples in the (executable) operation format that you can use as a reference for specifying new operations or for registering in your environment to speed up your modeling tasks as well as to evaluate our framework. If you successfully created more operation specifications that you would like to share, please send them to use so that we can publish them here! Thanks!

  • Coming soon!
Alternatively you can still access an older evaluation of our approach.

 

Publications of EMF Modeling Operations, Operation Recorder, etc.