Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Combine / Concatenate matched rules of two modules
Combine / Concatenate matched rules of two modules [message #1722024] Tue, 02 February 2016 10:18 Go to next message
Joachim Engelhardt is currently offline Joachim EngelhardtFriend
Messages: 53
Registered: September 2013
Member

Hello,

I'm dealing with ATL (EMFTVM) for some weeks now and made several
transformations between meta models. Most of the modules transform
metamodels from or to UML.

I have a module which defines rules for the transformation of meta model
M1 to UML (M1->UML) and another module which defines rules for the
transformation from UML to meta model M2 (UML->M2).

Now, I need a transformation from M1 to M2 (M1->M2). Currently, I get
this by first do the transformation from M1 to UML and then take the
output resource as input resource for UML to M2 ((M1->UML)->(UML->M2)).

My question is: Is it possible to define a module for M1 to M2 which
uses M1ToUML and UMLToM2 (M1->UML->M2)? How would rules in this module
look like to reuse the rules from the other modules?

Thank you very much in advance.

Cheers,
Joachim
Re: Combine / Concatenate matched rules of two modules [message #1725105 is a reply to message #1722024] Mon, 29 February 2016 20:15 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 606
Registered: September 2012
Location: Belgium
Senior Member

ATL does not allow this by design: you cannot build intermediate model states within a single ATL transformation. Because you only need a constant amount of intermediate states (only one), you can use a model transformation chain. With EMFTVM, you can use the EMFTVM-specific Ant tasks to achieve that. Using Ant, you can pass the intermediate model in-memory from the M1-to-UML transformation to the second UML-to-M2 transformation. See https://wiki.eclipse.org/ATL/EMFTVM#Ant

Cheers,
Dennis
Re: Combine / Concatenate matched rules of two modules [message #1728000 is a reply to message #1725105] Wed, 30 March 2016 07:29 Go to previous message
Joachim Engelhardt is currently offline Joachim EngelhardtFriend
Messages: 53
Registered: September 2013
Member

I see. Thank you for your answer.
We actually did it by Java API, but also with passing the output model
from the first transformation as input for the second transformation.
I feel even good to know, that I didn't miss something which would make
it work as I thought.

Best wishes,
Joachim
Previous Topic:XML2XMI Serialization with nillable attributes
Next Topic:Cross-referencing UML profiles in ATL
Goto Forum:
  


Current Time: Fri Sep 20 20:20:00 GMT 2024

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

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

Back to the top