[ATL] internal error occurred [message #479858] |
Wed, 12 August 2009 18:12  |
Eclipse User |
|
|
|
Hi everyone!
Here is the problem. I have the following rule that results in an
exception when I run the transformation.
rule Model2Model{
from model: psc!Model
to agent: Agent!Model()
do {
agent.message <- thisModule.NewMessage();
}
}
Eclipse stops with the following message:
An internal error occurred during: "Launching psc2agnt".
java.lang.ArrayIndexOutOfBoundsException: -1
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:437)
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:387)
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:387)
at org.eclipse.m2m.atl.engine.emfvm.ASM.run(ASM.java:197)
at
org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.launch (EMFVMLauncher.java:162)
at
org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.launch (EMFVMLauncher.java:135)
at
org.eclipse.m2m.atl.core.service.LauncherService.launch(Laun cherService.java:135)
at
org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDel egate.launch(AtlLaunchConfigurationDelegate.java:222)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:703)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:866)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
This problem occured the first time when I added 'agent.message <-
thisModule.NewMessage();' to the imperative code block. When I comment
that line out everything works fine.
I'm using Eclipse 3.5.0 with the latest ATL version. Is that a known bug
or am I doing something wrong?
Thanks for your time!
|
|
|
Re: [ATL] internal error occurred [message #480016 is a reply to message #479858] |
Thu, 13 August 2009 13:24   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------000801010109010207090301
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
Why don't you use the declarative part of your matched rule to do this?
E.g.:
rule Model2Model{
from model: psc!Model
to agent: Agent!Model(
message <- this.NewMessage()
)
}
Even it doesn't solve your problem, using declarative syntax is more in
ATL philosophy ;-)
It seems you're using EMFVM, could you try to execute your
transformation with the regular one? Maybe, the problem comes from the
EMF VM.
Otherwise could you detail NewMessage()?
Regards,
Freddy.
Adalbert Gorecki a
|
|
|
Re: [ATL] internal error occurred [message #480148 is a reply to message #480016] |
Fri, 14 August 2009 07:21   |
Eclipse User |
|
|
|
Hi Freddy,
Thanks for your answer!
I tried it with declarative syntax in the first place, but when I try
this...
rule Model2Model{
from model: psc!Model
to agent: Agent!Model(
message <-thisModule.NewMessage()
)
}
... I get this error message in the console:
Operation not found:
OUT!<unnamed> :Agent!Model.__resolve__(org.eclipse.m2m.atl.engine.emfvm.li b.ASMModule)
at __applyModel2Model(psc2agnt.atl[7:3-7:36])
local variables: self=thisModule,
link=org.eclipse.m2m.atl.engine.emfvm.lib.TransientLink@ab702f,
model=IN!<unnamed>:psc!Model, agent=OUT!<unnamed>:Agent!Model
at __exec__(psc2agnt.atl)
local variables: self=thisModule,
e=org.eclipse.m2m.atl.engine.emfvm.lib.TransientLink@ab702f
at main(psc2agnt.atl)
local variables: self=thisModule
I'm not really sure what this message means. :/
By the way, the called rule is very simple and looks like this:
rule NewMessage(){
to m: Agent!Message()
}
Regards,
Adalbert
|
|
|
Re: [ATL] internal error occurred [message #480181 is a reply to message #480148] |
Fri, 14 August 2009 09:37   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------020603060801040604030706
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Adalbert,
I advised you to rewrite your rules like this:
rule Model2Model{
from
model: psc!Model
to
agent: Agent!Model(
message <- Sequence {m}
),
m: Agent!Message()
}
Normally it should work :)
Regards,
Freddy.
Adalbert Gorecki a
|
|
|
Re: [ATL] internal error occurred [message #480186 is a reply to message #480181] |
Fri, 14 August 2009 09:52   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------080801050404070006070102
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
In fact as I don't know your metamodel and the cardinality of 'message'
reference, so maybe the good answer is the following:
rule Model2Model{
from
model: psc!Model
to
agent: Agent!Model(
message <- m
),
m: Agent!Message()
}
Regards,
Freddy.
Freddy Allilaire a
|
|
|
Re: [ATL] internal error occurred [message #480337 is a reply to message #480186] |
Sat, 15 August 2009 11:18  |
Eclipse User |
|
|
|
Ok, now I got it. This finally works:
rule Model2Model{
from model: psc!Model
to agntModel: Agent!Model(
message <- m,
agent <- agnt
),
m: Agent!Message(),
agnt: Agent!Agent()
}
I just forgot some commas!
Did I already mention that I am new to ATL? ;P
Thanks for your help, Freddy!
|
|
|
Powered by
FUDForum. Page generated in 0.04011 seconds