Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration
[ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86250] Thu, 10 July 2008 01:42 Go to next message
Eclipse UserFriend
Originally posted by: apicard.tampabay.rr.com

Hi,

As we are working on getting our KDM transformation patterns up to
speed, we are encountering another issue.

We want to reference/declare our OUT KDM metamodel through the EMF
registry in order to pickup the full EMF model, so that we can have
access to its eOperations directly from ATL.

This worked fine with our source model since it has a single default
package, but as you might be aware, the KDM is composed of 12 separate
packages in the same metamodel.

How can we map our single OUT : kdm in the ATL with all those packages,
as it is how it shows up in the EMF registry.

Thanks
Alain
Re: [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86280 is a reply to message #86250] Thu, 10 July 2008 13:24 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hi,

When you load an EPackage (i.e. specify an URI in the launch
configuration), all the referenced packages are loaded. So I think you
won't have problems if you indicates the package which contents the
metaelements (or one of them) you have in your input model.

Best regards,

William

Alain Picard a écrit :
> Hi,
>
> As we are working on getting our KDM transformation patterns up to
> speed, we are encountering another issue.
>
> We want to reference/declare our OUT KDM metamodel through the EMF
> registry in order to pickup the full EMF model, so that we can have
> access to its eOperations directly from ATL.
>
> This worked fine with our source model since it has a single default
> package, but as you might be aware, the KDM is composed of 12 separate
> packages in the same metamodel.
>
> How can we map our single OUT : kdm in the ATL with all those packages,
> as it is how it shows up in the EMF registry.
>
> Thanks
> Alain
Re: [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86310 is a reply to message #86280] Thu, 10 July 2008 14:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: apicard.tampabay.rr.com

William,

When I specify a uri in this case it bombs out with a severe exception.

Really not sure what to make of it.

Cheers,
Alain

Exception:
SEVERE: ****** BEGIN Stack Trace
SEVERE: exception:
SEVERE: null
java.lang.ArrayStoreException
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:645)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:331)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:315)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 26)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:283)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:764)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:614)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:880)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1083)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
SEVERE: A.main() : ??#26 null
SEVERE: local variables = {self=STM2KDM : ASMModule}
SEVERE: local stack = []
SEVERE: A.__exec__() : ??#8 null
SEVERE: local variables = {e=TransientLink {rule = 'CreateSegment',
sourceElements = {stmRoot = IN!<unnamed>}, targetElements = {kdmSegment
= OUT!<notnamedyet>}, variables = {}}, self=STM2KDM : ASMModule}
SEVERE: local stack = []
SEVERE: A.__applyCreateSegment(1 : NTransientLink;) : ??#14 13:4-13:36
SEVERE: local variables = {kdmSegment=OUT!<notnamedyet>,
stmRoot=IN!<unnamed>, link=TransientLink {rule = 'CreateSegment',
sourceElements = {stmRoot = IN!<unnamed>}, targetElements = {kdmSegment
= OUT!<notnamedyet>}, variables = {}}, self=STM2KDM : ASMModule}
SEVERE: local stack = [OUT!<notnamedyet>]
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to
allow continuation after errors).
SEVERE: null



