Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » EMFTVM doesn't generate output
EMFTVM doesn't generate output [message #1005537] Sat, 26 January 2013 09:26 Go to next message
Antonio Moreno is currently offline Antonio MorenoFriend
Messages: 16
Registered: November 2012
Junior Member
Hello,
I'm developing some transformations in EMFTVM because I need multiple inheritance rules. Like I didn't get any output in all of them, I tried run the example PortsToPins available in Git repository of ATL.

My header of *.atl file is:
-- @atlcompiler emftvm
-- @path Ports=platform:/resource/TestPorts2Pins/Ports.ecore
-- @path Pins=platform:/resource/TestPorts2Pins/Pins.ecore
module PortsToPins;

create OUT : Pins from IN : Ports;

helper context Ports!Port def : pins : Sequen


The run configuration windows is:
h ttp://s8.postimage.org/6cf24q5md/Screen_Shot_2013_01_26_at_10_08_14.png
(paste without space)

Moreover, my launch file is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2m.atl.emftvm.launcher.EMFTVMTransformation">
<stringAttribute key="ATL File Name" value="//TestPorts2Pins/PortsToPins.atl"/>
<booleanAttribute key="Disable JIT compiler" value="false"/>
<booleanAttribute key="Display Timing Data" value="true"/>
<mapAttribute key="Inout Model Options"/>
<mapAttribute key="Inout Models"/>
<mapAttribute key="Inout Models Output Locations"/>
<mapAttribute key="Input Model Options"/>
<mapAttribute key="Input Models">
<mapEntry key="IN" value="platform:/resource/TestPorts2Pins/PortsBlockDiagram.xmi"/>
</mapAttribute>
<mapAttribute key="Metamodel Options"/>
<mapAttribute key="Metamodels">
<mapEntry key="Pins" value="platform:/resource/TestPorts2Pins/Pins.ecore"/>
<mapEntry key="Ports" value="platform:/resource/TestPorts2Pins/Ports.ecore"/>
</mapAttribute>
<stringAttribute key="Module Name" value="PortsToPins"/>
<stringAttribute key="Module Path" value="/TestPorts2Pins/"/>
<mapAttribute key="Output Model Options">
<mapEntry key="OUT" value="allowIntermodelReferences derivedFile"/>
</mapAttribute>
<mapAttribute key="Output Models">
<mapEntry key="OUT" value="platform:/resource/TestPorts2Pins/PinsOutput.xmi"/>
</mapAttribute>
<listAttribute key="Superimpose"/>
</launchConfiguration>


However, when I run the transformation, it generate the output file PinsOutput.xmi, but it only contains the XML header:
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="h ttp://www.omg.org/XMI"/>

