Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] strange OCL behavior
[ATL] strange OCL behavior [message #660830] Mon, 21 March 2011 20:12 Go to next message
Philipp Zech is currently offline Philipp ZechFriend
Messages: 96
Registered: July 2009
Member
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 08:26 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
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 10:19 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp ZechFriend
Messages: 96
Registered: July 2009
Member
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 10:33 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
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 13:52 Go to previous message
Philipp Zech is currently offline Philipp ZechFriend
Messages: 96
Registered: July 2009
Member
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 Mar 05 16:23:01 GMT 2021

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

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

Back to the top