Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] one to one transformation mapping
[ATL] one to one transformation mapping [message #479974] Thu, 13 August 2009 10:21 Go to next message
Eclipse UserFriend
Originally posted by: crajiz3rc.gmail.com

Hi Everyone,

I am working on this simple transformation.

Source MetaModel: : SouMM
Entity 1: 'Participant'
Entity 2: 'Port'
Link :'services'
Port is contained in Participant through the services link

Target MetaModel: TarMM
Entity 1: 'Component'
Entity 2: 'Implentation'
Link :'implements'
Implementation is contained in Component through the implements link

I want to transform : Participant to Component, Port to Implementation,
services to implements

I wrote the following grammar rule:

module SouMMtoTarMM; -- Module Template
create OUT : TarMM from IN : SouMM;

rule Participant2Component{
from
p: SouMM!Participant
to
c: TarMM!Component (name<-p.name,implements<-p.services)
}

rule Port2Implementation{
from
s:SouMM!Port
to
i:TarMM!Implementation(name<-s.name)
}

but it is not working. Please can anyone tell me how this one to one
transformation can be done.

Thanking you very much

Best Regards,
Rajalaxmi
Re: [ATL] one to one transformation mapping [message #480006 is a reply to message #479974] Thu, 13 August 2009 12:51 Go to previous messageGo to next message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080803050803040305080500
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

Your transformation seems correct.
Do you have a target model created (maybe empty)?
Do you have some stacktrace displayed in the Console View?
Or maybe it's a problem in the launch configuration.

Regards,
Freddy.

Rajalaxmi a
Re: [ATL] one to one transformation mapping [message #480053 is a reply to message #480006] Thu, 13 August 2009 15:21 Go to previous message
Eclipse UserFriend
Originally posted by: crajiz3rc.gmail.com

Hi Freddy,

Thank you very much for responding.

The output i get is,
the target model is created and it contains the Component Entity along
with the participant's name.
The Implementation Entity is not created.
I think there is a problem with the link.
In the console it says that the Component.Implements can not take the
value assigned.

When i change the rule to :

module SouMMtoTarMM; -- Module Template
create OUT : TarMM from IN : SouMM;

rule Participant2Component{
from p: SouMM!Participant
to
c: TarMM!Component (name<-p.name,implements<-t)
t: TarMM!Implementation (name<-p.name)
}

The target model contains Component along with Implementation. But both of
them have Participant's name as their name. I would like Implementation to
have the name of the Port found in the Source Model.

Please tell me what changes i have to do,

Thank you for helping me,

Best Regards
Rajalaxmi
Previous Topic:[ATL] set "is Metametamodel" option programmatically
Next Topic:ATL: No Resource found, unable to extract to platform:/...
Goto Forum:
  


Current Time: Wed Apr 24 21:16:26 GMT 2024

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

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

Back to the top