Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Running the Class2Relational examples from the zoo(unable to run example )
Running the Class2Relational examples from the zoo [message #993881] Tue, 25 December 2012 20:19 Go to next message
Teemu  Kanstrén is currently offline Teemu Kanstrén
Messages: 4
Registered: September 2009
Junior Member
Hello all,

I am trying to get some basic ATL examples running. Specifically, I am trying out the examples of transforming a class diagram definition to a relational database schema definition. This is the Class2Relational example from the ATL transformation zoo.

I got the ATL tutorial for transforming families to persons running fine and it produces the output as expected. So the basic setup should be ok.

But when I try to run the Class2Relational example, all I get is an empty file as output.

I tried to do this example first in the tutorial style by creating ecore models from the Class.xmi and Relational.xmi files, defining the configuration and running the Class2Relational.atl transformation. This produced the above empty file.

I then figured maybe I am just doing something wrong and re-tried with a new eclipse project where I just copied all the files (including directory structure) from the example as is. I figured maybe there is something I missed or changed wrong. Still it produces the same empty file.

Trying to run the example also complains about the "strings" library. It seemed to give a NumberFormatException, although couldn't figure out from where. There was a note in the Class2Relational.atl file to take the strings library out if there are problems. So I did that. Now, if I take the "strings" out as a library from the run configuration, and remove the "uses" import for it from the Class2Relational.atl file, but leave the calls to firstToLower() in the same file, it still gives me the same empty file when running the transformation. I was expecting a compile error or something as I though "firstToLower()" was in strings library. Unfortunately, I have no idea how to properly debug what happens in each step.

Anyway, this is where I am stuck at. Any ideas what is wrong? That is, how do I get the Class2Relational actually running..?

Thanks,
Teemu
Re: Running the Class2Relational examples from the zoo [message #997431 is a reply to message #993881] Mon, 07 January 2013 13:39 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
Hello,

Have you tried to use the various metamodels/models provided from http://www.eclipse.org/atl/atlTransformations/#Class2Relational?

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Running the Class2Relational examples from the zoo [message #997522 is a reply to message #997431] Tue, 08 January 2013 01:41 Go to previous messageGo to next message
Teemu  Kanstrén is currently offline Teemu Kanstrén
Messages: 4
Registered: September 2009
Junior Member
Quote:
Hello,

Have you tried to use the various metamodels/models provided from http://www.eclipse.org/atl/atlTransformations/#Class2Relational?

Hugo


Hi,

Yes this is where I downloaded the example code and ran it. I set the input metamodel to the Class.xmi and the output metamodel to Relational.xmi. I then chose Sample.xmi as the class model to transform. Whatever I choose as the output produces an empty file (with only the XMI header). That is from running the Class2Relational.atl file as an "ATL transformation" run configuration.

Teemu
Re: Running the Class2Relational examples from the zoo [message #997548 is a reply to message #997522] Tue, 08 January 2013 09:14 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
I've checked again the files provided in this example and they seem pretty "old".

Actually, Class.xmi and Relational.xmi are already the two metamodels defined in Ecore: they should be simply renamed as Class.ecore and Relational.ecore.
outClassXMI.ecore is in fact the input Class model (i.e. that conforms to the Class.ecore metamodel) and should be better renamed sampleClass.xmi (or something similar).
Then, starting from this, you should be able to set up properly a new launch configuration to produce as output a Relational model that could be named sampleRelational.xmi for instance.
You may have to modify/simplify a bit the transformation, but from what I've seen its overall structure is correct.

Best regards,

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Running the Class2Relational examples from the zoo [message #999301 is a reply to message #997431] Fri, 11 January 2013 19:08 Go to previous message
Teemu  Kanstrén is currently offline Teemu Kanstrén
Messages: 4
Registered: September 2009
Junior Member
Hi,

Thanks for the help. I had done everything else but did not realize that the outClassXMI.ecore file was the actual input file. I though it was Sample.xmi. Using the correct file as the input file at least I got the transformation running now.

Teemu
Previous Topic:Format Code (Ctrl+Shift+F) deletes 'drop' keyword. Does this effect the program in anyway?
Next Topic:ATL Transformation Error
Goto Forum:
  


Current Time: Tue Oct 21 16:46:29 GMT 2014

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

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