Can't use lazy rules with EMFTVM in Refining mode [message #1736608] |
Thu, 30 June 2016 10:39  |
Eclipse User |
|
|
|
Hi everyone,
I'm using the EMFTVM (based on this example Running ATL (EMFTVM) Transformations Programatically) to run some transformations in refining mode.
This has worked fine so far, but I now have run into problems when using lazy rules. I would always get this exception, when running a transformation which contains a lazy rule (does not matter if the rule is actually called, or not):
java.lang.IllegalArgumentException: Model IN not found for t: Families!Member (models: [IN])
at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.resolveRuleElementModels(ExecEnvImpl.java:1613)
at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.resolveRuleModels(ExecEnvImpl.java:1593)
at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.run(ExecEnvImpl.java:2083)
at com.example.transformation.ATLLauncher.run(ATLLauncher.java:153)
I used this minimal example based of the Families2Persons example, which illustrates the problem:
-- @atlcompiler emftvm
-- @nsURI EMFTVM=http://www.eclipse.org/m2m/atl/2011/EMFTVM
-- @path Families=/Families2Persons/Families.ecore
module Families2Persons;
create OUT: Families refining IN: Families;
lazy rule LazyRule {
from
s: Families!Member
to
t: Families!Member (
firstName <- s.firstName + 'test'
)
}
-- End of Transformation
If I remove the lazy keyword from the rule it works without any issues. The transformation also works as expected, when started from my eclipse. However, if I run it from the standalone application it crashes.
So this leads me to believe that this might be a bug in the EMFTVM, but I cannot find out why it works when called from inside eclipse, but not when called from the standalone application.
Any ideas how to solve this?
I'm aware that this problem does not appear when using the normal mode, but I would like to keep using refining mode, if possible, since I have a rather large metamodel and models. Furthermore I would most of the time only transform a small part of the models.
Any help is much appreciated,
Sven
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26676 seconds