Executing matching transformations

The matching transformations take as input a weaving model, a left metamodel and a right metamodel. They produce a new weaving model as output. The matching transformations are integrated in the AMW plug-in. They can be executed one by one when right clicking on the weaving panel (the middle panel). The "Match" menu contains the set of the matching transformations available (see below). This screenshot is part of the metamodel comparison use case.

Matching transformations available in the AMW plug-in

These matching transformations are developed using specific metamodel extensions. We present an overview below.

Link generation

  • Cartesian product: creates a new link for every pair of elements for a left and right metamodels. The current version creates links only between elements of the same type (e.g., EClass-EClass, EAttribute-EAttribute).
    Metamodel extensions: mw_base_extension, mmw_match.
  • Propagation model: creates elements that enable to propagate similarity values between links. The propagation elements are used by the 'Similarity flooding' algorithm.
    Metamodel extensions: mw_base_extension, mmw_match, mmw_propagation.
Similarity assignment: these matching transformations can be executed in any order. When executed one-by-one, they have the same weight (this means that all are consider of same importance in the general process).
  • Name equality: assigns one (1) to the links between elements with the same name.
    Metamodel dependencies: mw_base_extension, mmw_match.
  • Name similarity: applies string comparison methods to calculate the similarity between element names.
    Metamodel dependencies: mw_base_extension, mmw_match.
  • Cardinality: assigns 1 (one) to the links of elements with exactly the same cardinality.
    Metamodel dependencies: mw_base_extension, mmw_match.
  • Type and conformance: assigns 1 (one) to links of elements with the same type and that conform to the same meta-element.
    Metamodel dependencies: mw_base_extension, mmw_match.
  • Similarity flooding: propagates the similarity between elements that have containment relationships. For instance, if two attributes are connected by a weaving link and their containing classes are also connected by a weaving link, the similarity of the attributes is propagated (added) to the containing classes.
    Metamodel dependencies: mw_base_extension, mmw_match, mmw_propagation.
Link selection and rewriting
  • Threshold: creates a new weaving model only with the links that have a similarity value higher than a given threshold (e.g., 0.7).
    Metamodel extensions: mw_base_extension, mmw_match.
  • Normalize: normalize the similarity values to 1 (one). This way it is possible to perform better comparison between different methods.
    Metamodel extensions: mw_base_extension, mmw_match.
  • Link rewriting: for every elements of the left metamodel, selects one link with the highest similarity value. After that, the transformation rewrites the links following the containment relationships between the elements (e.g., class and attribute containment)
    Metamodel extensions: mw_base_extension, mmw_match.
  • Link rewrite - non equivalence: executed always after a 'link rewriting' transformation. This matching transformation creates links of type 'NotFound', or 'NonEquivalent'. These links contain the elements of the left and right metamodels that do not have any correspondence. Very useful to apply 'Diff' algorithms.
    Metamodel extensions: mw_base_extension, mmw_match, mmw_compare.

These matching transformations (source code and executables) are available in the "org.eclipse.weaver.transformation" plug-in and in the library of matching transformations.

These transformations can be modified and new transformations can be easily added in the AMW plug-in. Instructions about how to do it are available in the HowTo - developing new heuristics section.