Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » rules transformation problem(Transformation problem)
rules transformation problem [message #1689582] Mon, 23 March 2015 21:56 Go to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
Hello everybody,

I'm working on some issues I'm meeting trying to make transformation rules from MetaSysml to MetaAcme.

Here are 2 very simple rules:

rule Bddiagram2Family {
	from  fam: MetaSysml!BDDiagram
	to  
	     t : MetaAcme!Family (  name        <- fam.name
)}

rule   Bddiagram2System {
	from sys: MetaSysml!BDDiagram 
	to  
	     t : MetaAcme!System ( 
		  name     <- 'System' ,
		 family   <- s.extend
)}


The problem is that I get this error when executed:

org.eclipse.m2m.atl.engine.emfvm.VMException: Trying to register several rules as default for element org.eclipse.emf.ecore.impl.DynamicEObjectImpl@9fff91 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@68160c (name: BDDiagram) (instanceClassName: null) (abstract: false, interface: false)) : Bddiagram2Family and Bddiagram2System

Do I need to modify the metamodel? or maybe some other solutions exists...

Thank you very much.
Re: rules transformation problem [message #1689773 is a reply to message #1689582] Tue, 24 March 2015 09:32 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 552
Registered: July 2009
Senior Member
replace
}

rule   Bddiagram2System {
	from sys: MetaSysml!BDDiagram 
	to  
by a comma and you're good to go.
As the message says, an element can only be matched by one rule only but a rule can produce multiple outputs.
Re: rules transformation problem [message #1689991 is a reply to message #1689773] Tue, 24 March 2015 20:39 Go to previous messageGo to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
Sorry , I don't understand you .
Please, you can better explain.
thank you very much .
Re: rules transformation problem [message #1690012 is a reply to message #1689991] Tue, 24 March 2015 20:43 Go to previous messageGo to next message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
Sorry , I don't understand you .
Please, you can better explain.
thank you very much .
Re: rules transformation problem [message #1690064 is a reply to message #1690012] Tue, 24 March 2015 22:11 Go to previous message
FSM ISFSM is currently offline FSM ISFSMFriend
Messages: 21
Registered: March 2015
Junior Member
It's good now..
Thank you very very much.
Previous Topic: transformation of MetaSysml to MetaAcme
Next Topic:simple rules transformation problem
Goto Forum:
  


Current Time: Sat Nov 25 08:06:16 GMT 2017

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

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