Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » EMFTVM - Sequences
EMFTVM - Sequences [message #1064324] Tue, 18 June 2013 13:27 Go to next message
Michal Kleczek is currently offline Michal Kleczek
Messages: 23
Registered: May 2013
Junior Member
Hi,
I am not sure if this is a bug in EMFTVM or I am doing something wrong. Consider the following transformation:
-- @atlcompiler emftvm
-- @nsURI E=[ECore uri]

module addCapabilities;
create OUT : E refining IN : E;

rule package {
from
  p : E!EPackage
to
  out : E!EPackage
  (
    eClassifiers <- p.eClassifiers->including(c)
  ),
  c : E!EClass
  (
    name <- 'c1'
  )
}

rule class {
  from
    c : E!EClass
  to
    out : E!EClass
    (
    )
}


After running this transformation on a simple model with an EPackage containing one EClass the result has an EPackage containing a new EClass but original EClass is not included in the EPackage!

Is there something wrong with the transformation?

Thanks,
Michal
Re: EMFTVM - Sequences [message #1064439 is a reply to message #1064324] Wed, 19 June 2013 05:23 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis Wagelaar
Messages: 155
Registered: September 2012
Senior Member

This is indeed a bug, triggered by EMFTVM's lazy evaluation. You may file this bug in bugzilla.

You can work around this bug by explicitly adding ".resolve().debug('resolve')" to the collection expression (this will force a cached copy to be queued for setting):

    eClassifiers <- p.eClassifiers->including(c).resolve().debug('resolve')


Dennis


Cheers,
Dennis
Re: EMFTVM - Sequences [message #1064644 is a reply to message #1064439] Thu, 20 June 2013 07:37 Go to previous message
Dennis Wagelaar is currently offline Dennis Wagelaar
Messages: 155
Registered: September 2012
Senior Member

Tracked in https://bugs.eclipse.org/bugs/show_bug.cgi?id=411230

Cheers,
Dennis
Previous Topic:[ATL] Wrong XML output with EMF metamodel conform XSD
Next Topic:[ATL] Define types in ATL
Goto Forum:
  


Current Time: Fri Aug 29 08:19:24 EDT 2014

Powered by FUDForum. Page generated in 0.02905 seconds