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 09:33 Go to next message
Eclipse User
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 13:38 Go to previous message
Eclipse User
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: Thu Aug 28 09:23:53 EDT 2014

Powered by FUDForum. Page generated in 0.10389 seconds