OCL 2.1 RTF Avatar
  1. OMG Issue

OCL21 — CollectionType and CollectionKind

  • Key: OCL21-295
  • Legacy Issue Number: 12419
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    The abstractness of CollectionType and corresponding existence of the Collection CollectionKind is inconsistent:

    9.3 collectionTypeCS synthesized attributes, page 79, contains:

    kind = CollectionKind::Collection implies collectionTypeCS.ast.oclIsKindOf(CollectionType)

    using CollectionKind::Collection.

    8.3.5 CollectionKind, page 48, Collection is not one of the enumeration values.

    11.6.1, page 144, specifies that Collection is an instance of CollectionType
    requiring Collection to not be abstract.

    8.2 CollectionType, page 34, CollectionType is identified as an abstract class.

    An expression like the following is valid:

    context Package
    def getClasses() : Set(Class) =
    let c : Collection(Type) = self.ownedType in
    c->select(oclIsKindOf(Class))->asSet()

    and demonstrates the need for a concrete CollectionType.

    Recommendation:

    Collection should not be abstract; change Fig 8.1, 8.2 CollectionType text.
    CollectionKind requires a Collection value; change Fig 8.7, 8.3.5 CollectionKind.

  • Reported: OCL 2.0 — Sat, 19 Apr 2008 04:00 GMT
  • Disposition: Resolved — OCL 2.1
  • Disposition Summary:

    No Data Available

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