Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » [OCLinEcore][bug?] @pre tag and isPre() method not working properly
[OCLinEcore][bug?] @pre tag and isPre() method not working properly [message #1053569] Mon, 06 May 2013 14:46 Go to next message
Tiago Guimarães is currently offline Tiago GuimarãesFriend
Messages: 6
Registered: February 2013
Junior Member
Hi,

When using the isPre() method of org.eclipse.ocl.examples.pivot.PropertyCallExp, the returned boolean is always false.

I have also noted that if a add a @pre using the OCLinEcore editor,it does not produce an error, but the tag is not stored in the ecore. This makes me think that, the tag is being parsed but it is not being processed(saved)


This might be the same bug that QVTrelations had(top not being copied from CST to AST)


Best,
Tiago Guimarães
Re: [OCLinEcore][bug?] @pre tag and isPre() method not working properly [message #1053589 is a reply to message #1053569] Mon, 06 May 2013 15:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

QVTr 'top' was definitely a bug.

@pre is similar and easily fixed for properties, a bit harder for
operations. (Should be fixed in M7).

But I recently started thinking about implementing @pre evaluation and
realised that while for many examples it is trivial, in the general case
it is necessary to make a complete copy of the system state!

Regards

Ed Willink


On 06/05/2013 15:46, Tiago Guimarães wrote:
> Hi,
>
> When using the isPre() method of
> org.eclipse.ocl.examples.pivot.PropertyCallExp, the returned boolean
> is always false.
>
> I have also noted that if a add a @pre using the OCLinEcore editor,it
> does not produce an error, but the tag is not stored in the ecore.
> This makes me think that, the tag is being parsed but it is not being
> processed(saved)
>
>
> This might be the same bug that QVTrelations had(top not being copied
> from CST to AST)
>
>
> Best,
> Tiago Guimarães
Re: [OCLinEcore][bug?] @pre tag and isPre() method not working properly [message #1057967 is a reply to message #1053589] Fri, 10 May 2013 08:15 Go to previous messageGo to next message
Tiago Guimarães is currently offline Tiago GuimarãesFriend
Messages: 6
Registered: February 2013
Junior Member
Thanks for your fast reply!


The @pre tag seems to be working on the editor, but it is still always returning false using the isPre() method of org.eclipse.ocl.examples.pivot.PropertyCallExp.



Best,
Tiago Guimarães
Re: [OCLinEcore][bug?] @pre tag and isPre() method not working properly [message #1057969 is a reply to message #1057967] Fri, 10 May 2013 08:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It should be fixed in M7.

Regards

Ed Willink

On 10/05/2013 09:15, Tiago Guimarães wrote:
> Thanks for your fast reply!
>
>
> The @pre tag seems to be working on the editor, but it is still always
> returning false using the isPre() method of
> org.eclipse.ocl.examples.pivot.PropertyCallExp.
>
>
>
> Best,
> Tiago Guimarães
Re: [OCLinEcore][bug?] @pre tag and isPre() method not working properly [message #1057982 is a reply to message #1057969] Fri, 10 May 2013 10:29 Go to previous messageGo to next message
Tiago Guimarães is currently offline Tiago GuimarãesFriend
Messages: 6
Registered: February 2013
Junior Member
Oh, just found my mistake...

I'm running in standalone, and I updated the Eclipse plug-in but did not change the jar being used in the build path, so it was still using the old version jar.(That's why the editor was working, but the api wasn't)


Sorry about your lost time,
Tiago Guimarães
Re: [OCLinEcore][bug?] @pre tag and isPre() method not working properly [message #1058055 is a reply to message #1057982] Fri, 10 May 2013 16:30 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you're using the Pivot model for your own purposes, you need to note
that some increased UML alignments in M7.

Removed:
NamedElement.ownedRule

Added:
Namespace.ownedRule - not used might be removed
Type.ownedInvariants
Operation.preconditions, postconditions, bodyExpression
Property.defaultExpression

There will be further minor changes for UML alignment and
auto-generation appears after Kepler.

Regards

Ed Willink

On 10/05/2013 11:29, Tiago Guimarães wrote:
> Oh, just found my mistake...
>
> I'm running in standalone, and I updated the Eclipse plug-in but did
> not change the jar being used in the build path, so it was still using
> the old version jar.(That's why the editor was working, but the api
> wasn't)
>
>
> Sorry about your lost time,
> Tiago Guimarães
Previous Topic:specialzed OCL
Next Topic:Problems with nested exists
Goto Forum:
  


Current Time: Thu Apr 25 12:32:01 GMT 2024

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

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

Back to the top