Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL Transformation Error(Exception)
ATL Transformation Error [message #999283] Fri, 11 January 2013 18:15 Go to next message
Eclipse UserFriend
Dears,
I am new to ATL.

I was making a simple transformation (flowchart node to java statement).
I use this rule:

rule Node2Statement
{
from
node : Flowchart!Node
to
stmt : Java!JavaStatement(
text <- node.title
)

}

I got this exception :
org.eclipse.m2m.atl.engine.emfvm.VMException: -1
at __matchNode2Statement#0(FlowChartMM2JavaMM.atl)
local variables: self=FlowChartMM2JavaMM : ASMModule
at __matcher__#1(FlowChartMM2JavaMM.atl)
local variables: self=FlowChartMM2JavaMM : ASMModule
at main#22(FlowChartMM2JavaMM.atl)
local variables: self=FlowChartMM2JavaMM : ASMModule

...
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:564)
... 13 more


I can't understand what's wrong. Could you please help me?
Re: ATL Transformation Error [message #1000176 is a reply to message #999283] Mon, 14 January 2013 07:37 Go to previous messageGo to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
can you attach a self contained ATL project ?
Re: ATL Transformation Error [message #1000472 is a reply to message #999283] Mon, 14 January 2013 21:04 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 11-01-13 20:13, Basma Mising name schreef:
> Dears,
> I am new to ATL.
>
> I was making a simple transformation (flowchart node to java statement).
> I use this rule:
>
> rule Node2Statement
> {
> from node : Flowchart!Node
> to stmt : Java!JavaStatement(
> text <- node.title
> )
>
> }
>
> I got this exception :
> org.eclipse.m2m.atl.engine.emfvm.VMException: -1
> at __matchNode2Statement#0(FlowChartMM2JavaMM.atl)
> local variables: self=FlowChartMM2JavaMM : ASMModule
> at __matcher__#1(FlowChartMM2JavaMM.atl)
> local variables: self=FlowChartMM2JavaMM : ASMModule
> at main#22(FlowChartMM2JavaMM.atl)
> local variables: self=FlowChartMM2JavaMM : ASMModule
>
> ..
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:564)
> ... 13 more
>
> I can't understand what's wrong. Could you please help me?

That's a stack underflow error in the VM, which means it's likely a compiler
bug. Can you provide the full transformation file and the version of ATL
you're using?

Regards,
Dennis


Cheers,
Dennis
Re: ATL Transformation Error [message #1000962 is a reply to message #1000472] Tue, 15 January 2013 19:36 Go to previous messageGo to next message
Eclipse UserFriend
I use ATL 3.2.1

The ATL file is as follows :

module FlowChartMM2JavaMM; 
create OUT : JavaMM from IN : FlowChartMM;


rule Node2Statement
{
	from 
		node : Flowchart!Node
	to 
		stmt : Java!JavaStatement(
			text<-node.title
			
		)
		
}



The Flowchart Metamodel is as follows:
www.imageshack.us/photo/my-images/22/flowchartmm.jpg/

The Java Metamodel is as follows:
www.imageshack.us/photo/my-images/545/javamm.jpg/

I got an error in the rule declaration line saying that "Flowchart is not a source model".
Re: ATL Transformation Error [message #1000986 is a reply to message #1000962] Tue, 15 January 2013 20:27 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 15/01/13 20:36, Basma Moukhtar schreef:
> I use ATL 3.2.1
>
> The ATL file is as follows :
>
>
> module FlowChartMM2JavaMM; create OUT : JavaMM from IN : FlowChartMM;
>
>
> rule Node2Statement
> {
> from node : Flowchart!Node

this should be FlowchartMM!Node, as you labeled your metamodel that way in the
"create" clause.

> to stmt : Java!JavaStatement(

same here: JavaMM!JavaStatement

Regards,
Dennis

> text<-node.title
>
> )
>
> }
>
>
>
> The Flowchart Metamodel is as follows:
> www.imageshack.us/photo/my-images/22/flowchartmm.jpg/
>
> The Java Metamodel is as follows:
> www.imageshack.us/photo/my-images/545/javamm.jpg/
>
> I got an error in the rule declaration line saying that "Flowchart is not a
> source model".


Cheers,
Dennis
Re: ATL Transformation Error [message #1001002 is a reply to message #1000962] Tue, 15 January 2013 20:58 Go to previous messageGo to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
"Flowchart is not a source model" because you have named your source model "FlowChartMM".
Re: ATL Transformation Error [message #1001033 is a reply to message #1001002] Tue, 15 January 2013 22:16 Go to previous message
Eclipse UserFriend
It worked Smile
Thanks a lot.
Previous Topic:Running the Class2Relational examples from the zoo
Next Topic:calling java in a query
Goto Forum:
  


Current Time: Fri Apr 19 13:45:14 GMT 2024

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

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

Back to the top