Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » How to run ATL transformation programmatically(move our of the Eclipse Cocoon for ATL Model-2-model transformations)
How to run ATL transformation programmatically [message #1816212] Wed, 23 October 2019 22:56 Go to next message
Vladimir Estivill-Castro is currently offline Vladimir Estivill-CastroFriend
Messages: 2
Registered: October 2019
Junior Member
I have tried the advice given in
1) see the URL modeling-languages.com/executing-atl-transformations-java/
2) See the URL victorguana.blogspot.com/2015/02/running-atl-emftvm-transformations.html
3) See the URL denniswagelaar.wordpress.com/2018/05/20/compiling-and-running-atl-emftvm-from-ant-and-maven/comment-page-1/?unapproved=9&moderation-hash=80fdcc2b3acf1e6e503317bed8fc46e8#comment-9

I would like to
run an ATL programmatically (outside the ECLIPSE environment) with no OUTPUT models because the ATL-code runs an ATL-query. The output is code or a script. Like some of the examples in the ATL zoo (the Example: Microsoft Office Excel Extractor code starts with query XML2Text = XML!Root.allInstances()
->asSequence()
->first().ExcelFile().writeTo('C:\\ ... path to be completed before using the
transformation ... \\exampleExcelJavaSo

I have installed ANT and Maven and can reproduce the example from (3) above. I can run in Netbeans the java code from (2) above. However, the full integrated jar of (1) expects and output model. Modifying any of these resources to what I want to do meets a lot of obstacles. I tried modifying the java code from Victo Guana, and I can change the hardcoded parameters so they can be supplied as on-line parameters. Somehow the .emftvm file that I produce with the ANT/MAVEN transformation by Dennis Wagelaar gives me an error
Can't not set properties, as it is contained in the input model.

Many thanks. If there is a nice tutorial or comprehensive example, that would be very nice. I have event tried to do a plain ANT set of targets but this also failed.
Re: How to run ATL transformation programmatically [message #1816620 is a reply to message #1816212] Fri, 01 November 2019 15:53 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

That's too many problems at once: can you start with your transformation in the Eclipse environment and see if that works?

Cheers,
Dennis
Re: How to run ATL transformation programmatically [message #1859924 is a reply to message #1816620] Wed, 05 July 2023 14:24 Go to previous messageGo to next message
Reynaldo Alvarez is currently offline Reynaldo AlvarezFriend
Messages: 2
Registered: July 2023
Junior Member
I have a similar problem. My ATL runs smoothly using the default EMF compiler in Eclipse. However, when trying to execute it from a Java class, I come across solutions that are all oriented towards using EMFTVM. When I add "-- @atlcompiler emftvm" to the ATL file and specify in the execution configuration to use the EMFTVM compiler, I encounter the following error. How can I find out the rules or constraints for using this VM?

An internal error occurred during: "Launching ppsr2dcatcs".
java.lang.IllegalArgumentException: Cannot read properties of 22a6c42c:DCATCS!CSProject, as it is contained in an output model
Re: How to run ATL transformation programmatically [message #1859933 is a reply to message #1859924] Thu, 06 July 2023 05:48 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

The differences between the ATL virtual machines are documented here:

https://wiki.eclipse.org/ATL/VM_Comparison

In your case, "Output model navigation" is forbidden in ATL, but only EMFTVM enforces it at runtime.


Cheers,
Dennis
Re: How to run ATL transformation programmatically [message #1859934 is a reply to message #1859933] Thu, 06 July 2023 06:56 Go to previous messageGo to next message
Reynaldo Alvarez is currently offline Reynaldo AlvarezFriend
Messages: 2
Registered: July 2023
Junior Member
Thank you very much for your immediate assistance. I can now see the differences. Could you please tell me if there is any way to invoke the transformation using RegularVM? Would it be considered bad practice to avoid EMFTVM?
Re: How to run ATL transformation programmatically [message #1859953 is a reply to message #1859934] Thu, 06 July 2023 17:41 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

I've updated the information on the ATL/Developer Guide wiki page. Please check there for some examples of using the RegularVM or emfvm from Java.

Cheers,
Dennis
Previous Topic:Bug in default trace resolution?
Next Topic:ATL 4.8.0 released
Goto Forum:
  


Current Time: Sat Nov 11 08:16:55 GMT 2023

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

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

Back to the top