Skip to content
nmacedo edited this page Oct 23, 2013 · 26 revisions

Echo step-by-step tutorial

The following presents a step-by-step guide to the functionalities of Echo.

Echo environment

Echo is deployed as an Eclipse plugin-in (although a CLI version is also available). The following image depicts the default Echo perspective, which can of course be customized by the user.

Echo perspective

Blue borders denote parts introduced by Echo (the Graph Viewer and the Echo toolbar), while red borders denote Eclipse parts over which Echo relies. The Graph Viewer view is an essential component of the workbench, as it allows the user to navigate through the solutions proposed by Echo. Echo's functionalities can be accessed either by right-clicking on an appropriate resource (XMI, Ecore or QVT-R), through the Echo toolbar or through the Echo page of a project's properties.

Echo toolbar

Model consistency management

Model consistency management consists of checking and recovering of the consistency between models and their metamodels. The simplest way to track a model in Echo is by right-clicking in a XMI resource, and selecting Echo > Track model.

Track model

Once tracked, Echo automatically tests the consistency every time the resource is changed. When an inconsistency is detected, Echo flags the model as inconsistent and creates error markers over it. The markers show up in the Problems view, where the user can then choose to repair that model by right-clicking Quick fix.

Problems view

Echo provides two alternative distances to fix the model: graph edit distance or an operation-based distance. After selecting the model distance metric, Echo starts searching for a solution following our least-change algorithm. Once a minimal solution is found, it is presented to the user in the Graph Viewer view.

The user is able to inspect the proposed solution depicted as a graph. If the user is not pleased with the proposed solution, he can ask for the next minimal solution by clicking Next. In case there are no more minimal solution, Echo increases the distance to the original model and proposes next-to-minimal solutions. Once the user finds a suitable solution, he may click Select, and the proposed solution is applied to the XMI model resource.

The list of tracked models can be managed at any time by clicking Manage tracked models at the Echo toolbar, or at the Project Properties under Echo > Tracked models.

Inter-model consistency management

Consistency constraints between models are specified by QVT-R transformations. Again, a new constraint can be inserted by right-clicking a QVT-R resource and selecting Echo > Add new constraint, through the Echo toolbar or at the project properties.

New constraint

A dialog opens up asking the user to select the two models to be related by the constraint. Models should be selected in the same order as the QVT-R transformation parameters.

Once selected, Echo also checks if the two models are consistent every time either of them is updated (the models are automatically tracked, and thus also tested for conformity with their metamodels).

If an inconsistency is found, both models are flagged as inconsistent. By inspecting the problems view, two markers are presented, one for each model. Thus, the user may choose which model should be fixed in order to restore consistency. As expected, the user is again able to choose the model distance used.

Model generation

A metamodel conformant XMI model resource can be generated from an Ecore resource. This can be performed by right-clicking on an Ecore resource Echo > Generate model, through the Generate model button at the Echo toolbar or through the project properties.

Generate model

In the model generation dialog, the user is able to specify the cardinality of each of the metamodel classes. The cardinality of classes that are not specified are minimized: an empty scope produces the minimal model (which is not necessarily the empty model, due to metamodel constraints).

Produced solutions can be navigated in the same way as the solutions proposed for model repair, under the Graph viewer.

Clone this wiki locally