Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Automated runs of ATL-Transformations (Do Unit-Test for ATL-Transformations exist?)
Automated runs of ATL-Transformations [message #1691741] Thu, 09 April 2015 12:00 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hi all,

I have a bunch of different input-models (serialized in .xmi) for my ATL-Tranfo.
So it is quite onerous to run them seperatly, by configuring the runtime-config every time..

Is there a better, way to run tranformations on different input-models at once (one after an other)?

Maybe something link a Unit-Test for ATL-Transformations with different input-models?

Best regards,

Alex
Re: Automated runs of ATL-Transformations [message #1691742 is a reply to message #1691741] Thu, 09 April 2015 12:04 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member
Hi,
You can use either specific ANT tasks or a dedicated Java API.
You should find everything you need from https://wiki.eclipse.org/ATL/Howtos#How_do_I_launch_transformations_programmatically.3F


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Automated runs of ATL-Transformations [message #1691743 is a reply to message #1691742] Thu, 09 April 2015 12:08 Go to previous messageGo to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Thanks for the fast answer et bonne journee..
Re: Automated runs of ATL-Transformations [message #1691887 is a reply to message #1691741] Fri, 10 April 2015 10:10 Go to previous messageGo to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hello,

one little question:
When I launch my transformations via java, will superimpositions be supported by default?

Will the following code-snippet (from: https://github.com/101companies/101repo/blob/master/contributions/atl/src/atl/RunTransfoJava.java) work :

ILauncher transformationLauncher = new EMFVMLauncher();
...
transformationLauncher.launch(ILauncher.RUN_MODE, new NullProgressMonitor(), new HashMap<String,Object>(),
new FileInputStream("Transformations/ROOT_TRANSFORMATION_FOR_SUPERIMPOSITIONS.asm"));


Regards,
Alex
Re: Automated runs of ATL-Transformations [message #1691895 is a reply to message #1691887] Fri, 10 April 2015 10:43 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member
I don't think so, you should have to provide specific options to the launcher via a corresponding Map<String,Object>.
For knowing about the available options, you can take a look into the implementation of the launcher you are using (EMFVMLauncher).


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Automated runs of ATL-Transformations [message #1691930 is a reply to message #1691895] Fri, 10 April 2015 13:27 Go to previous messageGo to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hi,

I just tried the following and came quit far:

1. Created a ATL-Plugin for a ATL-Launch-Configuration
2. Added all ATL-Modules and Libs, so the .properties-file is build and looks fine and the superimposition-hierarchy should work :
# ATL modules: if several, by order of superimposition (the latter ones overrides the former ones)
SuperModule_A2B.modules = module0.atl, module1.atl, initializations.atl


But when I run the transformation from java like this:
                        SuperModule_A2B runner1 = new SuperModule_A2B();
			runner1.loadModels("inputmodels/Mod_1.xmi");
			runner1.doAlfModel2Java(new NullProgressMonitor());
			runner1.saveModels("outputmodels/Mod1_out.xmi");


All needed rules in initializations.atl couldn't be found. Or do I maybe create my superimposition-hierarchy in a wrong way?

Thanks a lot for your help
Re: Automated runs of ATL-Transformations [SOLVED] [message #1691932 is a reply to message #1691930] Fri, 10 April 2015 13:48 Go to previous message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hi,

I found the problem and solved it.

All the "underlying" modules where also added as libraries in the config-file:

# ATL modules: if several, by order of superimposition (the latter ones overrides the former ones)
SuperModule_A2B.modules = module0.atl, module1.atl, initializations.atl

# Libraries paths
SuperModule_A2B.libraries.module0 = module0.asm
SuperModule_A2B.libraries.module1 = module1.asm
SuperModule_A2B.libraries.initializations= initializations.asm


I've added the '@path' in the modules itselves to have a better understanding code. But this
lead to a wrong plugin-project configuration.

~Alex
Previous Topic: problem in running of ATL module
Next Topic:convert uml to owl
Goto Forum:
  


Current Time: Thu Jan 18 13:25:21 GMT 2018

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

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