Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [EMFTVM] Empty output model with programatically generated meta- and inputmodel
[EMFTVM] Empty output model with programatically generated meta- and inputmodel [message #1783807] Sun, 18 March 2018 11:46 Go to next message
Hendrik Janssen is currently offline Hendrik JanssenFriend
Messages: 1
Registered: March 2018
Junior Member
So I've tried to use the EMFTVM compiler to create a transformation programatically in a standalone application, as in this example https://github.com/guana/ATLauncher. Now where my implementation differs is that I generate my metamodels programatically from class definitions, not from .ecore files, and I instantiate my input model from an object, not from a .xmi file. I've written my own parsing functions (see attachment) to do this.

Now when I run the transformation it doesn't give me any exceptions, but it gives me an empty output model. I've debugged the code into the EMFTVM source code and compared it to the execution of Guana's off-the-shelf launcher, to see where it differs. One difference I've found is that, in my implementation, the function allInstancesOf() in the ModelImpl generates an empty InstanceOfList for the ResourceIterable of my inputmodel resource (see pictures in attachment). I'm thinking this might cause the problem, but I have no clue how to fix it.

The transformation is pretty trivial and only used to test whether this kind of use is possible, and I'm pretty sure it's correct (I've also included this in the attachments).

I've been breaking my head over this for quite some time now, any help is very appreciated!
Re: [EMFTVM] Empty output model with programatically generated meta- and inputmodel [message #1787509 is a reply to message #1783807] Sun, 27 May 2018 20:29 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Can you check in the debugger if there exist multiple instances of the metamodel/EClasses in memory? Aliasing problems are common in EMF, whenever the metamodel is loaded explicitly. EMF may choose to auto-load its own instance of the metamodel when loading the input model. ATL/EMFTVM will then not find any instances of the explicitly loaded EClasses, because the input model elements all point to different instances of the same EClass.

Cheers,
Dennis
Previous Topic:File2Model by EMFTVM
Next Topic:Problem with collection
Goto Forum:
  


Current Time: Sat Apr 20 01:14:52 GMT 2024

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

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

Back to the top