A problem with model transformations with element deletions on dependent models [message #1752842] |
Sat, 28 January 2017 12:48 |
Eclipse User |
|
|
|
Hello,
I have experienced a problem regarding to the application of model transformations with element deletions on dependent models.
I have a graph metamodel, called SimpleGraphMetamodel(.ecore). I have another metamodel that is an extension of the graph metamodel, called SimpleGraphMetamodel_loopExtension(.ecore), to denote distinguish the loops in the related graph model.
First, I create an instance of graph metamodel, called ExampleModel_original.sgmm. This graph includes a loop. Following this, I create an instance of the extension, called ExampleModel_extension_original.sgmme, which points to the single loop.
Second, I apply a transformation to replace two nodes in the graph model with a replacement node. These two nodes are in the loop. I update the graph model; and also its extension model accordingly. If I traverse, or print the details of both models, during the transformation; everything seems fine. The problem is, once the transformation is complete, the files of the models are not consistent anymore. The extension model file refers to non-existing elements of the model file.
I have provided the minimal example for this problem. The models with "_original" are the initial models. The models with "_after_transformation" are the models after transformation. The transformation is applied with read-on-load and store-on-disposal options enabled for both models.
A minimal example is attached.
Note: It is not always easy to replicate the errors in minimal examples, this time, the minimal example reflects the problem .
|
|
|
|
Re: A problem with model transformations with element deletions on dependent models [message #1752900 is a reply to message #1752891] |
Mon, 30 January 2017 12:38 |
Eclipse User |
|
|
|
Hello Dimitris,
The transformation runs without any problem through ANT file when I add expand="true". However, the models after the result are still inconsistent.
You can find a screenshot from the launch configuration in the documentation folder. I also attach it. You can find a screenshot of the inconsistency in the documentation folder.
I wonder if the following is the main reason of this problem: For the metamodels that do not have an attribute with ID = true, the (inter-)model dependencies are represented with relative references in the underlying XML such as 5. node element's 1. outgoing edge. If there is a deletion, this order changes but the Epsilon transformation does not update the relative references in the model files (During the execution of the transformation, everything works fine).
The external model reference handling maybe handles only the metamodel defining some attributes ID = true.
|
|
|
|
Re: A problem with model transformations with element deletions on dependent models [message #1753018 is a reply to message #1752901] |
Wed, 01 February 2017 07:44 |
Eclipse User |
|
|
|
Hello Dimitris,
I realize I forget to describe how to run it. ExampleModel_extension_original.sgmme and ExampleModel_original.sgmm are there as the first/initial versions of the models. You create copies of these models as ExampleModel_extension_after_transformation.sgmme and ExampleModel_after_transformation.sgmm. These ...after_transformation... models will be the inputs of the transformation. Then, you run the transformation.
Two screenshots showing the model files before and after transformation are provided in the documentation folder.
Thank you.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.12132 seconds