Home » Archived » GMT (Generative Modeling Technologies) » [AM3] Compile atl file using Ant
[AM3] Compile atl file using Ant [message #378462] |
Wed, 11 July 2007 10:12  |
Eclipse User |
|
|
|
Hi All,
Is it possible to compile an atl transformation from within an Ant
script? I want to use this to generate an atl transformation using a
higher-order transformation and apply it to some source models from a
single Ant script.
Kind regards,
Bas.
--
____________________________________________________________ ________
Bas Graaf
PhD Researcher
Delft University of Technology
Faculty of Electrical Engineering, Mathematics, and Computer Science
Department of Software Technology
Mekelweg 4
2628 CD Delft
The Netherlands
P.O. Box 5031
2600 GA Delft
The Netherlands
T: +31 (15) 2782467
F: +31 (15) 2786632
E: b.s.graaf@tudelft.nl
W: http://www.st.ewi.tudelft.nl/~basgraaf
|
|
|
Re: [AM3] Compile atl file using Ant [message #378469 is a reply to message #378462] |
Thu, 12 July 2007 05:34   |
Eclipse User |
|
|
|
Hi Bas,
First, you need to generate the ATL model that conforms to the ATL metamodel using your
higher-order transformation.
Then, you can extract the ATL model into the ATL file.
Once you have extracted the file in an ATL project, the transformation compiles automatically.
I copied below an example of how to extract the ATL model.
<project name="ATL Extractor" default="extract">
<target name="extract">
<property name="context" value="/YourFolder/"/>
<property name="source" value="${context}yourATLModel.ecore"/>
<property name="target" value="${context}yourATLModel.atl"/>
<am3.loadModel modelHandler="EMF" name="ATL" metamodel="MOF"
nsuri="http://www.eclipse.org/gmt/2005/ATL" />
<am3.loadModel modelHandler="EMF" name="IN" metamodel="ATL" path="${source}" />
<am3.loadModel modelHandler="EMF" name="TCS" metamodel="MOF" path="${context}TCS.ecore" />
<am3.loadModel modelHandler="EMF" name="ATL.tcs" metamodel="TCS"
path="${context}ATL-0.2-TCS.ecore">
</am3.loadModel>
<am3.saveModel model="IN" path="${target}">
<extractor name="ebnf">
<param name="format" value="ATL.tcs"/>
</extractor>
</am3.saveModel>
</target>
</project>
The TCS.ecore and ATL-0.2-TCS.ecore files are available in the AM3 component:
( http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmt/AM3 /org.eclipse.am3.core/resources/?root=Technology_Project)
After that, you can call the compiled transformation using the am3.atl task as any other
ATL transformation.
However, the compilation process takes some time, so it is possible that you call the
am3.atl task before the transformation is compiled.
Regards,
Marcos.
Bas Graaf wrote:
> Hi All,
>
> Is it possible to compile an atl transformation from within an Ant
> script? I want to use this to generate an atl transformation using a
> higher-order transformation and apply it to some source models from a
> single Ant script.
>
> Kind regards,
> Bas.
>
>
|
|
|
Re: [AM3] Compile atl file using Ant [message #378471 is a reply to message #378469] |
Thu, 12 July 2007 09:05  |
Eclipse User |
|
|
|
Hi Marcos,
Thanks for your reply. My problem was in fact that the extracted ATL
file was not compiled fast enough. Now I solved the problem using a
waitfor task:
<waitfor maxwait="30" maxwaitunit="second">
<available file="${target}.asm"/>
</waitfor>
Kind regards,
Bas.
Marcos Didonet Del Fabro wrote:
> Hi Bas,
>
> First, you need to generate the ATL model that conforms to the ATL
> metamodel using your higher-order transformation.
> Then, you can extract the ATL model into the ATL file.
>
> Once you have extracted the file in an ATL project, the transformation
> compiles automatically.
>
> I copied below an example of how to extract the ATL model.
>
> <project name="ATL Extractor" default="extract">
> <target name="extract">
> <property name="context" value="/YourFolder/"/>
> <property name="source" value="${context}yourATLModel.ecore"/>
> <property name="target" value="${context}yourATLModel.atl"/>
>
> <am3.loadModel modelHandler="EMF" name="ATL" metamodel="MOF"
> nsuri="http://www.eclipse.org/gmt/2005/ATL" />
> <am3.loadModel modelHandler="EMF" name="IN" metamodel="ATL"
> path="${source}" />
>
> <am3.loadModel modelHandler="EMF" name="TCS" metamodel="MOF"
> path="${context}TCS.ecore" />
> <am3.loadModel modelHandler="EMF" name="ATL.tcs" metamodel="TCS"
> path="${context}ATL-0.2-TCS.ecore">
>
> </am3.loadModel>
> <am3.saveModel model="IN" path="${target}">
> <extractor name="ebnf">
> <param name="format" value="ATL.tcs"/>
> </extractor>
> </am3.saveModel>
> </target>
> </project>
>
> The TCS.ecore and ATL-0.2-TCS.ecore files are available in the AM3
> component:
> ( http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmt/AM3 /org.eclipse.am3.core/resources/?root=Technology_Project)
>
>
> After that, you can call the compiled transformation using the am3.atl
> task as any other ATL transformation.
> However, the compilation process takes some time, so it is possible that
> you call the am3.atl task before the transformation is compiled.
>
>
> Regards,
>
> Marcos.
>
>
> Bas Graaf wrote:
>> Hi All,
>>
>> Is it possible to compile an atl transformation from within an Ant
>> script? I want to use this to generate an atl transformation using a
>> higher-order transformation and apply it to some source models from a
>> single Ant script.
>>
>> Kind regards,
>> Bas.
>>
>>
|
|
|
Re: [AM3] Compile atl file using Ant [message #602290 is a reply to message #378462] |
Thu, 12 July 2007 05:34  |
Eclipse User |
|
|
|
Hi Bas,
First, you need to generate the ATL model that conforms to the ATL metamodel using your
higher-order transformation.
Then, you can extract the ATL model into the ATL file.
Once you have extracted the file in an ATL project, the transformation compiles automatically.
I copied below an example of how to extract the ATL model.
<project name="ATL Extractor" default="extract">
<target name="extract">
<property name="context" value="/YourFolder/"/>
<property name="source" value="${context}yourATLModel.ecore"/>
<property name="target" value="${context}yourATLModel.atl"/>
<am3.loadModel modelHandler="EMF" name="ATL" metamodel="MOF"
nsuri="http://www.eclipse.org/gmt/2005/ATL" />
<am3.loadModel modelHandler="EMF" name="IN" metamodel="ATL" path="${source}" />
<am3.loadModel modelHandler="EMF" name="TCS" metamodel="MOF" path="${context}TCS.ecore" />
<am3.loadModel modelHandler="EMF" name="ATL.tcs" metamodel="TCS"
path="${context}ATL-0.2-TCS.ecore">
</am3.loadModel>
<am3.saveModel model="IN" path="${target}">
<extractor name="ebnf">
<param name="format" value="ATL.tcs"/>
</extractor>
</am3.saveModel>
</target>
</project>
The TCS.ecore and ATL-0.2-TCS.ecore files are available in the AM3 component:
( http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmt/AM3 /org.eclipse.am3.core/resources/?root=Technology_Project)
After that, you can call the compiled transformation using the am3.atl task as any other
ATL transformation.
However, the compilation process takes some time, so it is possible that you call the
am3.atl task before the transformation is compiled.
Regards,
Marcos.
Bas Graaf wrote:
> Hi All,
>
> Is it possible to compile an atl transformation from within an Ant
> script? I want to use this to generate an atl transformation using a
> higher-order transformation and apply it to some source models from a
> single Ant script.
>
> Kind regards,
> Bas.
>
>
|
|
|
Re: [AM3] Compile atl file using Ant [message #602295 is a reply to message #378469] |
Thu, 12 July 2007 09:05  |
Eclipse User |
|
|
|
Hi Marcos,
Thanks for your reply. My problem was in fact that the extracted ATL
file was not compiled fast enough. Now I solved the problem using a
waitfor task:
<waitfor maxwait="30" maxwaitunit="second">
<available file="${target}.asm"/>
</waitfor>
Kind regards,
Bas.
Marcos Didonet Del Fabro wrote:
> Hi Bas,
>
> First, you need to generate the ATL model that conforms to the ATL
> metamodel using your higher-order transformation.
> Then, you can extract the ATL model into the ATL file.
>
> Once you have extracted the file in an ATL project, the transformation
> compiles automatically.
>
> I copied below an example of how to extract the ATL model.
>
> <project name="ATL Extractor" default="extract">
> <target name="extract">
> <property name="context" value="/YourFolder/"/>
> <property name="source" value="${context}yourATLModel.ecore"/>
> <property name="target" value="${context}yourATLModel.atl"/>
>
> <am3.loadModel modelHandler="EMF" name="ATL" metamodel="MOF"
> nsuri="http://www.eclipse.org/gmt/2005/ATL" />
> <am3.loadModel modelHandler="EMF" name="IN" metamodel="ATL"
> path="${source}" />
>
> <am3.loadModel modelHandler="EMF" name="TCS" metamodel="MOF"
> path="${context}TCS.ecore" />
> <am3.loadModel modelHandler="EMF" name="ATL.tcs" metamodel="TCS"
> path="${context}ATL-0.2-TCS.ecore">
>
> </am3.loadModel>
> <am3.saveModel model="IN" path="${target}">
> <extractor name="ebnf">
> <param name="format" value="ATL.tcs"/>
> </extractor>
> </am3.saveModel>
> </target>
> </project>
>
> The TCS.ecore and ATL-0.2-TCS.ecore files are available in the AM3
> component:
> ( http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmt/AM3 /org.eclipse.am3.core/resources/?root=Technology_Project)
>
>
> After that, you can call the compiled transformation using the am3.atl
> task as any other ATL transformation.
> However, the compilation process takes some time, so it is possible that
> you call the am3.atl task before the transformation is compiled.
>
>
> Regards,
>
> Marcos.
>
>
> Bas Graaf wrote:
>> Hi All,
>>
>> Is it possible to compile an atl transformation from within an Ant
>> script? I want to use this to generate an atl transformation using a
>> higher-order transformation and apply it to some source models from a
>> single Ant script.
>>
>> Kind regards,
>> Bas.
>>
>>
|
|
|
Goto Forum:
Current Time: Tue Apr 29 16:41:10 EDT 2025
Powered by FUDForum. Page generated in 0.04406 seconds
|