William Piers wrote:
> Hi,
>
> When you load an EPackage (i.e. specify an URI in the launch
> configuration), all the referenced packages are loaded. So I think you
> won't have problems if you indicates the package which contents the
> metaelements (or one of them) you have in your input model.
>
> Best regards,
>
> William
>
> Alain Picard a écrit :
>> Hi,
>>
>> As we are working on getting our KDM transformation patterns up to
>> speed, we are encountering another issue.
>>
>> We want to reference/declare our OUT KDM metamodel through the EMF
>> registry in order to pickup the full EMF model, so that we can have
>> access to its eOperations directly from ATL.
>>
>> This worked fine with our source model since it has a single default
>> package, but as you might be aware, the KDM is composed of 12 separate
>> packages in the same metamodel.
>>
>> How can we map our single OUT : kdm in the ATL with all those
>> packages, as it is how it shows up in the EMF registry.
>>
>> Thanks
>> Alain
Re: [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86377 is a reply to message #86310] Fri, 11 July 2008 10:21 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
I am not sure, but the error you get seems to happen during the
execution, and should not be associated with the uri issue.

The problem may comes from your transformation file, if you can post
your example here it would be helpful.

Regards,

William

Alain Picard a écrit :
> William,
>
> When I specify a uri in this case it bombs out with a severe exception.
>
> Really not sure what to make of it.
>
> Cheers,
> Alain
>
> Exception:
> SEVERE: ****** BEGIN Stack Trace
> SEVERE: exception:
> SEVERE: null
> java.lang.ArrayStoreException
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:645)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:331)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:315)
>
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 26)
> at
> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:283)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:764)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:614)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:880)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1083)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> SEVERE: A.main() : ??#26 null
> SEVERE: local variables = {self=STM2KDM : ASMModule}
> SEVERE: local stack = []
> SEVERE: A.__exec__() : ??#8 null
> SEVERE: local variables = {e=TransientLink {rule = 'CreateSegment',
> sourceElements = {stmRoot = IN!<unnamed>}, targetElements = {kdmSegment
> = OUT!<notnamedyet>}, variables = {}}, self=STM2KDM : ASMModule}
> SEVERE: local stack = []
> SEVERE: A.__applyCreateSegment(1 : NTransientLink;) : ??#14 13:4-13:36
> SEVERE: local variables = {kdmSegment=OUT!<notnamedyet>,
> stmRoot=IN!<unnamed>, link=TransientLink {rule = 'CreateSegment',
> sourceElements = {stmRoot = IN!<unnamed>}, targetElements = {kdmSegment
> = OUT!<notnamedyet>}, variables = {}}, self=STM2KDM : ASMModule}
> SEVERE: local stack = [OUT!<notnamedyet>]
> SEVERE: ****** END Stack Trace
> INFO: Execution terminated due to error (see launch configuration to
> allow continuation after errors).
> SEVERE: null
>
>
>
> William Piers wrote:
>> Hi,
>>
>> When you load an EPackage (i.e. specify an URI in the launch
>> configuration), all the referenced packages are loaded. So I think you
>> won't have problems if you indicates the package which contents the
>> metaelements (or one of them) you have in your input model.
>>
>> Best regards,
>>
>> William
>>
>> Alain Picard a écrit :
>>> Hi,
>>>
>>> As we are working on getting our KDM transformation patterns up to
>>> speed, we are encountering another issue.
>>>
>>> We want to reference/declare our OUT KDM metamodel through the EMF
>>> registry in order to pickup the full EMF model, so that we can have
>>> access to its eOperations directly from ATL.
>>>
>>> This worked fine with our source model since it has a single default
>>> package, but as you might be aware, the KDM is composed of 12
>>> separate packages in the same metamodel.
>>>
>>> How can we map our single OUT : kdm in the ATL with all those
>>> packages, as it is how it shows up in the EMF registry.
>>>
>>> Thanks
>>> Alain
Re: [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86441 is a reply to message #86377] Sat, 12 July 2008 00:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: apicard.tampabay.rr.com

William,

You were right, the issue was somewhere else. After running a full debug
and watching what was happening and tying that together with an earlier
comment from Hugo, I got it figured out. The strange thing is that the
behavior is different between using a .ecore file and the EMF registry.

The situation was the following:

rule CreateSegment {
from stmRoot : STM!StTreeRoot
to
kdmSegment : kdm!Segment (
-- model <- kdmModel
model <- stmRoot.rootInterpreter
),
.....

and then:
rule CreateModel {
from stmInterpretation : STM!StInterpretationContext
to
kdmLanguageUnit : kdm!LanguageUnit(
name <- 'Common Java datatypes'
),
kdmModel : kdm!CodeModel (
name <- 'My project',
.....

where the rootInterpreter of the first rule is of type
InterpretationContext and triggered the 2nd rule.

The issue was due to the fact that the kdmLanguageUnit is not type
compatible with the model element where it was trying to assign in,
since as Hugo said, by default it uses the first target. So I
essentially made sure that the 2nd rule was more like this:

rule CreateModel {
from stmInterpretation : STM!StInterpretationContext
to
kdmModel : kdm!CodeModel (
name <- 'My project',
.....

and that cleared the issue.

Thanks for your decisive "look somewhere else" statement here.

Alain


William Piers wrote:
> I am not sure, but the error you get seems to happen during the
> execution, and should not be associated with the uri issue.
>
> The problem may comes from your transformation file, if you can post
> your example here it would be helpful.
>
> Regards,
>
> William
>
> Alain Picard a écrit :
>> William,
>>
>> When I specify a uri in this case it bombs out with a severe exception.
>>
>> Really not sure what to make of it.
>>
>> Cheers,
>> Alain
>>
>> Exception:
>> SEVERE: ****** BEGIN Stack Trace
>> SEVERE: exception:
>> SEVERE: null
>> java.lang.ArrayStoreException
>> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>> at
>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:645)
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:331)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:315)
>>
>> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 26)
>> at
>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:283)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
>> at
>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:764)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:614)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:880)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1083)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> SEVERE: A.main() : ??#26 null
>> SEVERE: local variables = {self=STM2KDM : ASMModule}
>> SEVERE: local stack = []
>> SEVERE: A.__exec__() : ??#8 null
>> SEVERE: local variables = {e=TransientLink {rule =
>> 'CreateSegment', sourceElements = {stmRoot = IN!<unnamed>},
>> targetElements = {kdmSegment = OUT!<notnamedyet>}, variables = {}},
>> self=STM2KDM : ASMModule}
>> SEVERE: local stack = []
>> SEVERE: A.__applyCreateSegment(1 : NTransientLink;) : ??#14 13:4-13:36
>> SEVERE: local variables = {kdmSegment=OUT!<notnamedyet>,
>> stmRoot=IN!<unnamed>, link=TransientLink {rule = 'CreateSegment',
>> sourceElements = {stmRoot = IN!<unnamed>}, targetElements =
>> {kdmSegment = OUT!<notnamedyet>}, variables = {}}, self=STM2KDM :
>> ASMModule}
>> SEVERE: local stack = [OUT!<notnamedyet>]
>> SEVERE: ****** END Stack Trace
>> INFO: Execution terminated due to error (see launch configuration to
>> allow continuation after errors).
>> SEVERE: null
>>
>>
>>
>> William Piers wrote:
>>> Hi,
>>>
>>> When you load an EPackage (i.e. specify an URI in the launch
>>> configuration), all the referenced packages are loaded. So I think
>>> you won't have problems if you indicates the package which contents
>>> the metaelements (or one of them) you have in your input model.
>>>
>>> Best regards,
>>>
>>> William
>>>
>>> Alain Picard a écrit :
>>>> Hi,
>>>>
>>>> As we are working on getting our KDM transformation patterns up to
>>>> speed, we are encountering another issue.
>>>>
>>>> We want to reference/declare our OUT KDM metamodel through the EMF
>>>> registry in order to pickup the full EMF model, so that we can have
>>>> access to its eOperations directly from ATL.
>>>>
>>>> This worked fine with our source model since it has a single default
>>>> package, but as you might be aware, the KDM is composed of 12
>>>> separate packages in the same metamodel.
>>>>
>>>> How can we map our single OUT : kdm in the ATL with all those
>>>> packages, as it is how it shows up in the EMF registry.
>>>>
>>>> Thanks
>>>> Alain
Re: [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86545 is a reply to message #86441] Tue, 15 July 2008 11:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Hugo.Bruneliere.univ-nantes.fr

Dear Alain,

Alain Picard a écrit :
> William,
>
> You were right, the issue was somewhere else. After running a full debug
> and watching what was happening and tying that together with an earlier
> comment from Hugo, I got it figured out. The strange thing is that the
> behavior is different between using a .ecore file and the EMF registry.
>
> The situation was the following:
>
> rule CreateSegment {
> from stmRoot : STM!StTreeRoot
> to
> kdmSegment : kdm!Segment (
> -- model <- kdmModel
> model <- stmRoot.rootInterpreter
> ),
> ....
>
> and then:
> rule CreateModel {
> from stmInterpretation : STM!StInterpretationContext
> to
> kdmLanguageUnit : kdm!LanguageUnit(
> name <- 'Common Java datatypes'
> ),
> kdmModel : kdm!CodeModel (
> name <- 'My project',
> ....
>
> where the rootInterpreter of the first rule is of type
> InterpretationContext and triggered the 2nd rule.
>

I just want to add some precisions about your comment above:

The rootInterpreter of the "CreateSegment" does not trigger the
"CreateModel" rule.

ATL is declarative so there is no order specified for the execution of
the rules/matchings (except if you use imperative called rules): the two
rules are matched independently and one may be matched before the other
without any consequence on the result model.

The output model elements created by both rules are linked afterwards by
ATL using a traceability mechanism.

Best regards,

Hugo

> The issue was due to the fact that the kdmLanguageUnit is not type
> compatible with the model element where it was trying to assign in,
> since as Hugo said, by default it uses the first target. So I
> essentially made sure that the 2nd rule was more like this:
>
> rule CreateModel {
> from stmInterpretation : STM!StInterpretationContext
> to
> kdmModel : kdm!CodeModel (
> name <- 'My project',
> ....
>
> and that cleared the issue.
>
> Thanks for your decisive "look somewhere else" statement here.
>
> Alain
>
>
> William Piers wrote:
>> I am not sure, but the error you get seems to happen during the
>> execution, and should not be associated with the uri issue.
>>
>> The problem may comes from your transformation file, if you can post
>> your example here it would be helpful.
>>
>> Regards,
>>
>> William
>>
>> Alain Picard a écrit :
>>> William,
>>>
>>> When I specify a uri in this case it bombs out with a severe exception.
>>>
>>> Really not sure what to make of it.
>>>
>>> Cheers,
>>> Alain
>>>
>>> Exception:
>>> SEVERE: ****** BEGIN Stack Trace
>>> SEVERE: exception:
>>> SEVERE: null
>>> java.lang.ArrayStoreException
>>> at
>>> org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>> at
>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:645)
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:331)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:315)
>>>
>>> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 26)
>>> at
>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:283)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>>> at
>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>>> at
>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>>> at
>>> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
>>> at
>>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
>>> at
>>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
>>> at
>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>
>>> at
>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>>>
>>> at
>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
>>>
>>> at
>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
>>>
>>> at
>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:764)
>>>
>>> at
>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:614)
>>>
>>> at
>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:880)
>>>
>>> at
>>> org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1083)
>>>
>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>> SEVERE: A.main() : ??#26 null
>>> SEVERE: local variables = {self=STM2KDM : ASMModule}
>>> SEVERE: local stack = []
>>> SEVERE: A.__exec__() : ??#8 null
>>> SEVERE: local variables = {e=TransientLink {rule =
>>> 'CreateSegment', sourceElements = {stmRoot = IN!<unnamed>},
>>> targetElements = {kdmSegment = OUT!<notnamedyet>}, variables = {}},
>>> self=STM2KDM : ASMModule}
>>> SEVERE: local stack = []
>>> SEVERE: A.__applyCreateSegment(1 : NTransientLink;) : ??#14 13:4-13:36
>>> SEVERE: local variables = {kdmSegment=OUT!<notnamedyet>,
>>> stmRoot=IN!<unnamed>, link=TransientLink {rule = 'CreateSegment',
>>> sourceElements = {stmRoot = IN!<unnamed>}, targetElements =
>>> {kdmSegment = OUT!<notnamedyet>}, variables = {}}, self=STM2KDM :
>>> ASMModule}
>>> SEVERE: local stack = [OUT!<notnamedyet>]
>>> SEVERE: ****** END Stack Trace
>>> INFO: Execution terminated due to error (see launch configuration to
>>> allow continuation after errors).
>>> SEVERE: null
>>>
>>>
>>>
>>> William Piers wrote:
>>>> Hi,
>>>>
>>>> When you load an EPackage (i.e. specify an URI in the launch
>>>> configuration), all the referenced packages are loaded. So I think
>>>> you won't have problems if you indicates the package which contents
>>>> the metaelements (or one of them) you have in your input model.
>>>>
>>>> Best regards,
>>>>
>>>> William
>>>>
>>>> Alain Picard a écrit :
>>>>> Hi,
>>>>>
>>>>> As we are working on getting our KDM transformation patterns up to
>>>>> speed, we are encountering another issue.
>>>>>
>>>>> We want to reference/declare our OUT KDM metamodel through the EMF
>>>>> registry in order to pickup the full EMF model, so that we can have
>>>>> access to its eOperations directly from ATL.
>>>>>
>>>>> This worked fine with our source model since it has a single
>>>>> default package, but as you might be aware, the KDM is composed of
>>>>> 12 separate packages in the same metamodel.
>>>>>
>>>>> How can we map our single OUT : kdm in the ATL with all those
>>>>> packages, as it is how it shows up in the EMF registry.
>>>>>
>>>>> Thanks
>>>>> Alain


