OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — Redundant CollectionLiteralExp::kind complicates collection type extension

  • Key: OCL25-99
  • Legacy Issue Number: 13225
  • Status: open  
  • Source: Borland Software Corporation ( Radek Dvorak)
  • Summary:

    The CollectionLiteralExp class defines the 'kind' attribute to indicate the specific collection type of the literal (8.3.5 Literal Expressions).
    This information is redundant as the collection kind can be deduced from the 'type' association inherited from the TypedElement.
    As the attribute type is CollectionKind enumeration, it restricts to the set of predefined OCL collection types.
    Other languages that extend OCL, like QVT does, may need to define custom CollectionType subclasses but can't
    reuse CollectionLiteralExp as it's impossible to provide a suitable collection kind value.

    Proposed resolution:
    Remove the CollectionLiteralExp::kind attribute, eventually consider removing the CollectionKind enumeration.

  • Reported: OCL 2.0 — Thu, 8 Jan 2009 05:00 GMT
  • Updated: Thu, 8 Oct 2015 14:12 GMT