Friends of Eclipse,
Eclipse is an open source community that benefits millions of developers around the world each and every day! During the month of September, we are asking you to give back to our wonderful open source community. All donations will be used to improve Eclipse technology. Your contribution counts!
We thank you for this gesture, and for giving back to our community.
Metamodels need to be compared for several reasons. Two important reasons are: |
1) to migrate the models conforming to different versions of a metamodel;
2) to represent the differences between two similar metamodels. The objective of this use case is to demonstrate how weaving models created with the help of the AMW plugin are used to compare different models. The weaving model is used to produce model transformations between the models conforming to these metamodels.
This use case compares two different versions of the same metamodel, Scade(v1) and Scade(v2). The different versions have been developed by two different persons, based on a formal specification. Scade is a standard for development of embedded software for the Avionics Industry. The Scade metamodels developed are not the official version supported by the Scade suite. The goal is to produce a transformation that transforms the source model conforming to Scade(v1) into the target model conforming to Scade(v2). To be able to correctly transform the equivalent elements, it is necessary to compare the elements from both metamodels.The first step is to create a weaving model containing equivalence links between the model elements. This is done by executing matching transformations and by refining the weaving model in the AMW prototype. These transformations assign a similarity value between the elements of both metamodels. For instance, we assign high similarity values for elements that have the same name and type. A high similarity value means the element have a good probability to the equivalent. This weaving model is a declarative representation of the links between the metamodels. The weaving model is used to produce a model transformation. This model transformation is responsible to translate the source model into the target model.
The comparison weaving model conforms to a weaving metamodel that is an extension of the core weaving metamodel. The metamodel extension contains an Equivalent link. This link contains a similarity attribute that saves the similarity estimation between a left and a right element. This link is extended by different kinds of links, depending on the type of elements that are being compared, for example AttributeEqual and ReferenceEqual. The relations between ElementEqual and AttributeEqual links are created according to the containment relations between Classes and Attributes. For the elements that have similarity value lower than a given threshold, the Equivalent links are rewritten into NotEquivalent links.
Back to the top