|Compare transformed XText models - orderings [message #1065507]
||Wed, 26 June 2013 08:31
| Alex G
Registered: January 2012
I have an XText DSL with 2 models A and B, which are "equivalent" in the sense, that the objects specified in both models are the same but just in another order, e.g.
model A as textual representation:
Edge n -> m
model B as textual representation:
Edge n -> m
In both models the Nodes specify name attributes and Edge references to the Node objects. The Nodes are specified in a NodeList and the Edges are specified in an EdgeList.
I want to unit test both models on equivalence, thus parse them with XText and compare both created Resources with EMFCompare 2.
I read that orderings could be checked with either setting the "ordered" attribute in the meta-model to false or neglecting the MOVE DifferenceKind or creating another DiffEngine with a FeatureFilter
(which somehow did not detect the orderings and still created Differences with MOVE DifferenceKind).
However, I could filter with MOVE DifferenceKind.
Now my problem are the references in "Edge n -> m":
In model A the "n" references to the FIRST node (in XMI: ref="//@nodesList.0) while in model B "n" references to the SECOND node (ref="//@nodeList.1).
In EMFCompare these difference are checked by CHANGE DifferenceKind as well as ADD and DELETE! Now I do not want to completely neglect references, I just want to check, if the references go to the equivalent object, which was moved!
Do you have any ideas, how I can achieve this?
Powered by FUDForum
. Page generated in 0.02494 seconds