[EMF Compare] Conflict of Indexes/order [message #1802790] |
Fri, 15 February 2019 21:31 |
Alfa Yohannis Messages: 9 Registered: April 2018 |
Junior Member |
|
|
Hi Everyone,
Let's say that there are there models, original, left, and right models.
In the original model, there is a containment reference 'X' that contains elements a, b, and c. In the left model, the order of these elements has changed to b, a, c. While, in the right model, the order is a, c, b.
Is this condition a conflict? Since the indexes of b are different in every model (or the members of 'X' are different in their order in every model).
I already tried this using EMF Compare, and the result was there was no conflict, just differences. How come?
Cheers
|
|
|
Re: [EMF Compare] Conflict of Indexes/order [message #1802852 is a reply to message #1802790] |
Mon, 18 February 2019 08:54 |
|
Hello,
This is not a conflict because of the way EMF Compare determines the differences. We go for the "minimal" number of differences in the model, and this means that what we use to determine ordering is the Longest Common Subsequence (LCS) between the elements.
In order to go from origin to left:
origin A B C
left B A C
There are two subsequences of the same length : AC and BC. In such cases, the arbitrary choice from EMF Compare is to use the first LCS from the second list, which is "BC", we thus determine that the change in the left model is "A has been moved".
In order to go from origin to right:
origin A B C
right A C B
There are again two subsequences of the same length : AC and AB. Once again, we use the first from the second list, which is "AC". The difference between the two models is then "B has been moved".
"A has been moved" is not in conflict with "B has been moved", so you get two differences with no conflict.
If you instead change your models so that they are:
origin A B C D
left A C B D
right A C D B
then you will see a conflict, since in both cases the element determined to be moved is "B".
Laurent Goubet
Obeo
|
|
|
|
Powered by
FUDForum. Page generated in 0.01974 seconds