[ATL] : Exception when using two variable in the "from" action [message #58227] |
Fri, 17 August 2007 14:24 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Frédéric Jouault![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=frederic.jouault%40univ-nantes.fr) 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).
>
> <<<<<<<<<<<<<<<<<<
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04191 seconds