Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » helper definition within the OCL console
helper definition within the OCL console [message #33505] Thu, 19 July 2007 13:33 Go to next message
Eclipse UserFriend
Originally posted by: firstname.name.gmail.com

Hello

I would like to create a helper function within the console. But each time I get
a "Invalid OCL".

So my question is to know if the ocl console supports helper definition.

Bonus question: my /ultimate/ goal is to make a helper, in OCL, to compute the
longest path to reach the "root parent", i.e,

A extends B,C
B extends D

longestPath(A) = 2

thanks,

--
F. Lagarde
Re: helper definition within the OCL console [message #33539 is a reply to message #33505] Thu, 19 July 2007 17:38 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, François,

No, the console example does not provide a means to define additional
attributes/operations. However, it is an example for which you have the
source code in your workspace, so you can add whatever capabilities to it
that you need :-)

Concerning the bonus question, I would be inclined to do that with a pair of
co-dependent recursive additional operations, but the parser isn't capable
of that, yet.

Cheers,

Christian


François Lagarde wrote:

> Hello
>
> I would like to create a helper function within the console. But each time
> I get a "Invalid OCL".
>
> So my question is to know if the ocl console supports helper definition.
>
> Bonus question: my /ultimate/ goal is to make a helper, in OCL, to compute
> the longest path to reach the "root parent", i.e,
>
> A extends B,C
> B extends D
>
> longestPath(A) = 2
>
> thanks,
>
Previous Topic:Model Integrity Article and Europa
Next Topic:unable to see my error
Goto Forum:
  


Current Time: Tue Apr 23 12:35:23 GMT 2024

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

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

Back to the top