Issue 12419: CollectionType and CollectionKind (ocl2-rtf) Source: THALES (Dr. Edward Willink, ed.willink@thalesgroup.com ed@willink.me.uk) Nature: Uncategorized Issue Severity: 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. Resolution: Revised Text: Actions taken: April 19, 2008: received issue Discussion: End of Annotations:===== m: "Ed Willink" To: Subject: OCL 2.0 (06-05-01): 8.2 CollectionType should not be abstract and 8.3.5 CollectionKind should include Collection Date: Sat, 19 Apr 2008 07:26:04 +0100 X-Mailer: Microsoft Outlook, Build 10.0.6838 Thread-Index: Acih5j51DDekdQ7ISKWF2XUfzNZcFg== X-Plusnet-Relay: b570056fe07c9e287d19bd0b79c396e2 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. Regards Ed Willink