KDM 1.2 RTF Avatar
  1. OMG Issue

KDM12 — Many associations and association ends are given meaningless generated name

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

    Many associations and association ends are given meaningless generated names, like A.0, P.G.307. Since these will be used for the generated language bindings, and are required for traversing and accessing models, these names are not usable. In addition, the inclusion of '.'s in the names makes unnecessary for language bindings since they are not valid Java names.

    For example lines 4 and 5 illustrate the names:
    <ownedMember xmi:id='A.2' xmi:type='cmof:Association' memberEnd='P.O.14122707 P.D.14122707' name='A.2' general='A.3'>
    <ownedEnd xmi:id='P.D.14122707' xmi:type='cmof:Property' subsettedProperty='P.D.29853041' type='C.8621536' name='P.D.14122707' lower='1' upper='1' isComposite='false' association='A.2' />

    Proposed resolution:
    Generate meaningful names for these elements, using the same algorithm as UML2, which is as follows (from section 6.4 of formal/07-11-02)

    • If an association end is unlabeled, the default name for that end is the name of the class to which the end is attached,
      modified such that the first letter is a lowercase letter. (Note that, by convention, non-navigable association ends are
      often left unlabeled since, in general, there is no need to refer to them explicitly either in the text or in formal
      constraints - although they may be needed for other purposes, such as MOF language bindings that use the metamodel.)
    • Associations that are not explicitly named, are given names that are constructed according to the following production
      rule: "A_" <association-end-name1> "_" <association-end-name2>
      where <association-end-name1> is the name of the first association end and <association-end-name2> is the name of
      the second association end.

    As an example, lines 4 and 5 would become:
    <ownedMember xmi:id='A.2' xmi:type='cmof:Association' memberEnd='P.O.14122707 P.D.14122707' name='A_actionElement_actionRelation' general='A.3'>
    <ownedEnd xmi:id='P.D.14122707' xmi:type='cmof:Property' subsettedProperty='P.D.29853041' type='C.8621536' name='actionElement' lower='1' upper='1' isComposite='false' association='A.2' />

  • Reported: KDM 1.1 — Fri, 25 Apr 2008 04:00 GMT
  • Disposition: Resolved — KDM 1.2
  • Disposition Summary:

    Resolution:
    Proposed resolution:
    Change the rules for converting the UML Rose diagram into CMOF xml file to generate
    meaningful names for unnamed association endpoints and associations.
    1. If an association end is unlabeled, the default name for that end is the name of the
    class to which the end is attached,
    modified such that the first letter is a lowercase letter. In addition, if the name of
    the class to which the end is attached starts has a meaningful prefix of uppercase
    letters, for example XMLxxxx, KDMxxx, UIxxxx, the entire uppercase prefix is
    modified to become lowercase. For example, the above words become xmlxxxx,
    kdmxxx, uixxxx.
    2. Unlabeled association end points at the KDM Entity side which correspond to
    KDM Relationships are additionally prefixed with “in” or “out” according to the
    direction of the relationship. The corresponding properties at the KDM
    Relationship class side as "to" and "from". For example, association ends for the
    ActionElement class corresponding to the associations to ControlFlow class are
    named “inControlFlow” (the counterpart of the “to” endpoint from the
    ControlFlow side) and “outControlFlow” (the counterpart of the “from” endpoint
    from the ControlFlow side).
    3. Associations that are not explicitly named, are given names that are constructed
    according to the following production
    rule: "A_" <association-end-name1> "_" <association-end-name2>
    where <association-end-name1> is the name of the first association end and
    <association-end-name2> is the name of
    the second association end.
    The unique ids of the cmof elements may change during the conversion.

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