OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — How does bad allInstances() execute?

  • Key: OCL25-222
  • Status: open  
  • Source: Model Driven Solutions ( Ed Willink)
  • Summary:

    Section 8.3.8 neglects to specify what it means for allInstances to be invoked for a Classifier that does not have a finite number of instances.

    The Real/Integer/UnlimitedNatural/String PrimitiveTypes, CollectionType, TupleType, DataType, ,,, overloads could reasonably return invalid or an empty Set. Just need the specification to say which by specifying each of the overloads in Section 8 / 11.

    Overloading Classifier::allInstances() with a crash (invalid) seems unkind, so suggest the empty set to avoid users needing to exclude many metatypes in a many-classifiers loop..

  • Reported: OCL 2.4 — Sun, 19 Dec 2021 15:50 GMT
  • Updated: Sun, 19 Dec 2021 15:50 GMT