-
Key: OCL21-337
-
Legacy Issue Number: 12943
-
Status: closed
-
Source: Zeligsoft, Inc. ( Christian Damus)
-
Summary:
The second constraint on CollectionType in Section 8.2.2 does not make
sense. The instances of CollectionType are not collections, but the
types of collections. Thus, a collection type does not have elements
to be iterated. This constraint should be struck from Section 8.2.2:[1] A collection cannot contain OclInvalid values.
context CollectionType
inv: self->forAll(not oclIsInvalid())and replaced by a new invariant constraint in Section 11.7.1
“Collection” (which currently has no well-formedness rules):[1] A collection cannot contain OclInvalid values.
context Collection
inv: self->forAll(not oclIsInvalid()) -
Reported: OCL 2.0 — Thu, 9 Oct 2008 04:00 GMT
-
Disposition: Resolved — OCL 2.1
-
Disposition Summary:
As OCL does not permit the invalid value in a collection (as opposed to the null value), it should be made explicit that the evaluation of collection literals containing invalid results in invalid. The CollectionType constraint in Section 8.2.2 attempts to express this, but is incorrect because it is defined on the wrong meta-level (on CollectionType instead of Collection).
-
Updated: Fri, 6 Mar 2015 20:58 GMT