Skip to main content



      Home
Home » Modeling » OCL » Query Evaluate method
Query Evaluate method [message #728109] Thu, 22 September 2011 10:34 Go to next message
Eclipse UserFriend
Hello All,

I'm using OCL to validate constrains over my own meta-models.

To do the evaluation of the constraint I invoke in my code the method "Evaluate" of the Query class. This evaluation has always worked fine till now...

My code remains the same, the only change is that now I'm using eclipse Indigo instead of Eclipse Helios (and indeed the associated OCL versions by default). The Evaluate method is returning "false" when it should return "true"... I have execute the same constraint in Eclipse helios and the result is "true".

Has anybody have the same problem?
I'm concerned about if the logic of the evaluation method may have change somehow...

Any clue about what may be happening?

Thanks in advance!!

Cheers
Re: Query Evaluate method [message #728119 is a reply to message #728109] Thu, 22 September 2011 10:59 Go to previous message
Eclipse UserFriend
Hi Cristina

I presume that you're using the Ecore evaluator.

In principle nothing has changed. In practice a few bugs have been fixed
concerning null/invalid and unlimited.

One other user (https://bugs.eclipse.org/bugs/show_bug.cgi?id=347960)
has reported an issue with traversal over intermediate null features.
The evaluator now 'correctly' treats this as invalid and consequently
evaluates the entire traversal as invalid. You need
oclIsUndefined()/->notEmpty() guards analoguous to != null NPE guards in
Java.

I'm still considering raising an OMG issue to suggest making this more
friendly.

Regards

Ed Willink




On 22/09/2011 15:34, cristina.lopez wrote:
> Hello All,
>
> I'm using OCL to validate constrains over my own meta-models.
>
> To do the evaluation of the constraint I invoke in my code the method
> "Evaluate" of the Query class. This evaluation has always worked fine
> till now...
>
> My code remains the same, the only change is that now I'm using
> eclipse Indigo instead of Eclipse Helios (and indeed the associated
> OCL versions by default). The Evaluate method is returning "false"
> when it should return "true"... I have execute the same constraint in
> Eclipse helios and the result is "true".
>
> Has anybody have the same problem?
> I'm concerned about if the logic of the evaluation method may have
> change somehow...
>
> Any clue about what may be happening?
>
> Thanks in advance!!
>
> Cheers
Previous Topic:Ecore2OCLinEcore
Next Topic:Conversion between OCL datatypes and Ecore datatypes
Goto Forum:
  


Current Time: Thu Jul 10 08:22:02 EDT 2025

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

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

Back to the top