Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » misunderstanding of oclIsTypeOf
misunderstanding of oclIsTypeOf [message #32713] Wed, 11 July 2007 05:03 Go to next message
Eclipse User
Originally posted by: firstname.name.gmail.com

Hello,

I am certainly missing some key points on the use of oclIsTypeOf.
I use the ocl console interpreter to test my understanding.

My context is a stereotype, and I do queries at the M2 Level.

Evaluating:
self.oclAsType(uml::Type)
Results:
Stereotype MyStereotype

Evaluating:
self.oclIsKindOf(uml::Stereotype)
Results:
true

Evaluating:
self.oclIsTypeOf(uml::Stereotype)
Results:
false


What I do not understand is why the last return false. In my mind, both
oclIsKindOf/OclIsTypeOf should have returned true..

best regards.

--
F. Lagarde
Re: misunderstanding of oclIsTypeOf [message #32862 is a reply to message #32713] Wed, 11 July 2007 13:19 Go to previous message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Fran├žois,

Your understanding is correct: the metaclass of your stereotype element is
exactly Stereotype.

The UMLEvaluationEnvironment::isTypeOf() method has a bug. A reference to
"classifier" should be to "eclassifier" instead.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& version=1.1.0&component=OCL

Thanks for finding this,

Christian


Fran├žois Lagarde wrote:

> Hello,
>
> I am certainly missing some key points on the use of oclIsTypeOf.
> I use the ocl console interpreter to test my understanding.
>
> My context is a stereotype, and I do queries at the M2 Level.
>
> Evaluating:
> self.oclAsType(uml::Type)
> Results:
> Stereotype MyStereotype
>
> Evaluating:
> self.oclIsKindOf(uml::Stereotype)
> Results:
> true
>
> Evaluating:
> self.oclIsTypeOf(uml::Stereotype)
> Results:
> false
>
>
> What I do not understand is why the last return false. In my mind, both
> oclIsKindOf/OclIsTypeOf should have returned true..
>
> best regards.
>
Previous Topic:Re: Integrating OCL - providing EvaluationEnvironment
Next Topic:OCL Example starts empty eclipse
Goto Forum:
  


Current Time: Wed Aug 27 19:13:07 EDT 2014

Powered by FUDForum. Page generated in 0.03218 seconds