[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.m2m] Re: [ATL] Merging ATL transformations?

Matthias Bohlen schreef:
On 2007-03-19 11:59:59 +0100, Dennis Wagelaar <dennis.wagelaar@xxxxxxxxx> said:

Matthias Bohlen schreef:
Hi all,

I have several small re-usable ATL transformations which I'd like to combine into one large transformation. The combined transformation should have the union of all metamodels in the "create" list and helpers in the "uses" list and the union of all transformation rules.

Hi Matthias,

(This is probably starting to bore you:) you can write several small transformation modules and then superimpose them in any order, provided that there's no rule overlap.

No, it is not boring me at all. :-)

Example: When I have transformations A, B and C, can I really have a transformation D which simply contains the following additional line:

uses A, B, C;

Well, you won't have a physical transformation "D", but the result of superimposing A, B and C on top of eachother is equivalent.


I suppose it's best to experiment a bit with superimposition, just to get to know what it can do...

EMF meta-models can be "merged", or rather linked, by defining a new meta-model that references elements from the other meta-models. For example, you can make an "Import" abstract meta-class, that inherits from at least one meta-class from each meta-model you want to reference. ATL then loads the whole network of linked EMF meta-models whenever you load the top-level meta-model.

Combine that with the solution I previously wrote about of referring to your meta-model with always the same symbolic name (e.g. "MM"), and you can combine rules on different (parts of the) meta-models within one transformation.


This would be really easy! Should this work today, already?

It should work with ATL as it sits in CVS, yes.


Cheers, Matthias at andromda.org


-- Regards, Dennis