(the space in http is due to I can't post urls if I have less than 5 posts)
I take the same output for all transformations runned by EMFTVM Sad
I have the last distribution of ATL (3.4.0).

Any suggestions?
Thank you in advance!
Antonio

[Updated on: Sat, 26 January 2013 09:29]

Report message to a moderator

Re: EMFTVM doesn't generate output [message #1005572 is a reply to message #1005537] Sat, 26 January 2013 18:08 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 26/01/13 10:26, Antonio M. Moreno schreef:
> Hello,
> I'm developing some transformations in EMFTVM because I need multiple
> inheritance rules. Like I didn't get any output in all of them, I tried run
> the example PortsToPins available in Git repository of ATL.
>
> My header of *.atl file is:
> -- @atlcompiler emftvm
> -- @path Ports=platform:/resource/TestPorts2Pins/Ports.ecore
> -- @path Pins=platform:/resource/TestPorts2Pins/Pins.ecore
> module PortsToPins;
>
> create OUT : Pins from IN : Ports;
>
> helper context Ports!Port def : pins : Sequen
>
> Moreover, my launch file is:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <launchConfiguration
> type="org.eclipse.m2m.atl.emftvm.launcher.EMFTVMTransformation">
> <stringAttribute key="ATL File Name" value="//TestPorts2Pins/PortsToPins.atl"/>
> <booleanAttribute key="Disable JIT compiler" value="false"/>
> <booleanAttribute key="Display Timing Data" value="true"/>
> <mapAttribute key="Inout Model Options"/>
> <mapAttribute key="Inout Models"/>
> <mapAttribute key="Inout Models Output Locations"/>
> <mapAttribute key="Input Model Options"/>
> <mapAttribute key="Input Models">
> <mapEntry key="IN"
> value="platform:/resource/TestPorts2Pins/PortsBlockDiagram.xmi"/>
> </mapAttribute>
> <mapAttribute key="Metamodel Options"/>
> <mapAttribute key="Metamodels">
> <mapEntry key="Pins" value="platform:/resource/TestPorts2Pins/Pins.ecore"/>
> <mapEntry key="Ports" value="platform:/resource/TestPorts2Pins/Ports.ecore"/>
> </mapAttribute>
> <stringAttribute key="Module Name" value="PortsToPins"/>
> <stringAttribute key="Module Path" value="/TestPorts2Pins/"/>
> <mapAttribute key="Output Model Options">
> <mapEntry key="OUT" value="allowIntermodelReferences derivedFile"/>
> </mapAttribute>
> <mapAttribute key="Output Models">
> <mapEntry key="OUT" value="platform:/resource/TestPorts2Pins/PinsOutput.xmi"/>
> </mapAttribute>
> <listAttribute key="Superimpose"/>
> </launchConfiguration>
>
> However, when I run the transformation, it generate the output file
> PinsOutput.xmi, but it only contains the XML header:
> <?xml version="1.0" encoding="ASCII"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="h ttp://www.omg.org/XMI"/>
> I take the same output for all transformations runned by EMFTVM :(
> I have the last distribution of ATL (3.4.0).
>
> Any suggestions? Thank you in advance!
> Antonio

The metamodels of that transformation use the eclipse workspace path as their
nsURI (see
http://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/tests/org.eclipse.m2m.atl.emftvm.tests/test-data/PortsToPins).
Hence, if you move the metamodels to /TestPorts2Pins/, they no longer work.
This is because the .xmi models have a reference to the nsURI of the
metamodels. This is default EMF behaviour.

If you want to move the metamodels, you need to update the metamodel EPackage
nsURIs, as well as the nsURI references in the .xmi files.

Alternatively, put everything in the same project/folder as it originally was
(/org.eclipse.m2m.atl.emftvm.tests/test-data/PortsToPins/).

A third option is to register the nsURI of the metamodels in the global EMF
registry using the ATL tooling:

1. Switch to the ATL perspective.
2. Right-click Pins.ecore and select "Register Metamodel"
3. Right-click Ports.ecore and select "Register Metamodel"
4. Refer to PORTS and PINS using the registered nsURI (EMF registry...) in the
ATL EMFTVM launch dialog.

Regards,
Dennis


Cheers,
Dennis
Re: EMFTVM doesn't generate output [message #1005621 is a reply to message #1005572] Sun, 27 January 2013 15:10 Go to previous messageGo to next message
Antonio Moreno is currently offline Antonio MorenoFriend
Messages: 16
Registered: November 2012
Junior Member
Helpful information Dennis! It's very kind of you to share this information Smile They are running perfectly.

It would be very useful to have a new ATL metamodel with multiple inheritance, because now we can't develop a HOT with output *.atl code runneable by EMFTVM (and with multiple inheritance), can we?


Thank you,
Antonio
Re: EMFTVM doesn't generate output [message #1005803 is a reply to message #1005621] Mon, 28 January 2013 19:25 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 27-01-13 16:10, Antonio M. Moreno schreef:
> Helpful information Dennis! It's very kind of you to share this information :)
> They are running perfectly.
> It would be very useful to have a new ATL metamodel with multiple inheritance,
> because now we can't develop a HOT with output *.atl code runneable by EMFTVM
> (and with multiple inheritance), can we?
>
>
> Thank you,
> Antonio

You can, because the ATL metamodel also contains the comments before and after
each statement. This is how the ATL-to-EMFTVM compiler picks up the '--
@extends ...' annotations:

http://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/plugins/org.eclipse.m2m.atl.emftvm.compiler/transformations/ATLtoEMFTVM.atl
- line 631

You can just generate the value for the ATL!MatchedRule.commentsBefore property.

Regards,
Dennis


Cheers,
Dennis
Previous Topic:Stackunderflow due to missing do clause in called rule
Next Topic:using resolveTemp y the source patterns
Goto Forum:
  


Current Time: Thu Apr 18 12:55:14 GMT 2024

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

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

Back to the top