Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] how to create a refernce from one rule to another
[ATL] how to create a refernce from one rule to another [message #554586] Mon, 23 August 2010 15:52 Go to next message
ebtesam  is currently offline ebtesam Friend
Messages: 5
Registered: August 2010
Junior Member
Hi all,

Sorry, but I am just beginning to work on ATL. I read ATL user guide but i could not be able to find a solution

this is a part of the code that i work on

rule A2B {
from
s: MM!Fun
to
m: SS!Bored(
rateAssignments <- Sequence {ra} ),

ra: distinct SS!Process foreach (e in s.g)( processIdentifier <- im) ,
im:----
}


rule K2B{
from
t: MM!Happy
to
rt: SS!Process( processIdentifier <- id) ,
id:----
}

My question is, how can rt in the second rule be contained in m the first rule. How can I create a containment reference from m to rt !!

I tried to do this in the first rule but it did not work

rule A2B {
from
s: MM!Fun
to
m: SS!Bored(
rateAssignments <- Sequence {ra, s.rt} ),

ra: distinct SS!Process foreach (e in s.g)( processIdentifier <- im) ,
im:----
}

thanks in advance

[Updated on: Mon, 23 August 2010 15:53]

Report message to a moderator

Re: [ATL] how to create a refernce from one rule to another [message #554615 is a reply to message #554586] Mon, 23 August 2010 17:07 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 523
Registered: July 2009
Senior Member
Use the reference between Fun and Happy directly.
Re: [ATL] how to create a refernce from one rule to another [message #554619 is a reply to message #554586] Mon, 23 August 2010 17:43 Go to previous messageGo to next message
ebtesam  is currently offline ebtesam Friend
Messages: 5
Registered: August 2010
Junior Member

thanks for your respond

can you show me please how ?

in the metamodel there is no direct reference between happy and fun

and i do need having these two rules seperately
Re: [ATL] how to create a refernce from one rule to another [message #554708 is a reply to message #554586] Tue, 24 August 2010 07:40 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 523
Registered: July 2009
Senior Member
If there is no direct reference, how do you intend to link an instance of Fun and the corresponding instances of Happy then ?
Previous Topic:[ATL] Error xmi.PackageNotFoundException
Next Topic:[QVTO] Eclipse 3.6 editor auto-complete problem
Goto Forum:
  


Current Time: Thu Nov 27 03:04:53 GMT 2014

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

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