Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL Transformation rule(Transformation problem)
ATL Transformation rule [message #1692086] Mon, 13 April 2015 10:36 Go to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
I'm working on some issues I'm meeting trying to make transformation rules from MetaSysml to MetaAcme.
Here are 4 very simple rules:
   rule System2AcmeFile {
	from s: MetaSysml!System
	to  
	     t : MetaAcme!AcmeFile ( 
		    name     <- s.name,
	 family<-s.bdddiag->collect( family|thisModule.Bddiagram2Family(family))
	 	 , 
	 	system <-s.bdddiag->collect(system |thisModule.Bddiagram2System(system))
		)
}
  
   lazy rule Bddiagram2Family {
	from s: MetaSysml!BDDiagram
	to  
	     t : MetaAcme!Family ( 
		    name        <- s.name
			,  
		elementtype <- s.compflow 
		
 )		
}
    
    lazy rule Bddiagram2System {
	from s: MetaSysml!BDDiagram
	to  
	     t : MetaAcme!System ( 
		    name     <- s.name 
			,
		
		   connector<- s.compflow )	}

  	rule ItemFlow2Connector {
	from s: MetaSysml!ItemFlow
	to  
	     t : MetaAcme!Connector ( 
		    name       <- s.name
			
			)}


But The problem is that I get the Connector outside of System;
Anyone can help me to solve this problem .
Thank you very much .

[Updated on: Mon, 13 April 2015 10:42]

Report message to a moderator

Re: ATL Transformation rule [message #1692123 is a reply to message #1692086] Mon, 13 April 2015 16:28 Go to previous messageGo to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hi,

it is hard to help you without knowing the metamodel 'MetaSysml'. But I would just guess:

1. create a do{} block in your: 'Bddiagram2System '

2. get the equivalent output-model-element to your : s: MetaSysml!BDDiagram
by accessing the trance

3. set the .system-property of the quivalent output-model-element

And please start reading the docu!

~Alex
Re: ATL Transformation rule [message #1692226 is a reply to message #1692123] Tue, 14 April 2015 11:52 Go to previous messageGo to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
This is the metamodel SysML.

[Updated on: Tue, 14 April 2015 11:58]

Report message to a moderator

Re: ATL Transformation rule [message #1692289 is a reply to message #1692226] Tue, 14 April 2015 20:02 Go to previous messageGo to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
you can better explain.
thank you very much .
Re: ATL Transformation rule [message #1692653 is a reply to message #1692289] Fri, 17 April 2015 08:57 Go to previous message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
Please ,
I don't understand the " create a do{} block in your: 'Bddiagram2System ' "

you can better explain.
thank you very much .
Previous Topic:convert uml to owl
Next Topic:Problem of transformation
Goto Forum:
  


Current Time: Sat Nov 25 09:50:14 GMT 2017

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

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