Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] strange OCL behavior
[ATL] strange OCL behavior [message #660830] Mon, 21 March 2011 16:12 Go to next message
Eclipse UserFriend
Hi,

I'm currently writing some M2M transformations using ATL. One of the
helpers used during the M2M transformation is supposed to identify
operations with input parameters in the input model, e.g.:

parameters->exists(parameter | parameter.direction = #_in)

however, somehow this statement does not really do what it is supposed
to do, put another way, although the model contains operations with
input parameters, none of the is found. however, if I change "_in" to
"return", e.g.:

parameters->exists(parameter | parameter.direction = #return)

it suddenly works. So, my question, am I wrong in using "_in"?
Considering the OCL documentation it states explicitly that if there may
be ambiguities, as it would be with the word "in", if used in a query
and not as a keyword, and underscore has to be placed directly in front
of the ambiguous word, for that the proper meaning is derived, in this
case the meaning of the parameter direction kind (in) and not the OCL
keyword in. So again my question, what am I doing wrong that no
operation is found?

Thanks,

Philipp
Re: [ATL] strange OCL behavior [message #660874 is a reply to message #660830] Tue, 22 March 2011 04:26 Go to previous messageGo to next message
Eclipse UserFriend
You're probably working with UML2 and ATL in which case the "in" is disambiguated by using #"in"
Re: [ATL] strange OCL behavior [message #660912 is a reply to message #660874] Tue, 22 March 2011 06:19 Go to previous messageGo to next message
Eclipse UserFriend
On 03/22/2011 09:26 AM, Sylvain EVEILLARD wrote:
> You're probably working with UML2 and ATL in which case the "in" is
> disambiguated by using #"in"
hi sylvain,

i know about prepending the hash to the direction literal i'm querying,
if that was your hint. however, simply using #in gives an error in the
editor and still does not change anything at all, operations with input
parameters are not recognized.

cheers,

philipp
Re: [ATL] strange OCL behavior [message #660915 is a reply to message #660830] Tue, 22 March 2011 06:33 Go to previous messageGo to next message
Eclipse UserFriend
My hint was about using the quotes around "in"
Re: [ATL] strange OCL behavior [message #660973 is a reply to message #660915] Tue, 22 March 2011 09:52 Go to previous message
Eclipse UserFriend
On 03/22/2011 11:33 AM, Sylvain EVEILLARD wrote:
> My hint was about using the quotes around "in"
hi sylvain,

sorry for getting your answer wrong, it now works!
thanks!

cheers,

philipp
Previous Topic:[ATL] Problem running a basic example
Next Topic:Re: [ATL] Debugger doesn't work
Goto Forum:
  


Current Time: Fri Jul 04 23:03:51 EDT 2025

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

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

Back to the top