Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] refining more than one model
[ATL] refining more than one model [message #629997] Thu, 30 September 2010 09:48 Go to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Hi,
I have a new transformation where I want to add Traces and I have read in
http:// www.google.es/url?sa=t&source=web&cd=1&ved=0CBUQ FjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2F download%3Fdoi%3D10.1.1.105.774%26rep%3Drep1%26type%3Dpdf&am p;rct=j&q=atl%20trace%20adder&ei=u1ukTOqwBoOQjAfUxNi hDA&usg=AFQjCNGrFkT6zZHJwkXlbsl1u8gUrg2RnQ&cad=rja
about TraceAdder...
Is it possible to use TraceAdder ?¿?
Is it provided by ATL plug-ins or I have to install some new plug-ins ?¿?

And now, a question about refining mode...
I have read, in previous comments that, more than one input model, that conforms to different metamodels, could be used in refining mode but...
Is it possible to refine more than one model, that is, for 2 different models of different metamodels, refine these 2 models ?¿?

In my ATL transformation I have as Input models:

Diff Model conforms to DIFF Metamodel
UML Model conforms to UML Metamodel
DB Model conforms to DB Metamodel
TRACE Model conforms to TRACE Metamodel

and as Output models:

DB Model
TRACE Model

Thanks in advance.
Re: [ATL] refining more than one model [message #630002 is a reply to message #629997] Thu, 30 September 2010 10:11 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
This TraceAdder system is in fact a HOT (higher order transformation) that will take as input your transformation and transform it to add the traceability mechanism. This will result in another transformation combining your transformation and the trace mechanism. You'll then use this transformation instead of the original one.

You can use an ant task :
<atl.loadModel name="ATL" metamodel="MOF" path="../metamodel/ATL.ecore"/>
<atl.loadModel name="myATL" metamodel="ATL" path="${path}.atl">
	<injector name="ATL" />
</atl.loadModel>
<atl.launch path="TracerAdder.asm" refining="true">
	<inoutmodel model="myATL" name="IN" />
</atl.launch>
<atl.saveModel model="myATL" path="${path}_tracer.atl">
	<extractor name="ATL" />
</atl.saveModel>

Concerning your second question, I'm not 100% sure but I think this will work.
Re: [ATL] refining more than one model [message #630018 is a reply to message #630002] Thu, 30 September 2010 12:06 Go to previous messageGo to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Thanks a lot !!!

Could you tell me where can I find the TracerAdder.asm ?¿?
I'm trying to launch an ant task to generate the traces but it can't find this file !!!

If I define an ATL transformation with Traces and input model is modified, there exist some mechanism that synchronize input/output models, that is, changes in input model are applied in output model, or it has to be implemented by user ?¿?

Best regards
Miguel Llàcer
Re: [ATL] refining more than one model [message #630036 is a reply to message #630018] Thu, 30 September 2010 13:18 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Miguel Ll wrote on Thu, 30 September 2010 08:06
Thanks a lot !!!

Could you tell me where can I find the TracerAdder.asm ?¿?
I'm trying to launch an ant task to generate the traces but it can't find this file !!!

If I define an ATL transformation with Traces and input model is modified, there exist some mechanism that synchronize input/output models, that is, changes in input model are applied in output model, or it has to be implemented by user ?¿?

Best regards
Miguel Llàcer

You'll find the TracerAdder.atl source code in the paper you linked at the end.
To answer your second question, I know some studies were started on that topic using ATL by modifying the VM if I remember correctly. I'll link that if I manage to find the url.
Re: [ATL] refining more than one model [message #630051 is a reply to message #630036] Thu, 30 September 2010 14:04 Go to previous messageGo to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
I have copy&paste the TracerAdder.atl but when it is compiled, 2 errors appear in code:
...
sourceVars : distinct ATL!VariableExp foreach (e in s."rule".inPattern.elements) (referredVariable <- e),
...
targetVars : distinct ATL!VariableExp foreach (e in
s.elements) (referredVariable <- e)
...

The error says: "distinct-foreach target pattern elements are not supported in refining mode, use lazy rules instead"

How can I replace this code with lazy rules ?¿?

Thanks a lot.

Miguel Llàcer
Re: [ATL] refining more than one model [message #630072 is a reply to message #629997] Thu, 30 September 2010 14:48 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
lazy rule aren't supported in refining mode either.

But if you're in refining mode you could have a look at the refiningTrace model produced directly by the transformation.
This model is always produced in refining modeand stores the transformations executed on the input model. The references to elements are not direct but are URI references so that you can find the corresponding element by using getEObject(uri) on the resource.

To "catch" the refiningTrace model produced, you can add to the transformation an ouput model called refiningTrace conforming to the meta-model RefiningTrace (be aware of the cases, the names have to be exact).

You'll find the RefiningTrace meta-model here
Previous Topic:[ATL] A strange Error message
Next Topic:[ATL-EMF] Problem with references
Goto Forum:
  


Current Time: Tue Mar 19 09:16:56 GMT 2024

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

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

Back to the top