Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » resolveTemp crashes the ATL module
resolveTemp crashes the ATL module [message #1120568] Sun, 29 September 2013 19:22 Go to next message
Leonardo Montecchi is currently offline Leonardo MontecchiFriend
Messages: 10
Registered: September 2013
Junior Member
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.


Leonardo Montecchi
Instituto de Computação, UNICAMP
http://ic.unicamp.br/~leonardo
http://laser.ic.unicamp.br/
Re: resolveTemp crashes the ATL module [message #1122366 is a reply to message #1120568] Tue, 01 October 2013 13:45 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: resolveTemp crashes the ATL module [message #1123457 is a reply to message #1122366] Wed, 02 October 2013 15:31 Go to previous messageGo to next message
Leonardo Montecchi is currently offline Leonardo MontecchiFriend
Messages: 10
Registered: September 2013
Junior Member
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,


Leonardo Montecchi
Instituto de Computação, UNICAMP
http://ic.unicamp.br/~leonardo
http://laser.ic.unicamp.br/
Re: resolveTemp crashes the ATL module [message #1127972 is a reply to message #1123457] Mon, 07 October 2013 07:36 Go to previous message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
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: Thu Apr 25 12:41:21 GMT 2024

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

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

Back to the top