Skip to main content


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 09:03 Go to next message
Eclipse UserFriend
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 17:19 Go to previous message
Eclipse UserFriend
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: Thu Mar 28 12:43:38 GMT 2024

Powered by FUDForum. Page generated in 0.06922 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top