Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » transformation to adopt on metamodel-change?
icon5.gif  transformation to adopt on metamodel-change? [message #1567621] Fri, 16 January 2015 13:21 Go to next message
Thomas Busch is currently offline Thomas BuschFriend
Messages: 23
Registered: November 2014
Junior Member
Hi,

there are several datamodels which are based on the same metamodel. Now if the metamodel gets a bit changed I would like to adopt the datamodels to the new metamodel.
Is there some kind of simple solution to copy most of the elements 1:1 and only change some of the elements?
(In ATL there is a refining mode which does exactly that, but it is a declarative language and afaik that mode only supports copying between models which have the same metamodel)

This sounds like a problem which might occur pretty often, but I couldnt find any solution. I would be thankful about any help / tip!
Re: transformation to adopt on metamodel-change? [message #1567746 is a reply to message #1567621] Fri, 16 January 2015 14:55 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You highlight a significant limitation of all three QVT languages.

I originally thought of introducing some kind of copy/clone keyword, but
now favour a simpler solution. Let a mapping with a reserved name such
as XXX::copy be auto-generated on demand to create a deep copy of an
XXX. This can then be used as is or refined to create a custom copy.

Today, I think your only solution is to write a meta-transformation that
converts a metamodel to an abstract copy transformation that your real
transformation refines.

Regards

Ed Willink


On 16/01/2015 13:21, Thomas Busch wrote:
> Hi,
>
> there are several datamodels which are based on the same metamodel. Now
> if the metamodel gets a bit changed I would like to adopt the datamodels
> to the new metamodel.
> Is there some kind of simple solution to copy most of the elements 1:1
> and only change some of the elements? (In ATL there is a refining mode
> which does exactly that, but it is a declarative language and afaik that
> mode only supports copying between models which have the same metamodel)
>
> This sounds like a problem which might occur pretty often, but I couldnt
> find any solution. I would be thankful about any help / tip!
>
Re: transformation to adopt on metamodel-change? [message #1572976 is a reply to message #1567746] Mon, 19 January 2015 12:58 Go to previous messageGo to next message
Teun van de Berg is currently offline Teun van de BergFriend
Messages: 12
Registered: October 2014
Junior Member
That approach would save you the effort of learning a different language / tool. Ed, I would be interest if a feature like that is (to be) implemented.

If you don't mind leaning a different language / tool there are tools that support meta model and model (co-)evolution. They integrate with EMF. The following paper describes a few of them: https://hal.archives-ouvertes.fr/hal-00499395

Kind regards,
Teun
Re: transformation to adopt on metamodel-change? [message #1579924 is a reply to message #1572976] Fri, 23 January 2015 07:12 Go to previous messageGo to next message
Thomas Busch is currently offline Thomas BuschFriend
Messages: 23
Registered: November 2014
Junior Member
Ed, I am not sure, if I understand you correctly.
Did you meant that I write a transformation that uses the metamodel to create an ATL-transformation, which rules just copies all objectypes 1:1. Then I modify the rules where the changed metamodel is different and use that transformation for my task?

Teun, yes, other languages are an option, I will look into that, thanks!
Re: transformation to adopt on metamodel-change? [message #1694039 is a reply to message #1567621] Thu, 30 April 2015 08:40 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
Thomas Busch wrote on Fri, 16 January 2015 08:21
Hi,

there are several datamodels which are based on the same metamodel. Now if the metamodel gets a bit changed I would like to adopt the datamodels to the new metamodel.
Is there some kind of simple solution to copy most of the elements 1:1 and only change some of the elements?

This sounds like a problem which might occur pretty often, but I couldnt find any solution. I would be thankful about any help / tip!


Hi Thomas ,

I suggest you to look at Edapt project (https://www.eclipse.org/edapt/).
In case changes are really inessential you may consider to use EMF Ecore2ecore mappings (available via context menu "Map to Ecore..." for *.ecore models).

Regards,
Sergey.
Re: transformation to adopt on metamodel-change? [message #1694266 is a reply to message #1567621] Mon, 04 May 2015 06:28 Go to previous message
Thomas Busch is currently offline Thomas BuschFriend
Messages: 23
Registered: November 2014
Junior Member
Hi Sergej,

I decided to use Edapt which works very well, thank you!
Previous Topic:UML Tool + QVT
Next Topic:template function in QVT?
Goto Forum:
  


Current Time: Wed Apr 24 15:09:51 GMT 2024

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

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

Back to the top