Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ResolveTemp in Lazy Rule relating to another Lazy Rule
ResolveTemp in Lazy Rule relating to another Lazy Rule [message #985718] Thu, 15 November 2012 19:05 Go to next message
Ronan B is currently offline Ronan BFriend
Messages: 249
Registered: July 2009
Senior Member
Hi,
I have a lazy rule which contains a resolveTemp. The resolveTemp has a pattern which another lazy rule matches. However, I never achieve a match. I thought this was supported, did I misunderstand the User Guide? The guide states this is possible "the target pattern and do sections of a called rule, provided that this called rule is executed after the matching phase (e.g. is not called from a transformation entrypoint)."

If I change the latter rule from a lazy rule to a called rule then I see a match.

Any ideas?

Thanks,
Ronan
Re: ResolveTemp in Lazy Rule relating to another Lazy Rule [message #985730 is a reply to message #985718] Thu, 15 November 2012 20:45 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 57
Registered: June 2012
Member
Ronan,
as far as I know, you can use resolveTemp only to match the output of non-lazy matched rules, not of lazy or called rules.
resolveTemp would not be suitable for non-unique lazy rules anyway, as these create new output each time they're called.

I can only guess that you are trying to get the output of varying rules in the same place; an idiom I use for that purpose is an overloaded helper (= several helpers of the same name in different contexts), each of them calling another lazy rule; overloading of rules is simulated this way.

[Updated on: Thu, 15 November 2012 20:46]

Report message to a moderator

Re: ResolveTemp in Lazy Rule relating to another Lazy Rule [message #985910 is a reply to message #985730] Fri, 16 November 2012 16:03 Go to previous message
Ronan B is currently offline Ronan BFriend
Messages: 249
Registered: July 2009
Senior Member
Hi Gunnar,
Yep you guessed right on the use-case. Thanks for the tip on using helpers. I'm afraid the code is getting a little unmaintainable with lazy rules and this will make it more complex.
Thanks!
Ronan
Previous Topic:Problem in loading meta Model
Next Topic:How to add new model elements in refining mode
Goto Forum:
  


Current Time: Sun Dec 21 11:27:00 GMT 2014

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

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