Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » [EMF Compare] Conflict of Indexes/order(Conflict of Indexes/order)
[EMF Compare] Conflict of Indexes/order [message #1802790] Fri, 15 February 2019 21:31 Go to next message
Alfa Yohannis is currently offline Alfa YohannisFriend
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 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
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
Re: [EMF Compare] Conflict of Indexes/order [message #1802893 is a reply to message #1802852] Mon, 18 February 2019 15:19 Go to previous message
Alfa Yohannis is currently offline Alfa YohannisFriend
Messages: 9
Registered: April 2018
Junior Member
Hi Laurent,

I see, now. So, EMF compare' makes its decision based on the LCS algorithm.
I was just wondering because B is implicitly moved from index 1 to 0 when we move A from index 0 to 1 in the first origin-left example, which also similarly applies to the first origin-right example.
But, it's all based on its LCS algorithm.

Thanks for the enlightenment :)







Previous Topic:EMFCompare filtering files out of model resolving phase
Next Topic:EMF Compare and Merge (Object)
Goto Forum:
  


Current Time: Fri Oct 30 14:40:03 GMT 2020

Powered by FUDForum. Page generated in 0.01306 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top