|Using Epsilon for model refinement/update [message #926720]
||Fri, 28 September 2012 23:10
| David Rees
Registered: September 2012
I'm looking for a starting point to research the best way to use Epsilon for refining/updating models (and to verify Epsilon is the right tool in general). I would like to use it to transform between two very similar metamodels. One is Ecore from an XSD file and the 2nd is the Ecore I have manually cleaned up a bit around things like references ( I hope to eventually automate the metamodel transformation as well). Since the changes follow a semi-consistent pattern I want to just describe how they change rather than mapping all the ways they are the same.|
For example, in XSL I would use something like this and just add rules for the changes.
<xsl:template match="@* | node()">
<xsl:apply-templates select="@* | node()"/>
ATL 2010 calls this "Refining Mode" - http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Language#ATL_Refining_Mode.
For Epsilon, ETL seems the best choice, but I haven't found a concrete example of model refinement. I found the old thread pasted below that talks about using the "CommonEmfMetamodel transformation strategy" with ETL, but I can't find any additional information on it and the examples link in the thread is broken.
As long as we are discussing alternatives, do let me know if there is a better Epsilon choice than ETL. From what I can tell ETL is the right choice because: EWL is for manual changes, EOL might be an option according to the EWL chapter but ETL matching feels closer to what I need, and Flock actually seems interesting but I think its Type-focus might not be right for my use case.
Dimitrios Kolovos wrote on Sun, 29 April 2007 11:57
A transformation strategy can be attached to an ETL transformation (via
the Transformation Strategy tab or the respective API if you are running
from Java) to define how the transformation will handle input elements
for which the user has not specified an explicit transformation rule.
For example, the CommonEmfMetamodel transformation strategy, works very
similarly to the ATL "refine" mode: for each element of the source model
for which no transformation rule has been specified, it creates a copy
of the element in the target model. In case you need your transformation
to do something "slightly" different than the strategy you can also use
the "auto" keyword. You can find a working example of all these in the
OORefinement example available at:
ETL also provides an extension point which you can use to implement
custom transformation strategies (if you need more information about
this feature please let me know).
Laurent Merlet wrote:
> Hi all,
> I'am trying to understand what is the aim of "transformations
> I have already read the transformation strategies section of the online
> doc, but i don't see exactly what it consists of.
> Is it only for using ETL in Java ?
> If someone can explain it to me, I would be grateful.
> Best regards,
> Laurent MERLET
|Re: Using Epsilon for model refinement/update [message #938870 is a reply to message #929559]
||Wed, 10 October 2012 08:24
|| Horacio Hoyos
Registered: October 2009
As Antonio mentioned Flock might be the right choice for your case. In the broader sense ETL is the transformation language in the Epsilon suite, and strictly speaking a model refinement is a model transformation. In general model transformations are seen as a process in which a set of transformation rules are applied to an input model and as a result you get an output model. However, and ETL in particular supports this, your input and output models can be the same model, i.e., you are not creating a new model but modifying or refining it. Or you can create a new output model, but at the same time modify your input model.
I know this is not a solution per se, but just wanted to let you know that there is much you can do with ETL.
Horacio Hoyos Rodriguez
University Of York
Powered by FUDForum
. Page generated in 0.13088 seconds