Bug 146756 - Allow inter-model references causes deep copy
Summary: Allow inter-model references causes deep copy
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: gmt (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gmt-atl-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-13 01:45 EDT by Dennis Wagelaar CLA
Modified: 2017-04-11 15:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Wagelaar CLA 2006-06-13 01:45:39 EDT
If I switch on "Allow inter-model references" for a non-refinement-mode ATL 
transformation, it displays unexpected deep copy behaviour: each assignment 
in a rule becomes a deep copy right up to the source model boundaries 
(external references are not copied, but the reference is copied).

Even if another rule matches a source element that will be deep copied, that 
source element will still be deep copied, unless a target element of the same 
meta-class is created. If such a target element is created, that element will 
not be contained by its original containing element (unlike refinement mode).

Please note that this behaviour occurs *without* using refinement mode.

This behaviour is currently demonstrated in the following transformation:
http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML2CaseStudies/uml2cs-transformations/UML2Accessors.atl?rev=4889&view=markup

If you want to try it for yourself, check out the following subversion folders 
as Eclipse projects:
http://ssel.vub.ac.be/svn-gen/UML2CaseStudies/uml2cs-instantmessenger-model/
http://ssel.vub.ac.be/svn-gen/UML2CaseStudies/uml2cs-transformations/

Note that the UML2Accessors transformation cannot work with refinement mode, 
because multiple, referenced models are involved (profiles). It currently 
makes use of this "bug" (feature?) to make the transformation much more 
concise (4 rules).
Comment 1 Dennis Wagelaar CLA 2006-06-27 02:05:01 EDT
The "deep copy" is not done properly, atl least for uml2. The applied profiles and stereotypes in the resulting model are no longer recognised by the uml2 editor.
Comment 2 Dennis Wagelaar CLA 2006-10-08 05:44:49 EDT
Allow-inter-model-references completely switches off the "checkSameModel" condition. This condition should probably be still enabled whenever there is a containment relationship. Containment in EMF can never cross models.
Comment 3 Dennis Wagelaar CLA 2007-05-03 11:30:33 EDT
Fixed in ASMEMFModelElement.java v.1.4:
Deep copy should no longer occur.

Additional testing needed...