Bidirectional M2M Transformations using Eclipse EMF

1.8k views Asked by At

I would like to do bidirectional Model2Model transformations. Both models are EMF / eCore based. Actually I would prefer that one model is an editable view on the other.

What are my options? Which tools and tranformation languages are avaiable and what are their restrictions?

4

There are 4 answers

0
Loïc Gammaitoni On

If you insist on doing bidirectional M2M transformations, (so-called Bxs), then know that there is an active researcher's community updating that wiki : http://bx-community.wikidot.com. If you visit it, you will find that they list a bunch of tool suitable for Bx transformations http://bx-community.wikidot.com/relatedtools.

I used ECHO in the past which provides an implementation of QVT-R based on the KodKod constraints solver.

It's definitely worth giving it a try.

0
Markus On

M2M are the hardest. Industries strength tools are rare, lots of academia stuff. If you're dead set on a M2M language, look into ATL which should also support ecore. Otherwise you can look at Xtend, which was made for model to text but you can abuse it and it should be more comftable than plain java. If your into research look at Scala based transformations here

http://metrikforge.informatik.hu-berlin.de/attachments/download/193/george_wider_scheidgen_ICMT_2012.pdf

0
Arcanefoam On

Since you specifically asked for bi-directional model transformations, I must say that you have no options. To make it claer, adding to the answer you got form Ed Willink, none of the existing M2M transformation languages (AFAIK) supports bi-directional model transformations. Work on a QVTr and QVTc execution engine is starting to look promising if you are still interested in this: QVTd Project.

0
studgeek On

There are more transformation tools than you can imagine for EMF, its kind of crazy...

For metamodel to metamodel transformation where the models are not very similar:

If the metamodels are very similar and you only need to tweak some things then there are tools targeted that type of migration/updating:

  • ATL now has a refining mode
  • Epsilon has Flock
  • Edapt looks very interesting as well because it does the metamodel/model changes together. It lets you work on a tree view and comes with a set prebuilt set of rules.
  • Henshin which lets you operate on a diagram view of the model
  • EMF Refactor is a more code-level approach, that can also use Henshin rules somehow.

You can always directly manipulate the metamodel and model using the EMF Java APIs as well.

I'll add, if you are doing any real EMF work you will need to get and read EMF: Eclipse Modeling Framework. It's available in Safari also. I highly recommend Safari, for $39 a month you get almost every development ebook you could ever use.