Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Can I have two output models from one input model using ATL transformation?
Can I have two output models from one input model using ATL transformation? [message #1769093] Wed, 26 July 2017 12:47 Go to next message
zz lalou is currently offline zz lalouFriend
Messages: 17
Registered: April 2011
Junior Member
Hi,
My ATL transformation takes one input model which I aim to transform it into two different models.
Is that possible to have more than one output model using ATL?
Re: Can I have two output models from one input model using ATL transformation? [message #1769481 is a reply to message #1769093] Tue, 01 August 2017 02:22 Go to previous messageGo to next message
Ricardo \\\"CaWal\\\" Cacheta Waldemarin is currently offline Ricardo \\\"CaWal\\\" Cacheta WaldemarinFriend
Messages: 29
Registered: January 2013
Junior Member
Here is presented how to create elements in different models conforming to the same metamodel: https://www.eclipse.org/forums/index.php/t/462932/

And in the language guide (https://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Language#Simple_target_pattern_element)

Quote:

Since ATL 3.1:

The declaration can specify the output model where to create elements. When several output models conform to the same metamodel, the in keyword allow to specify the output model name. Here is a sample transformation header:

create OUT1 : MM_B, OUT2 : MM_B from ... ;

Below is an output pattern which creates elements in the OUT2 model:

to
    o : MM_B!Class2 in OUT2


If possible, I think is better to use two different transformations. Nevertheless, you can create multiple models in one transformation. =)

Re: Can I have two output models from one input model using ATL transformation? [message #1769515 is a reply to message #1769481] Tue, 01 August 2017 09:24 Go to previous messageGo to next message
zz lalou is currently offline zz lalouFriend
Messages: 17
Registered: April 2011
Junior Member
Thank for replying,
In fact, in my case, each output model conforms to a different meta-model.
Is that possible?
Re: Can I have two output models from one input model using ATL transformation? [message #1835319 is a reply to message #1769515] Mon, 30 November 2020 15:53 Go to previous messageGo to next message
Burak Karaduman is currently offline Burak KaradumanFriend
Messages: 84
Registered: July 2018
Member
This is actually, what i am looking for too.
Re: Can I have two output models from one input model using ATL transformation? [message #1835340 is a reply to message #1835319] Tue, 01 December 2020 08:09 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

You can create any number of output models, regardless of the metamodels those output models conform to. The example Ricardo provided earlier shows the special declaration you need to write if multiple output models conform to the same metamodel (= the more difficult situation).

I've attached a simple example Eclipse project where two output models conform to different metamodels.


Cheers,
Dennis
Previous Topic:counting the number of occurences ofan eReference in an ATL transformation
Next Topic:Multiple Metamodel ATL transformation to Single File
Goto Forum:
  


Current Time: Thu Apr 25 11:22:42 GMT 2024

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

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

Back to the top