-
Key: OCL24-7
-
Legacy Issue Number: 18319
-
Status: closed
-
Source: Model Driven Solutions ( Dr. Edward Willink)
-
Summary:
post: (result = self) and result.oclIsTypeOf( t )
requires oclAsType to change the type of self.
The constraint should be:
post: (result = self) and result.oclIsKindOf(t)
[Review all usage of oclIsType() since it's nearly always wrong to use oclIsType rather than oclIsKindOf.]
-
Reported: OCL 2.3.1 — Fri, 14 Dec 2012 05:00 GMT
-
Disposition: Resolved — OCL 2.4
-
Disposition Summary:
Should indeed be oclIsKindOf and the argument should be 'type' as in the signature.
Reviewing other oclIsTypeOf uses identifies just one clear error in 8.2.1 since CollectionType has derived SetType and other types. Other usages seem to be either ok but inelegant since the type is a leaf type, or deliberate constraints for an invariant -
Updated: Fri, 6 Mar 2015 20:57 GMT
OCL24 — OclAny::oclAsType postcondition implies type change
- Key: OCL24-7
- OMG Task Force: 2nd OCL 2.4 RTF