Re: asking about OCL
"Prof. Dr. Peter H. Schmitt" <email@example.com> schrieb:
> That is strange. I would have thougth Steffen Zschaler's comment correct.
> Is there a definite way to settle disputes of this kind?
in the OCL 2.0 standard, "allInstances" is defined as being an
operation of class OclAny (e.g. see chapter 11 of the standard)
and thus its use should be similar to other operations defined
within OclAny, e.g. "_=_" or oclIsNew(). Therefore, on any
instance variable, i.e., self, one can write
"self.allInstances()". And by the way, the Dresden OCL Parser
also uses this as concrete syntax :-).
In the old OCL 1.1 standard, "allInstances()" is declared
as operation of type OclType. This leads just to another concrete
inv: Person.allInstances->size() >1
The notion "Person::allInstances" emerges often, but I have no idea
from where it comes, albeit I have often used it myself :-)
Received on Tue 16 May 2006 - 10:24:35 BST