--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod (INRIA & EMN)
University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: hugo.bruneliere@inria.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
Re: [ATL] Specifying a multi-package metamodel via EMF registry in launch configuration [message #86591 is a reply to message #86545] Wed, 16 July 2008 16:59 Go to previous message
Eclipse UserFriend
Originally posted by: apicard.tampabay.rr.com

Thanks Hugo for the clarification

Alain


Hugo Bruneliere wrote:
> Dear Alain,
>
> Alain Picard a écrit :
>> William,
>>
>> You were right, the issue was somewhere else. After running a full
>> debug and watching what was happening and tying that together with an
>> earlier comment from Hugo, I got it figured out. The strange thing is
>> that the behavior is different between using a .ecore file and the EMF
>> registry.
>>
>> The situation was the following:
>>
>> rule CreateSegment {
>> from stmRoot : STM!StTreeRoot
>> to
>> kdmSegment : kdm!Segment (
>> -- model <- kdmModel
>> model <- stmRoot.rootInterpreter
>> ),
>> ....
>>
>> and then:
>> rule CreateModel {
>> from stmInterpretation : STM!StInterpretationContext
>> to
>> kdmLanguageUnit : kdm!LanguageUnit(
>> name <- 'Common Java datatypes'
>> ),
>> kdmModel : kdm!CodeModel (
>> name <- 'My project',
>> ....
>>
>> where the rootInterpreter of the first rule is of type
>> InterpretationContext and triggered the 2nd rule.
>>
>
> I just want to add some precisions about your comment above:
>
> The rootInterpreter of the "CreateSegment" does not trigger the
> "CreateModel" rule.
>
> ATL is declarative so there is no order specified for the execution of
> the rules/matchings (except if you use imperative called rules): the two
> rules are matched independently and one may be matched before the other
> without any consequence on the result model.
>
> The output model elements created by both rules are linked afterwards by
> ATL using a traceability mechanism.
>
> Best regards,
>
> Hugo
>
>> The issue was due to the fact that the kdmLanguageUnit is not type
>> compatible with the model element where it was trying to assign in,
>> since as Hugo said, by default it uses the first target. So I
>> essentially made sure that the 2nd rule was more like this:
>>
>> rule CreateModel {
>> from stmInterpretation : STM!StInterpretationContext
>> to
>> kdmModel : kdm!CodeModel (
>> name <- 'My project',
>> ....
>>
>> and that cleared the issue.
>>
>> Thanks for your decisive "look somewhere else" statement here.
>>
>> Alain
>>
>>
>> William Piers wrote:
>>> I am not sure, but the error you get seems to happen during the
>>> execution, and should not be associated with the uri issue.
>>>
>>> The problem may comes from your transformation file, if you can post
>>> your example here it would be helpful.
>>>
>>> Regards,
>>>
>>> William
>>>
>>> Alain Picard a écrit :
>>>> William,
>>>>
>>>> When I specify a uri in this case it bombs out with a severe exception.
>>>>
>>>> Really not sure what to make of it.
>>>>
>>>> Cheers,
>>>> Alain
>>>>
>>>> Exception:
>>>> SEVERE: ****** BEGIN Stack Trace
>>>> SEVERE: exception:
>>>> SEVERE: null
>>>> java.lang.ArrayStoreException
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:645)
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:331)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:315)
>>>>
>>>> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 26)
>>>> at
>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:283)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>>>> at
>>>> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
>>>> at
>>>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
>>>> at
>>>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:764)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:614)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:880)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1083)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>> SEVERE: A.main() : ??#26 null
>>>> SEVERE: local variables = {self=STM2KDM : ASMModule}
>>>> SEVERE: local stack = []
>>>> SEVERE: A.__exec__() : ??#8 null
>>>> SEVERE: local variables = {e=TransientLink {rule =
>>>> 'CreateSegment', sourceElements = {stmRoot = IN!<unnamed>},
>>>> targetElements = {kdmSegment = OUT!<notnamedyet>}, variables = {}},
>>>> self=STM2KDM : ASMModule}
>>>> SEVERE: local stack = []
>>>> SEVERE: A.__applyCreateSegment(1 : NTransientLink;) : ??#14 13:4-13:36
>>>> SEVERE: local variables = {kdmSegment=OUT!<notnamedyet>,
>>>> stmRoot=IN!<unnamed>, link=TransientLink {rule = 'CreateSegment',
>>>> sourceElements = {stmRoot = IN!<unnamed>}, targetElements =
>>>> {kdmSegment = OUT!<notnamedyet>}, variables = {}}, self=STM2KDM :
>>>> ASMModule}
>>>> SEVERE: local stack = [OUT!<notnamedyet>]
>>>> SEVERE: ****** END Stack Trace
>>>> INFO: Execution terminated due to error (see launch configuration to
>>>> allow continuation after errors).
>>>> SEVERE: null
>>>>
>>>>
>>>>
>>>> William Piers wrote:
>>>>> Hi,
>>>>>
>>>>> When you load an EPackage (i.e. specify an URI in the launch
>>>>> configuration), all the referenced packages are loaded. So I think
>>>>> you won't have problems if you indicates the package which contents
>>>>> the metaelements (or one of them) you have in your input model.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> William
>>>>>
>>>>> Alain Picard a écrit :
>>>>>> Hi,
>>>>>>
>>>>>> As we are working on getting our KDM transformation patterns up to
>>>>>> speed, we are encountering another issue.
>>>>>>
>>>>>> We want to reference/declare our OUT KDM metamodel through the EMF
>>>>>> registry in order to pickup the full EMF model, so that we can
>>>>>> have access to its eOperations directly from ATL.
>>>>>>
>>>>>> This worked fine with our source model since it has a single
>>>>>> default package, but as you might be aware, the KDM is composed of
>>>>>> 12 separate packages in the same metamodel.
>>>>>>
>>>>>> How can we map our single OUT : kdm in the ATL with all those
>>>>>> packages, as it is how it shows up in the EMF registry.
>>>>>>
>>>>>> Thanks
>>>>>> Alain
>
>
Previous Topic:unspecified ATL error
Next Topic:UML2 API
Goto Forum:
  


Current Time: Fri Mar 29 07:20:31 GMT 2024

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

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

Back to the top