XMI 2.4 RTF Avatar
  1. OMG Issue

XMI24 — Unclear serialization of derived data

  • Key: XMI24-17
  • Legacy Issue Number: 8795
  • Status: closed  
  • Source: Adaptive ( Mr. Pete Rivett)
  • Summary:

    Section 9.5.3 on p64 has a bullet:
    "Addition to Rule 1 for the EMOF package: in some well-defined cases, derived information has a more compact form than (and should be serialized instead of) the information it is derived from. Examples from the UML2 superstructure are multiplicity and generalization."

    and on p65 has the following bullet:

    "No special serialization rules need to be defined for subsetted Properties. Following EMOF rule 1, when one of the subsetted or subsetting Properties is derived, it is not serialized by default. Properties that are not derived are serialized."

    However the referenced EMOF rule 1 was removed from the XMI submission prior to adoption (it is there in ad/02-12-07): it was in (what is now) section 9.5.2 as the first bullet under the table and stated:
    "• Derived information is not serialized."

    So as things stand the specification does not hang together, since there are references to a non-existent rule. And subsetted properties would always be serialized (unless a tag is used to override)

    In general it does not make sense to serialize derived information since it bloats the file, is redundant, and in the bulk of cases derived Properties are readOnly so cannot be used on import anyway. So the rule from the original submission seems to be make sense - especially as there is the ability to override the default. Not having the rule means that all the derived Properties in UML (for example) would have to be explicitly tagged with serialize=false.

    With respect to the 'well defined cases' where derived is serialized, it should be made clear that it is up to the metamodel definition (e.g. UML) to do the efinition of which derived properties are to be serialized. It is misleading to refer to specifiy examples which may or may not be correct (at time of writing UML does not do this).

    Proposed resolution
    ----------------------------

    1. Reinstate the missing rule by adding a new first bullet in section 9.5.2:

    "• Derived information is not serialized."

    2. In section 9.5.2 replace the bullet:

    "Addition to Rule 1 for the EMOF package: in some well-defined cases, derived information has a more compact form than (and should be serialized instead of) the information it is derived from. Examples from the UML2 superstructure are multiplicity and generalization."

    With

    "Additional to the first bullet in rules for the EMOF package: for some metamodels, it may be desirable to serialize particular derived Properties, since the derived form has a more compact form than (and should be serialized instead of) the information it is derived from. In this case the default behavior can be overridden by setting the serialize tag to 'true' for the derived property and to 'false' for the base Property (or Properties). However this step should be taken with caution since it also requires the derived property to be writeable (isReadOnly=false) and, to be able to import the information, it must be possible to reverse-derive the base information from the derived form."

    3. Section 2.9.8, replace

    "The serialization tag is provided to optionally suppress derived data."

    with:

    "The serialize tag is provided to optionally include derived data."

    4. Section 2.12.1, in the entry for serialize, replace 'boolean' by 'string' in column 2, 'true' by' non-derived' in column 3 and in column 4 replace:

    "If false, suppresses serialization of the MOF construct. Typically applied to derived features."

    with:

    "If 'non-derived' then the MOF construct is serialized unless it is derived. 'true' forces the construct to be serilized regardless of wheher it is derived; and 'false' suppresses the it regardless."

    5. Rule 2h on page 61. Replace:

    "You must not serialize an attribute or reference at all if the value of the org.omg.xmi.serialize tag is "false"."

    With:

    "You must not serialize an attribute or reference at all if the value of the org.omg.xmi.serialize tag is "false"; or the value of that tag is "non-derived" and the attribute or reference has isDerived="true"."

  • Reported: XMI 2.0 — Sun, 22 May 2005 04:00 GMT
  • Disposition: Resolved — XMI 2.4
  • Disposition Summary:

    This has already been resolved and completed in a previous RTF. Close no change.

    Disposition: Closed – No Change

  • Updated: Fri, 6 Mar 2015 20:59 GMT