Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » using resolveTemp y the source patterns(resolveTemp source pattern)
using resolveTemp y the source patterns [message #1005982] Tue, 29 January 2013 13:17 Go to next message
yrreb yrreb is currently offline yrreb yrrebFriend
Messages: 3
Registered: January 2013
Junior Member
Hello,

I am trying of using the 'resolveTemp' function in a source pattern of an ATL rule in order to filter if a target element has already been created. If it hasn't this rule is applied and it creates, between others, the target element. However, when i use the 'resolveTemp' function in the source pattern I get an error indicating that this function is prohibited in the source patterns.

Because of this, I created a helper using the 'resolveTemp' function. This way I don't get the error, but it doesn't work, if a target element has alredy been created I do not get it. Someone know how could I know in a source parttern if a target pattern has been created.

Thank you very much.
Re: using resolveTemp y the source patterns [message #1006067 is a reply to message #1005982] Tue, 29 January 2013 17:22 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

In ATL, the resolveTemp is provided in order to access to output model elements created by another rule. However (cf. ATL Reference Documentation):

  1. Most of the times, the use of this method is not required as ATL is automatically doing the resolution for you from the referenced input model elements;
  2. Calling this method makes only sense in output patterns, as you have no reason to access to newly created model elements in input patterns (which only consist in navigating input model elements)?

I hope this helps.

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: using resolveTemp y the source patterns [message #1006142 is a reply to message #1006067] Wed, 30 January 2013 08:31 Go to previous message
yrreb yrreb is currently offline yrreb yrrebFriend
Messages: 3
Registered: January 2013
Junior Member
Thank you very much. I already believed that there was no sense in navigating the output model from a source pattern, but I needed it in order to decide whether to create an element or not.

Finally, I have achieved it using lazy rules.
Previous Topic:EMFTVM doesn't generate output
Next Topic:ATL File usging second ATL File and input variable of ATL File
Goto Forum:
  


Current Time: Fri Apr 26 20:31:21 GMT 2024

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

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

Back to the top