Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] : Exception when using two variable in the "from" action
[ATL] : Exception when using two variable in the "from" action [message #58227] Fri, 17 August 2007 14:24 Go to next message
Eclipse UserFriend
Originally posted by: youssef.srour.etu.univ-nantes.fr

Hi,

When I use two variables in the "from" action I obtains an exception.

My metamodel is "UML1.3"

<<<<<<<<<<<<<<<<<

rule statemachine{
from
stateMachineIn : UML!StateMachine,
contextClass : UML!Classifier--(stateMachine."context"=contextClass)
-- When I add "contextClass" as variable I would have the
exception

to
stateMachine : UML!StateMachine(
namespace<-stateMachineIn.namespace
)
do{

}
}
<<<<<<<<<<<<<<<<<<

The exception code :

<<<<<<<<<<<<<<<<<<

****** BEGIN Stack Trace
exception:
java.util.EmptyStackException
at java.util.Stack.peek(Unknown Source)
at java.util.Stack.pop(Unknown Source)
at org.atl.engine.vm.ASMStackFrame.pop(ASMStackFrame.java:90)
at org.atl.engine.vm.ASMStackFrame.popVariable(ASMStackFrame.ja va:118)
at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:23 2)
at org.atl.engine.vm.ASMOperation.exec(ASMOperation.java:155)
at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 60)
at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 50)
at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:21 4)
at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:30 9)
at org.atl.engine.vm.ASMOperation.exec(ASMOperation.java:155)
at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 60)
at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 50)
at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:21 4)
at org.atl.engine.vm.ASMOperation.exec(ASMOperation.java:155)
at org.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:276)
at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:1 36)
at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:9 4)
at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:6 8)
at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:6 4)
at
org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:230)
at
org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:168)
at
org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:145)
at
org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:121)
at
org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .launch(AtlLaunchConfigurationDelegate.java:97)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:639)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:565)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:754)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlu gin.java:944)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
A.main() : ??#24 null
local variables = {self=StatePatern : ASMModule}
local stack = []
A.__exec__() : ??#8 null
local variables = {e=TransientLink {rule = 'statemachine', sourceElements
= {stateMachineIn = IN!<notnamedyet>}, targetElements = {stateMachine =
OUT!<notnamedyet>}, variables = {}}, self=StatePatern : ASMModule}
local stack = []
A.__applystatemachine(1 : NTransientLink;) : ??#7 null
local variables = {stateMachineIn=IN!<notnamedyet>, link=TransientLink
{rule = 'statemachine', sourceElements = {stateMachineIn =
IN!<notnamedyet>}, targetElements = {stateMachine = OUT!<notnamedyet>},
variables = {}}, self=StatePatern : ASMModule}
local stack = []
****** END Stack Trace
Execution terminated due to error (see launch configuration to allow
continuation after errors).

<<<<<<<<<<<<<<<<<<
Re: [ATL] : Exception when using two variable in the "from" action [message #58303 is a reply to message #58227] Fri, 17 August 2007 15:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------060607010904040904090001
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

Hi,

This is so because the pattern you use to match contextClass is using a
reference to itself. In your case, I guess you are trying to make
reference between matched objects for a multi class pattern. This can be
done by using the binding alias in the definition of the pattern.

Regards,

Quentin GLINEUR

Youssef SROUR a
Re: [ATL] : Exception when using two variable in the "from" action [message #58402 is a reply to message #58227] Fri, 17 August 2007 20:46 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

Can you please tell us, which version of ATL (2004 or 2006) you are using?

Note that ATL 2004 does not support multiple source pattern elements.
This may be the cause of the error you get.



Regards,

Frédéric Jouault


Youssef SROUR wrote:
> Hi,
>
> When I use two variables in the "from" action I obtains an exception.
>
> My metamodel is "UML1.3"
>
> <<<<<<<<<<<<<<<<<
>
> rule statemachine{
> from
> stateMachineIn : UML!StateMachine,
> contextClass : UML!Classifier--(stateMachine."context"=contextClass)
> -- When I add "contextClass" as variable I would have the
> exception
>
> to
> stateMachine : UML!StateMachine(
> namespace<-stateMachineIn.namespace
> )
> do{
>
> }
> }
> <<<<<<<<<<<<<<<<<<
>
> The exception code :
>
> <<<<<<<<<<<<<<<<<<
>
> ****** BEGIN Stack Trace
> exception: java.util.EmptyStackException
> at java.util.Stack.peek(Unknown Source)
> at java.util.Stack.pop(Unknown Source)
> at org.atl.engine.vm.ASMStackFrame.pop(ASMStackFrame.java:90)
> at org.atl.engine.vm.ASMStackFrame.popVariable(ASMStackFrame.ja va:118)
> at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:23 2)
> at org.atl.engine.vm.ASMOperation.exec(ASMOperation.java:155)
> at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 60)
> at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 50)
> at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:21 4)
> at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:30 9)
> at org.atl.engine.vm.ASMOperation.exec(ASMOperation.java:155)
> at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 60)
> at org.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java: 50)
> at org.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:21 4)
> at org.atl.engine.vm.ASMOperation.exec(ASMOperation.java:155)
> at org.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:276)
> at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:1 36)
> at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:9 4)
> at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:6 8)
> at org.atl.eclipse.engine.AtlLauncher.launch(AtlLauncher.java:6 4)
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:230)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:168)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:145)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:121)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .launch(AtlLaunchConfigurationDelegate.java:97)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:639)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:565)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:754)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlu gin.java:944)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
> A.main() : ??#24 null
> local variables = {self=StatePatern : ASMModule}
> local stack = []
> A.__exec__() : ??#8 null
> local variables = {e=TransientLink {rule = 'statemachine',
> sourceElements = {stateMachineIn = IN!<notnamedyet>}, targetElements =
> {stateMachine = OUT!<notnamedyet>}, variables = {}}, self=StatePatern :
> ASMModule}
> local stack = []
> A.__applystatemachine(1 : NTransientLink;) : ??#7 null
> local variables = {stateMachineIn=IN!<notnamedyet>,
> link=TransientLink {rule = 'statemachine', sourceElements =
> {stateMachineIn = IN!<notnamedyet>}, targetElements = {stateMachine =
> OUT!<notnamedyet>}, variables = {}}, self=StatePatern : ASMModule}
> local stack = []
> ****** END Stack Trace
> Execution terminated due to error (see launch configuration to allow
> continuation after errors).
>
> <<<<<<<<<<<<<<<<<<
>
Re: [ATL] : Exception when using two variable in the "from" action [message #58694 is a reply to message #58402] Mon, 20 August 2007 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: youssef.srour.etu.univ-nantes.fr

Hello

I use the version of "Septembre 16, 2005"

thank you
Re: [ATL] : Exception when using two variable in the "from" action [message #59151 is a reply to message #58694] Thu, 23 August 2007 18:33 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

> I use the version of "Septembre 16, 2005"

I am a bit confused.

Do you mean you try to use ATL 2006 with a build dating from September 2005?

Even if you put
-- @atlcompiler atl2006
at the beginning of your transformation, ATL 2006 will not be used,
because it did not exist at that time.

You should probably install a new version (e.g., 2.0RC2, available from:
http://www.eclipse.org/m2m/atl/download/).


Regards,

Frédéric Jouault
Previous Topic:[ATL]Problem generating Model
Next Topic:ATL Newbie
Goto Forum:
  


Current Time: Mon Jan 18 08:35:41 GMT 2021

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

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

Back to the top