|What transformation engine for my use-case [message #704438]
||Thu, 28 July 2011 12:20
| Julien Bigot
Registered: July 2009
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 ?
Powered by FUDForum
. Page generated in 0.01698 seconds