[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt] Re: Derive constraints

Hi, Kenn,

Thanks for your reply.

There are two problems with the operation visibility:  Ecore doesn't model
visibilities (does UML provide some kind of annotation?) and OCL ignores
visibility, anyway (as a constraint specification language, is has god-like
powers of perception).  This isn't particularly important to me,
personally, but I thought I should raise the question.

Interestingly, the "additional operations" defined using OCL cannot actually
(formally) specify any visibility, as the OCL syntax has no such mechanism. 
Which makes sense, because the purpose of additional operations is to
assist the definition of OCL constraints, which ignore visibility,
anyway.  :-)

The UML specification does provide a considerable number of additional
operations (specified using OCL).  I've noticed, however, that this is the
*only* manifestation of operations in the UML.  Did the UML authors decide
that they would never actually model operations in their metaclasses?  The
only features actually provided by the UML's metaclasses are properties. 
It seems odd.

I'm curious to know why OCL isn't a sufficient formalism for specification
of property derivation in the IMM...

Cheers,

Christian


Kenn Hussey wrote:

> Christian,
> 
> I'm not sure that defining an operation to describe the mechanism by which
> a value is derived is necessarily a Java-ism. This convention of using
> (OCL) operations to describe how properties are derived was used in the
> UML metamodel/specification long before the Java implementation was
> provided at Eclipse. I agree that it's awkward (like many things in UML).
> We're actually looking at formalizing the way types and proeperties can be
> derived based on other types/properties as part of the IMM specification
> submission at the OMG...
> 
> In the meantime, could the visibility of the operation not be used to
> restrict its exposure via OCL? For example, I usually make all of my
> "implementation" operations protected...
> 
> Kenn

-----8<-----