Issue 15005: OCL 2.1 8.3.8 OclInvalid::allInstances (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: 8.3.8 states that in regard to allInstances "returns all instances of the classifier and the classifiers specializing it. May only be used for classifiers that have a finite number of instances. This is the case, for example, for user defined classes because instances need to be created explicitly, and for enumerations, the standard Boolean type, and other special types such as OclVoid and OclInvalid." While it is true that OclInvalid has exactly one instance, the corresponding return of Set{invalid} is not well-formed. Therefore the invocation OclInvalid.allInstances() must return invalid. Suggest: Replace "and OclInvalid" by ". But not for OclInvalid, for which the return is invalid" Resolution: Revised Text: In 8.2.2 replace Well-formedness Rules for the Types Package by Operations and Well-formedness Rules for the Types Package In 8.2.2 add BooleanType allInstances() : Set(Boolean) Returns Set{true,false}. In 8.2.2 add InvalidType allInstances() : Set(OclInvalid) Returns invalid, since the notional return of Set{invalid} is not well-formed. In 8.2.2 add VoidType allInstances() : Set(OclVoid) Returns Set{null}. In the last paragraph of 8.3.8 Classifier replace and other special types such as OclVoid and OclInvalid. by and other special types such as OclVoid. Actions taken: January 25, 2010: received issue April 25, 2011: closed issue Discussion: As summarised, the consistent return of Set{invalid} is not well-formed so the actual return must be invalid, which the text should indicate. Migration of allInstances to Classifier by Issue 6532 has left it undefined for non- Classifiers End of Annotations:===== ronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEADPdW0tUXebz/2dsb2JhbADVAoQ7BA Date: Sun, 24 Jan 2010 13:43:20 +0000 From: Ed Willink User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 To: issues@omg.org Subject: OCL 2.1 8.3.8 OclInvalid::allInstances X-Plusnet-Relay: 382f48ad32b14609d1b4ba6586df76d0 8.3.8 states that in regard to allInstances "returns all instances of the classifier and the classifiers specializing it. May only be used for classifiers that have a finite number of instances. This is the case, for example, for user defined classes because instances need to be created explicitly, and for enumerations, the standard Boolean type, and other special types such as OclVoid and OclInvalid." While it is true that OclInvalid has exactly one instance, the corresponding return of Set{invalid} is not well-formed. Therefore the invocation OclInvalid.allInstances() must return invalid. Suggest: Replace "and OclInvalid" by ". But not for OclInvalid, for which the return is invalid" Regards Ed Willink