Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » simple rules transformation problem(Transformation problem)
simple rules transformation problem [message #1689579] Mon, 23 March 2015 21:53 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
	     t : MetaAcme!Family (  name        <-

rule   Bddiagram2System {
	from sys: MetaSysml!BDDiagram 
	     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: simple rules transformation problem [message #1690090 is a reply to message #1689579] Wed, 25 March 2015 08:22 Go to previous message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member

the problem is that both matched rules [Bddiagram2Family / Bddiagram2System], are called for (every) input-element with type MetaSysml!BDDiagram in your input model!
The easiest way to solve it, is to use some guards on the input-elements.

Just look at the following example:

With a guard on a matched rule, you can specify an OCL-Condition that each element have to comply.

Hope this helps,

Previous Topic: rules transformation problem
Next Topic:Bug (?) in Inheritance-hierarchy of matched rules
Goto Forum:

Current Time: Fri Sep 21 01:59:53 GMT 2018

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

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

Back to the top