Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » What transformation engine for my use-case
What transformation engine for my use-case [message #704438] Thu, 28 July 2011 16:20 Go to next message
Julien Bigot is currently offline Julien BigotFriend
Messages: 26
Registered: July 2009
Junior Member
Hi,

I am currently evaluating the M2M transformation engines of the EMF project.

My use case is a "compiler". I parse a set of user written source files (a software component assembly) and generate an assembly from another language. I have created the metamodels for both the input (IMM) and output (OMM) languages.

Here is my current workflow:

  1. Parse the source files using xtext and get a model (IM') that conforms to IMM' (not exactly IMM due to limitations of xtext) in its java representations (EObjects & co.)
  2. Apply a minor transformation(a) on IM' to get IM that exactly conforms to IMM
  3. Programmatically initialize the output model (OM) that conforms to OMM provided some data from the command line (type of the main component) and from IM. OM contains references to IM.
  4. Iterate the two following steps:

    1. Make optimization choice and based on that, programmatically set some values on elements of OM
    2. Apply an endogenous transformation(b) on OM that relies on informations from IM and can add references to it.

  5. When the transformation phase yields no change, the compilation is done
  6. Dump the resulting model into its XML representation


My two transformations (a) & (b) are currently written in Java and work on the EObject instances. This is somewhat difficult to maintain and I'm looking to switch to a dedicated model transformation language.

I looked at ATL, QVTo & QVTd. On the EMF website I didn't found much documentation for either QVTo or QVTd so I looked more closely at ATL.

It seems to me that ATL needs to work on its own model representation (ASMModel & ASMModelElement instead of Resource & EObjects). It also seems to me that the only way to go from the EObject based representation to the ASMModel one is to go through XMI wich meand a dump and a parse each time. As my transformation is iterative I guess it will induce a real performance hit.

So I'm reconsidering the choice between these three options, I don't know if some documentation is available for the QVT based ones that I didn't find. Perhaps there exists yet another option I didn't consider.

What would be your advice ?
Re: What transformation engine for my use-case [message #704474 is a reply to message #704438] Thu, 28 July 2011 16:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi Julien

It's a difficult choice. Only QVTd is easy to eliminate; it currently
only has editors; no execution capability.

All Eclipse tools work with Ecore models so you should not find the
meta-models are a significant discriminating factor.

ATL is perhaps the most mature with the largest user base. It's
pragmatic approach to QVTd puts it 5
years ahead in terms of useability. Unfortunately ATL lacks a clear
specification.

Xtend is perhaps the next most used. Its strong links with Xtend and
Xtext are helpful, and for you the
integration with MWE as an outer control layer may be useful.

QVTo has some strong advocates, particularly those who like a
potentially strong OMG specification. The best
practical documentation is the example project in the distribution.

Epsilon and Viatra2 have strong niche communities.

Apologies for any tools that I've omitted and for limited experience on
some that I have mentioned.

Regards

Ed Willink



On 28/07/2011 17:20, Julien Bigot wrote:
> Hi,
>
> I am currently evaluating the M2M transformation engines of the EMF
> project.
>
> My use case is a "compiler". I parse a set of user written source
> files (a software component assembly) and generate an assembly from
> another language. I have created the metamodels for both the input
> (IMM) and output (OMM) languages.
>
> Here is my current workflow:
>
> Parse the source files using xtext and get a model (IM') that conforms
> to IMM' (not exactly IMM due to limitations of xtext) in its java
> representations (EObjects & co.)
> Apply a minor transformation(a) on IM' to get IM that exactly conforms
> to IMM
> Programmatically initialize the output model (OM) that conforms to OMM
> provided some data from the command line (type of the main component)
> and from IM. OM contains references to IM.
> Iterate the two following steps:
>
> Make optimization choice and based on that, programmatically set some
> values on elements of OM
> Apply an endogenous transformation(b) on OM that relies on
> informations from IM and can add references to it.
>
> When the transformation phase yields no change, the compilation is done
> Dump the resulting model into its XML representation
>
>
> My two transformations (a) & (b) are currently written in Java and
> work on the EObject instances. This is somewhat difficult to maintain
> and I'm looking to switch to a dedicated model transformation language.
>
> I looked at ATL, QVTo & QVTd. On the EMF website I didn't found much
> documentation for either QVTo or QVTd so I looked more closely at ATL.
>
> It seems to me that ATL needs to work on its own model representation
> (ASMModel & ASMModelElement instead of Resource & EObjects). It also
> seems to me that the only way to go from the EObject based
> representation to the ASMModel one is to go through XMI wich meand a
> dump and a parse each time. As my transformation is iterative I guess
> it will induce a real performance hit.
>
> So I'm reconsidering the choice between these three options, I don't
> know if some documentation is available for the QVT based ones that I
> didn't find. Perhaps there exists yet another option I didn't consider.
>
> What would be your advice ?
Re: What transformation engine for my use-case [message #704477 is a reply to message #704474] Thu, 28 July 2011 17:19 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 523
Registered: July 2009
Senior Member
The EMFVM of ATL is working directly on EMF concepts (resources and eobjects).
Re: What transformation engine for my use-case [message #705052 is a reply to message #704477] Fri, 29 July 2011 11:22 Go to previous message
Julien Bigot is currently offline Julien BigotFriend
Messages: 26
Registered: July 2009
Junior Member
Thank you a lot Edward & Sylvain for all your input. I guess I will investigate ATL, QVTo & XTend more closely.
Previous Topic:ATL code
Next Topic:[QVT-R & ATL] External parameters - Global variables
Goto Forum:
  


Current Time: Fri Dec 19 06:42:32 GMT 2014

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

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