-
Key: OCL25-148
-
Legacy Issue Number: 6535
-
Status: open
-
Source: Anonymous
-
Summary:
Author: Stephan Flake (flake@c-lab.de)
Description: Some operation specifications are still missing (they are marked by --TBD), e.g., oclAsType(). For this operation, a proposed specification is as follows (provided that OclType is a powertype):1: context OclAny::oclAsType(typename:OclType) : OclAny
2: post: if OclType.allInstances()
3: ->select(t:OclType | self.oclIsTypeOf(t))
4: ->exists(t:OclType | typename.conformsTo(t) or t.conformsTo(typename)) then
5: result = self and result.oclIsTypeOf(typename)
6: else
7: result = OclUndefined and result.oclIsTypeOf(OclVoid)
8: endifFor a comparison, a complex OCL specification for ENUMERATION TYPE OclType can be found in the paper "OclType - A Type or Metatype?".
-
Reported: OCL 2.0b2 — Mon, 10 Nov 2003 05:00 GMT
-
Updated: Thu, 8 Oct 2015 14:12 GMT
OCL25 — Lack of operation specifications
- Key: OCL25-148
- OMG Task Force: Object Constraint Language 2.5 RTF