QVT 1.3 RTF Avatar
  1. OMG Issue

QVT13 — QVTo: element creation and element attachment/detachment to/from an extent

  • Key: QVT13-9
  • Legacy Issue Number: 13103
  • Status: closed  
  • Source: Open Canarias, SL ( Victor Sanchez)
  • Summary:

    Suggestion: In the Operational Mappings language, element creation and element attachment/detachment to/from an extent should be seen and treated as two different and independent activities. Once an element is created via an ObjectExp, this element is usually attached to another element immediately afterwards, which becomes its container, so the ObjectExp semantics of assigning it to an explicit or inferred extent becomes an unnecessary overhead. And also there are other times when we need to assign to an extent some model elements that may have been created at an unrelated time. They could even exist prior to the transformation execution. A case where this is relevant is with the result of a 'Element::clone()' or 'Element::deepclone()' operation execution. Is it expected that these model elements must belong by default to the same model as the original? How to clone parts of an extent with direction kind == 'in'? How to make them become part of the Set of root elements of another, different extent?

  • Reported: QVT 1.0 — Fri, 21 Nov 2008 05:00 GMT
  • Disposition: Duplicate or Merged — QVT 1.3
  • Disposition Summary:

    element creation and element attachment/detachment to/from an extent

    Suggestion: In the Operational Mappings language, element creation and element attachment/detachment to/from an extent should be seen and treated as two different and independent activities. Once an element is created via an ObjectExp, this element is usually attached to another element immediately afterwards, which becomes its container, so the ObjectExp semantics of assigning it to an explicit or inferred extent becomes an unnecessary overhead. And also there are other times when we need to assign to an extent some model elements that may have been created at an unrelated time. They could even exist prior to the transformation execution. A case where this is relevant is with the result of a 'Element::clone()' or 'Element::deepclone()' operation execution. Is it expected that these model elements must belong by default to the same model as the original? How to clone parts of an extent with direction kind == 'in'? How to make them become part of the Set of root elements of another, different extent?

    Discussion

    This seems to be a misunderstanding. ObjectExp does not require a created object to be attached to an inferred extent.
    This functionality seems to be present already.
    Creation without attachment requires a null or null-valued extent during creation.
    Attachment after creation can occur through an ObjectExp update to the required extent.
    Re-attachment presumably occurs through an ObjectExp update to the new extent.
    Detachment then naturally occurs through an ObjectExp update to a null-valued extent.

    This issue inspired the provision of a better desciption of extents. The resolution is therefore merged with that of QVT-36.

  • Updated: Tue, 29 Mar 2016 15:09 GMT