Community
Participate
Working Groups
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).
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.
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.
Fixed in ASMEMFModelElement.java v.1.4: Deep copy should no longer occur. Additional testing needed...