Issues with Xtext and Epsilon [message #1842280] |
Tue, 15 June 2021 11:36  |
Tomas Wall Messages: 53 Registered: April 2021 |
Member |
|
|
Hi all,
I have an Xtext grammar and a metamodel in ecore for which I am writing transformations in Epsilon. However, I am having issues with one of the transformations. I spoke to the people from Epsilon, and according to them, with respect to emf everything is fine, but the issue might be with Xtext.
This is the link to the thread I created on Epsilon, where I have also uploaded the files, which you can use to reproduce the issue, and the answer from them. https://www.eclipse.org/forums/index.php/t/1108216/
Can anyone please help with this?
Many thanks,
Tomas
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Issues with Xtext and Epsilon [message #1842354 is a reply to message #1842346] |
Thu, 17 June 2021 03:57   |
|
hi, unfortunately i cannot reproduce your NPE,
i am getting
org.xtext.example.textual.textual.impl.PathImpl
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@33:0-33:26)
at (unknown@0:0-0:0)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@9:12-9:30)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@9:0-9:32)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@9:0-9:32)
at (unknown@0:0-0:0)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@4:0-104:1)
05:52:03.856 [Worker-0: Updating Maven Dependencies] DEBUG org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager - Refreshed: [L/x/pom.xml, L/DimitrisTransformations/pom.xml]
org.xtext.example.textual.textual.impl.PathImpl
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@33:0-33:26)
at (unknown@0:0-0:0)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@9:12-9:30)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@9:0-9:32)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@9:0-9:32)
at (unknown@0:0-0:0)
at (/home/dietrich/eclipse-workspaces/lsp2222222222/DimitrisTransformations/transform.etl@4:0-104:1)
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:118)
at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicEList.java:507)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAllUnique(NotifyingListImpl.java:500)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:440)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:400)
at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:368)
at org.eclipse.epsilon.emc.emf.EmfPropertySetter.copyCollectionValues(EmfPropertySetter.java:75)
at org.eclipse.epsilon.emc.emf.EmfPropertySetter.invoke(EmfPropertySetter.java:61)
at org.eclipse.epsilon.eol.dom.AssignmentStatement.execute(AssignmentStatement.java:77)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:204)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.dom.StatementBlock.execute(StatementBlock.java:66)
at org.eclipse.epsilon.eol.dom.StatementBlock.execute(StatementBlock.java:1)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:204)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.executeBlockOrExpressionAst(ExecutableBlock.java:103)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.executeBody(ExecutableBlock.java:164)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:121)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:168)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:92)
at org.eclipse.epsilon.etl.dom.TransformationRule.executeSuperRulesAndBody(TransformationRule.java:232)
at org.eclipse.epsilon.etl.dom.TransformationRule.transform(TransformationRule.java:188)
at org.eclipse.epsilon.etl.strategy.FastTransformationStrategy.executeTransformations(FastTransformationStrategy.java:115)
at org.eclipse.epsilon.etl.strategy.FastTransformationStrategy.getEquivalents(FastTransformationStrategy.java:41)
at org.eclipse.epsilon.etl.strategy.ITransformationStrategy.getEquivalent(ITransformationStrategy.java:38)
at org.eclipse.epsilon.etl.execute.operations.EquivalentOperation.executeImpl(EquivalentOperation.java:26)
at org.eclipse.epsilon.etl.execute.operations.AbstractEquivalentOperation.execute(AbstractEquivalentOperation.java:48)
at org.eclipse.epsilon.etl.execute.operations.EquivalentOperation.execute(EquivalentOperation.java:1)
at org.eclipse.epsilon.eol.dom.OperationCallExpression.execute(OperationCallExpression.java:187)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:204)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.dom.OperationCallExpression.execute(OperationCallExpression.java:149)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:204)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.dom.ExpressionStatement.execute(ExpressionStatement.java:32)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:204)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.dom.StatementBlock.execute(StatementBlock.java:66)
at org.eclipse.epsilon.eol.dom.StatementBlock.execute(StatementBlock.java:1)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:204)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.executeBlockOrExpressionAst(ExecutableBlock.java:103)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.executeBody(ExecutableBlock.java:164)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:121)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:168)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:92)
at org.eclipse.epsilon.etl.dom.TransformationRule.executeSuperRulesAndBody(TransformationRule.java:232)
at org.eclipse.epsilon.etl.dom.TransformationRule.transform(TransformationRule.java:188)
at org.eclipse.epsilon.etl.strategy.FastTransformationStrategy.executeTransformations(FastTransformationStrategy.java:115)
at org.eclipse.epsilon.etl.strategy.FastTransformationStrategy.transformModels(FastTransformationStrategy.java:107)
at org.eclipse.epsilon.etl.EtlModule.processRules(EtlModule.java:139)
at org.eclipse.epsilon.erl.ErlModule.executeImpl(ErlModule.java:174)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeImpl(ExecutorFactory.java:207)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.execute(ExecutorFactory.java:233)
at org.eclipse.epsilon.eol.EolModule.execute(EolModule.java:434)
at org.eclipse.epsilon.eol.dt.launching.EpsilonLaunchConfigurationDelegate.launch(EpsilonLaunchConfigurationDelegate.java:111)
at org.eclipse.epsilon.eol.dt.launching.EpsilonLaunchConfigurationDelegate.launch(EpsilonLaunchConfigurationDelegate.java:69)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:803)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:716)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1021)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1224)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ArrayStoreException: org.xtext.example.textual.textual.impl.PathImpl
... 62 more
which hints a problem with your transformation
where is your NPE?
Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
Re: Issues with Xtext and Epsilon [message #1842820 is a reply to message #1842816] |
Fri, 02 July 2021 07:21   |
Tomas Wall Messages: 53 Registered: April 2021 |
Member |
|
|
Hi Ed,
Thanks for your feedback. Is there any way to get past this? Cause it is really weird to be in this situation wherein one scenario it works and in the other doesn't with the same transformations.
Furthermore, the concepts and relations in the metamodel are such that one path in the source metamodel should be transformed into three different type of paths in the target metamodel depending on the guard.
Moreover from a discussion with the guys from Epsilon I had the following feedback.
Quote:
If you replace "t.initialpath ::= s.paths;" with "t.initialpath.add(new Target!Path);" the problem still persists so it seems to be related to the type of the element you're trying to add (Path). This is perfectly fine EMF-wise but Xtext doesn't seem to like it for some reason.
And after letting them know of your last message they mentioned that:
Quote:
Epsilon relies on the underlying modelling framework (EMF/Xtext) for run-time type checking so it's unlikely that it is the source of the problem
Many thanks,
Tomas
[Updated on: Fri, 02 July 2021 08:00] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03112 seconds