Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » EMFTVM - Sequences
EMFTVM - Sequences [message #1064324] Tue, 18 June 2013 17:27 Go to next message
Michal Kleczek is currently offline Michal KleczekFriend
Messages: 31
Registered: May 2013
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 09:23 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
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 11:37 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
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: Sat Apr 20 00:28:09 GMT 2024

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

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

Back to the top