resolveTemp's parameters are reversed after extraction to .atl [message #636681] |
Tue, 02 November 2010 13:05 |
Marten Sijtema Messages: 67 Registered: November 2009 |
Member |
|
|
I have a HOT, that produces an ATL model from a FATL model (which I defined myself, FATL.ecore meta model is a modified version of ATL.ecore meta model).
My FATL is implemented by a TCS project, which provides me a nice concrete syntax for FATL, basically an extended ATL syntax. I use this TCS project to inject my .fatl file into a .xmi file, which is then correctly processed by my FATL2ATL.atl model transformation file.
However, when I extract the model using
<atl.saveModel model="fatl2atl-output" path="${fatl2atlOutput}" >
<extractor name="ATL" />
</atl.saveModel>
the resolveTemp's parameters are reversed. So in my source editor I write:
ownerProject <- thisModule.resolveTemp(edt.ePackage, 'pjRoot')
and after extraction it is shown as:
ownerProject <- thisModule.resolveTemp('pjRoot', edt.ePackage)
Now, running this resulting atl file does not work. So I have to manually reverse the parameters every time, as you can imagine this is really annoying.
So it goes wrong upon injection, OR upon extraction. Is it the case that the TCS injection file (the .tcs file) is out of date? I used the ATL.tcs file as a starting point for creating my FATL.tcs file. Is there a new .tcs file maybe that DOES this correctly? Or is there a way to modify my current FATL.tcs file to make sure the resolveTemp is correctly injected?
An alternative solution would be to 'explain' ATL how to parse resolveTemp with reversed parameters.
Anyone some thoughts ?
My company: Sytematic, building business software from models.
|
|
|
Re: resolveTemp's parameters are reversed after extraction to .atl [message #636682 is a reply to message #636681] |
Tue, 02 November 2010 13:09 |
Vincent MAHE Messages: 129 Registered: July 2009 |
Senior Member |
|
|
Le 02/11/2010 14:05, Marten Sijtema a écrit :
> I have a HOT, that produces an ATL model from a FATL model (which I
> defined myself, FATL.ecore meta model is a modified version of ATL.ecore
> meta model).
>
> My FATL is implemented by a TCS project, which provides me a nice
> concrete syntax for FATL, basically an extended ATL syntax. I use this
> TCS project to inject my .fatl file into a .xmi file, which is then
> correctly processed by my FATL2ATL.atl model transformation file.
>
> However, when I extract the model using
>
> <atl.saveModel model="fatl2atl-output" path="${fatl2atlOutput}" >
> <extractor name="ATL" />
> </atl.saveModel>
>
>
> the resolveTemp's parameters are reversed. So in my source editor I write:
>
> ownerProject <- thisModule.resolveTemp(edt.ePackage, 'pjRoot')
>
>
> and after extraction it is shown as:
>
> ownerProject <- thisModule.resolveTemp('pjRoot', edt.ePackage)
>
You may examine the intermediate models to discover which step reverts
the order....
>
>
> Now, running this resulting atl file does not work. So I have to
> manually reverse the parameters every time, as you can imagine this is
> really annoying.
>
> So it goes wrong upon injection, OR upon extraction. Is it the case that
> the TCS injection file (the .tcs file) is out of date? I used the
> ATL.tcs file as a starting point for creating my FATL.tcs file. Is there
> a new .tcs file maybe that DOES this correctly? Or is there a way to
> modify my current FATL.tcs file to make sure the resolveTemp is
> correctly injected?
>
> An alternative solution would be to 'explain' ATL how to parse
> resolveTemp with reversed parameters.
>
> Anyone some thoughts ?
>
>
--
Cordialement
Vincent MAHÉ
Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
|
|
|
|
|
|
|
|
Re: resolveTemp's parameters are reversed after extraction to .atl [message #636706 is a reply to message #636681] |
Tue, 02 November 2010 14:08 |
Marten Sijtema Messages: 67 Registered: November 2009 |
Member |
|
|
But you are probably injecting normal ATL files in an ATL3.x workspace, am I right? Then it would work, because you can just use :
<atl.loadModel name="someModel" metamodel="atl" path="${path}" >
<injector name="ATL" />
</atl.loadModel>
This works with resolveTemp. But what if you want to extend the syntax of ATL? How would you do it? Using TCS and an ATL2.x workspace?
(By the way: thanks for the quick replies!)
My company: Sytematic, building business software from models.
[Updated on: Tue, 02 November 2010 14:10] Report message to a moderator
|
|
|
|
|
|
Re: resolveTemp's parameters are reversed after extraction to .atl [message #636744 is a reply to message #636717] |
Tue, 02 November 2010 15:52 |
Vincent MAHE Messages: 129 Registered: July 2009 |
Senior Member |
|
|
Le 02/11/2010 15:36, Marten Sijtema a écrit :
> Woooow...
> I just discovered something. After injecting, and inspecting the .xmi,
> the order is correct! (Why I thought it wasn't, beats me...)
>
> So, my HOT actually reverses it, it seems! because before extraction,
> when the result model is a .xmi, the order is already reversed.
> Ergo: only the HOT can be the one that transforms it wrongly. I'll have
> a look into that.
>
> I should have seen this earlier :( So you were right after all with the
> fact that it is maybe a prolbem somewhere else.
>
> Thanks for all the help.
Debugging MDE problems is like in programming: you first need to find
WHERE the problem takes place before trying to understand WHAT goes
wrong :-)
--
Cordialement
Vincent MAHÉ
Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
|
|
|
|
Powered by
FUDForum. Page generated in 0.05814 seconds