-
Key: OCL2-3
-
Legacy Issue Number: 5972
-
Status: closed
-
Source: HL7 ( Mr. Grahame Grieve)
-
Summary:
Is it possible for collections to contain void (= undefined objects)?
Conceptually, this would appear to be required so that you
can specify whether an item in a collection can be null in
an actual implementation. The use of void and undefined() is
advised in exactly the same situation in a non-collection
context.However, this quote from Section 2.4.11: "In general, an expression
where one of the parts is undefined will itself be undefined", along
with the rest of the section, shows that you can't use void as
a parameter to the collection calls, and in the context of OCL as a
language, this makes sense.So I thank that this constraint:
context Collection
inv: self->forAll(not OclIsUndefined())is required, and this should be stated to clear up uncertainties.
This leaves the problem of how to say whether an "item in a collection
can be null in an actual implementation" is inresolvable in OCL 2. -
Reported: OCL 2.0b1 — Tue, 22 Apr 2003 04:00 GMT
-
Disposition: Resolved — OCL 2.0b2
-
Disposition Summary:
No Data Available
-
Updated: Fri, 6 Mar 2015 20:58 GMT
OCL2 — OCL 2: Can collections contain void/undefined objects
- Key: OCL2-3
- OMG Task Force: OCL 2.0 FTF