Skip to main content



      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 11:52 Go to next message
Eclipse UserFriend
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 11:53] by 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 13:07 Go to previous messageGo to next message
Eclipse UserFriend
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 13:43 Go to previous messageGo to next message
Eclipse UserFriend

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 03:40 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 14:10:06 EDT 2025

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

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

Back to the top