Skip to main content



      Home
Home » Modeling » ATL » resolveTemp crashes the ATL module
resolveTemp crashes the ATL module [message #1120568] Sun, 29 September 2013 15:22 Go to next message
Eclipse UserFriend
Hello,

I'm trying to use the resolveTemp function within an ATL module. However, I'm experiencing a very strange behavior:

When calling
thisModule.resolveTemp(v, 'name');

...
If NO rule exists for 'v' creating an object named 'name', then the function is executed and returns OclUndefined, as it should

If such rule exists, then the ATL module creashes: the execution is interrupted (with not exceptions on the console) and the output file is not generated at all.

Coult you please help me, or point to some direction? I'm calling

thisModule.resolveTemp(e, 'detected').debug();

from the "do" part of a MatchedRule, and the resolveTemp is supposed to reference another MatchedRule... so it should be the right place within the module.

Thanks.
Re: resolveTemp crashes the ATL module [message #1122366 is a reply to message #1120568] Tue, 01 October 2013 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Have you tried to call to the resolveTemp method from outside of the "do" section (i.e., in the regular matched rule assignments)?
Such "do" sections are dedicated to imperative constructs that should be use only when strictly needed.
In a great majority of cases, ATL declarative constructs (i.e., matched rules) are sufficient.

Best regards,
Re: resolveTemp crashes the ATL module [message #1123457 is a reply to message #1122366] Wed, 02 October 2013 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

thanks for your answer.
It took me a while to figure out how to do the same thing within regular matched rules, but it is possible, thanks for your suggestion.

It actually works if called from another rule, in the declarative section.
That is, instead of calling resolveTemp in rule A for finding element X of rule B, I call it in rule B for finding element Y of rule A.

However the module still crashes if I add the .debug() operation:

target <- thisModule.resolveTemp(e.refImmediateComposite(),'reset'),
--OK

target <- thisModule.resolveTemp(e.refImmediateComposite(),'reset').debug(),
--Crashes (with no visible hints)

Best regards,
Re: resolveTemp crashes the ATL module [message #1127972 is a reply to message #1123457] Mon, 07 October 2013 03:36 Go to previous message
Eclipse UserFriend
Hi,
In my experience using debug statements with resolveTemp can result in different behaviour compared with just calling resolveTemp. This may be related to the semantics of resolveTemp which is using the generated target model.
Regrads,
Ronan
Previous Topic:Inject operation in ATL 3.0
Next Topic:EMFTVM avoiding using elements from the output model
Goto Forum:
  


Current Time: Wed Jul 16 06:14:26 EDT 2025

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

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

Back to the top