Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF Diff/Merge » Implied vs Explicit dependencies
Implied vs Explicit dependencies [message #1745106] Wed, 05 October 2016 08:59 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 263
Registered: December 2015
Senior Member
Salut Olivier,

Can you help me understanding the concept of implicit and explicit merge dependencies?

I can understand the explicit dependencies of a difference: Whenever a difference is merged, its explicit dependencies are also merged. Makes sense. But what is the use case for implicit dependencies? When a difference is merged, its implicit dependencies are not merged, but only marked as merged. What is the use of this?

Thanks,
Felix
Re: Implied vs Explicit dependencies [message #1745144 is a reply to message #1745106] Wed, 05 October 2016 16:42 Go to previous messageGo to next message
Olivier Constant is currently offline Olivier ConstantFriend
Messages: 91
Registered: January 2012
Member
Guten Tag Felix,

1. Explicit dependencies are dependencies that must be managed by the diff/merge engine.

Precisely: An explicit dependency from A to B in direction R means that the merge of A to R requires that B be also merged to R in order to preserve the consistency of the model.

Example: A is the presence of an element 'a' on side R.opposite(), B is the same for an element 'b', and 'a' has a reference of multiplicity [1] to 'b'. Adding 'a' (merging A to R) requires that 'b' be explicitly added too (merging B to R ).

2. Implicit dependencies are dependencies that are automatically managed by EMF instance models.
(Unless the behavior of EMF-generated implementations is altered by user code, but altering the behavior to that extent is extremely rare and does not look like a good idea.)

Precisely: An implicit dependency from A to B in direction R means that the merge of A to R automatically triggers the merge of B to R without any intervention of the diff/merge engine.

Example: Elements 'a' and 'b' are present on both sides. On side R they do not reference each other, but on side R.opposite() they reference each other via two opposite references. That gives two differences: a reference value presence from 'a' to 'b' and another one from 'b' to 'a'. If you merge either one on side R, then the other one is automatically merged too because EMF instance models preserve consistency w.r.t. opposite references.

Does that help?

Olivier
Re: Implied vs Explicit dependencies [message #1745195 is a reply to message #1745144] Thu, 06 October 2016 10:45 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 263
Registered: December 2015
Senior Member
Ok thank you.
Previous Topic:Incremental mode and delete element
Next Topic:git integration
Goto Forum:
  


Current Time: Mon May 21 00:53:23 GMT 2018

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

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

Back to the top