Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Problem with a simple transformation using EMFTVM(I'm using the Compiler EMFTVM and I can't transform a Model)
Problem with a simple transformation using EMFTVM [message #1805914] Sat, 27 April 2019 22:04 Go to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
Hi :) ,
I always used the -- @atlcompiler atl2010 for M2M transformation, but now I'm working in a project in refining mode. So, I'm trying to use the "-- @atlcompiler emftvm" in a simple transformation, but the result is the same input model, is like I didn't write any rule.


-- @atlcompiler emftvm
-- @nsURI KDM=http://www.eclipse.org/MoDisco/kdm/code

module ExampleEMFTVM;
create OUT:KDM refining IN:KDM;

rule RefiningClass{
from
source: KDM!ClassUnit in IN
to
target: KDM!ClassUnit(
name <-'test'
)
}



Thanks a lot in advance for any help.

Re: Problem with a simple transformation using EMFTVM [message #1805927 is a reply to message #1805914] Sun, 28 April 2019 16:06 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

I can't see any mistake in your setup. What output do you get on the ATL console?

Cheers,
Dennis
Re: Problem with a simple transformation using EMFTVM [message #1805929 is a reply to message #1805927] Sun, 28 April 2019 17:29 Go to previous messageGo to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
Hi,
The message is:

Timing data:
Loading finished at 0,002927 seconds (duration: 0,002927 seconds)
Matching finished at 0,003235 seconds (duration: 0,000308 seconds)
Applying finished at 0,003237 seconds (duration: 0,000002 seconds)
Post-applying finished at 0,003238 seconds (duration: 0,000001 seconds)
Recursive stage finished at 0,003244 seconds (duration: 0,000006 seconds)
Execution finished at 0,003257 seconds (duration: 0,000019 seconds)
Re: Problem with a simple transformation using EMFTVM [message #1805965 is a reply to message #1805914] Mon, 29 April 2019 12:59 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

Ok, I looked at your launch config screenshot again: turns out you've entered the wrong metamodel URI. I've attached an example Eclipse project that I've used to test your scenario.
  • Attachment: KDMTest.zip
    (Size: 5.29KB, Downloaded 114 times)


Cheers,
Dennis
Re: Problem with a simple transformation using EMFTVM [message #1806061 is a reply to message #1805965] Wed, 01 May 2019 22:23 Go to previous messageGo to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
I can't believe it.
Now is working!
Thanks
Re: Problem with a simple transformation using EMFTVM [message #1806118 is a reply to message #1806061] Thu, 02 May 2019 23:23 Go to previous messageGo to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
Hi,
One more question. I'm working with KDM package called "Structure", but when I put: -- @nsURI KDM=http://www.eclipse.org/MoDisco/kdm/action, the Structure elements are not recognized, and when I put:
-- @nsURI KDM=http://www.eclipse.org/MoDisco/kdm/structure, the elements of Code/Action package are not recognized.

Now, I'm trying with: -- @path platform:/resource/ExampleEMFTVM/Input/kdm.ecore, but is not working...
How can I configure the KDM metamodel for working with all the packages?

Re: Problem with a simple transformation using EMFTVM [message #1806201 is a reply to message #1806118] Mon, 06 May 2019 08:13 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

This is because the KDM metamodel does not register the top-level http://www.eclipse.org/MoDisco/kdm URI with EMF. ATL has support for automatically pulling in nested EPackages contained in an Ecore file. You can check with the MoDisco team to see if it's possible for them to register the top-level EPackage with EMF as well, such that ATL can do syntax completion properly.

Cheers,
Dennis
Previous Topic:computing the time complexity of the atl transformation rules
Next Topic:How to reverse an ATL transformation
Goto Forum:
  


Current Time: Sat Nov 11 08:19:58 GMT 2023

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

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

Back to the top