Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » enabling "inter-model references" when running ATL emftvm transformations(A solution t enable "inter-model references" when running an ATL transformation using emftvm )
enabling "inter-model references" when running ATL emftvm transformations [message #1848315] Sat, 27 November 2021 22:17 Go to next message
nour nour is currently offline nour nourFriend
Messages: 19
Registered: April 2020
Junior Member
Hello,

I am trying to run an ATL transformation outside the eclipse environment.

I made use of the ATLauncher, which is a standalone java class that was created for this purpose (link to it: https://github.com/guana/ATLauncher)
However, in order for ATLauncher to run the transformation, it requires an ATL emftvm code. So I generated my transformation.emftvm code.

I tested the ATLauncher code in cmd and in eclipse and it runs the transformation. However, it does not consider "inter-model references" as ATL does.

The figure below depicts an ATL transformation run configuration, where I am able to check the "allow inter-model references" so I get the proper output model.

index.php/fa/41389/0/

Whereas, as depicted in the figure below, ATLauncher is run as a java application and not as an ATL transformation. So there is no way to enable the "inter-model reference" option.

index.php/fa/41390/0/

Therefore, in order to run my transformation using ATLauncher, I am obliged to alter my transformation code by eliminating the inter-model references, which produces an output model, but it is erroneous.

I would like suggestions on how can I enable "inter-model references" when running emftvm transformations.

Thank you in advance.
  • Attachment: atl.png
    (Size: 38.70KB, Downloaded 357 times)
  • Attachment: emftvm.png
    (Size: 31.42KB, Downloaded 347 times)
Re: enabling "inter-model references" when running ATL emftvm transformations [message #1848332 is a reply to message #1848315] Sun, 28 November 2021 15:13 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

You can use Model.setAllowInterModelReferences() on the output model in ATLauncher.java.

Cheers,
Dennis
Re: enabling "inter-model references" when running ATL emftvm transformations [message #1848345 is a reply to message #1848332] Mon, 29 November 2021 10:23 Go to previous messageGo to next message
nour nour is currently offline nour nourFriend
Messages: 19
Registered: April 2020
Junior Member
Hello Dennis,
Thanks for your reply.

I imported the required package.
 org.eclipse.m2m.atl.emftvm.Model

And I added the setsetAllowInterModelReferences(true) to the output model.

		Model outModel = EmftvmFactory.eINSTANCE.createModel();
		[b]outModel.setAllowInterModelReferences(true);[/b]
		outModel.setResource(rs.createResource(URI.createURI(outModelPath)));
		env.registerOutputModel("OUT", outModel);

However, it still does not seem to create the inter-model references and I still get the same error.
If I try with an altered version of my transformation (which does not contain any inter-model references), I get an output, but a wrong one.
Any idea why is this not working?
Re: enabling "inter-model references" when running ATL emftvm transformations [message #1848356 is a reply to message #1848345] Mon, 29 November 2021 14:39 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Sorry, I've no idea why it's not working. I would need a zipped up example Eclipse project to test it myself.

Please note that you can also open an issue at https://github.com/guana/ATLauncher/issues.


Cheers,
Dennis
Previous Topic: question about ATL
Next Topic:Call the ATL engine
Goto Forum:
  


Current Time: Fri Apr 26 12:43:58 GMT 2024

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

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

Back to the top