Home » Archived » M2M (model-to-model transformation) » [ATL] Setting enumeration value to enumeration tagged value
[ATL] Setting enumeration value to enumeration tagged value [message #95148] |
Thu, 13 November 2008 11:00 |
Skander TURKI Messages: 130 Registered: July 2009 |
Senior Member |
|
|
Hi,
i have some trouble setting an enumeration value in the target model from
an enumeration value in the source model:
the target model is AADL, i have a DataPort class that has a direction
property of type PortDirection (that is an enumeration={in, out, inout}).
I want to set it to the value of the property direction of the stereotype
FlowPort of the MARTE profile that is also an enumeration{in, out, inout}.
i wrote this rule:
unique lazy rule myDataPorts {
from s : UML2!Port
to t : AADL!DataPort (
direction<- s.getTaggedValue('FlowPort','Direction'),
name<- s.name + '_' + s.toString()
)
}
And the Helper :
helper context UML2!Element def : getTaggedValue(stereotypeName : String,
taggedValue : String) : OclAny =
if (self.isStereotypeApplied(stereotypeName)) then
(self.getTaggedValue(stereotypeName,taggedValue))
else ('')
endif;
I get a long execution time with a lot of errors, like if i had an
infinite loop :
....
GRAVE: MUML2!Element;.getTaggedValue(1 : S, 2 : S) : ??#11 43:2-43:49
GRAVE: local variables = {taggedValue='direction',
stereotypeName='FlowPort', self=IN!Data_jtag}
GRAVE: local stack = []
GRAVE: MUML2!Element;.getTaggedValue(1 : S, 2 : S) : ??#11 43:2-43:49
GRAVE: local variables = {taggedValue='direction',
stereotypeName='FlowPort', self=IN!Data_jtag}
GRAVE: local stack = []
GRAVE: MUML2!Element;.getTaggedValue(1 : S, 2 : S) : ??#2 42:5-42:45
GRAVE: local variables = {taggedValue='direction',
stereotypeName='FlowPort', self=IN!Data_jtag}
GRAVE: local stack = []
GRAVE: MUML2!Element;.isStereotypeApplied(1 : S) : ??#11 35:48-35:54
GRAVE: local variables = {s=IN!FlowPort, name='FlowPort',
self=IN!Data_jtag}
GRAVE: local stack = [Sequence {}]
GRAVE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
GRAVE: stack overflow
java.lang.RuntimeException: stack overflow at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:195)
....
Can anybody help?!!
|
|
| | | | | | | | |
Re: [ATL] Setting enumeration value to enumeration tagged value [message #95480 is a reply to message #95465] |
Mon, 17 November 2008 11:17 |
Skander TURKI Messages: 130 Registered: July 2009 |
Senior Member |
|
|
I tried this:
direction <- AAXL!PortDirection.inout
I get this error:
GRAVE: message: feature inout does not exist on MOF!EEnum
Here is all the error message:
GRAVE: ****** BEGIN Stack Trace
GRAVE: message: feature inout does not exist on MOF!EEnum
GRAVE: A.main() : ??#24 null
GRAVE: local variables = {self=MarteToAAXL : ASMModule}
GRAVE: local stack = []
GRAVE: A.__exec__() : ??#28 null
GRAVE: local variables = {e=TransientLink {rule = 'myGeneralDataPorts',
sourceElements = {s = IN!Data_inout}, targetElements = {t =
OUT!Data_inout}, variables = {}}, self=MarteToAAXL : ASMModule}
GRAVE: local stack = []
GRAVE: A.__applymyGeneralDataPorts(1 : NTransientLink;) : ??#20
264:18-264:42
GRAVE: local variables = {t=OUT!Data_inout, s=IN!Data_inout,
link=TransientLink {rule = 'myGeneralDataPorts', sourceElements = {s =
IN!Data_inout}, targetElements = {t = OUT!Data_inout}, variables = {}},
self=MarteToAAXL : ASMModule}
GRAVE: local stack = [OUT!Data_inout, OUT!Data_inout, MarteToAAXL :
ASMModule]
GRAVE: ****** END Stack Trace
INFO: Trying to continue execution despite the error.
|
|
|
Re: [ATL] Setting enumeration value to enumeration tagged value [message #95543 is a reply to message #95480] |
Mon, 17 November 2008 13:23 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
hum I don't know :(
I hope somebody who already had this problem will participate to the
discussion
Skander a écrit :
> I tried this:
>
> direction <- AAXL!PortDirection.inout
>
> I get this error:
>
> GRAVE: message: feature inout does not exist on MOF!EEnum
>
> Here is all the error message:
>
> GRAVE: ****** BEGIN Stack Trace
> GRAVE: message: feature inout does not exist on MOF!EEnum
> GRAVE: A.main() : ??#24 null
> GRAVE: local variables = {self=MarteToAAXL : ASMModule}
> GRAVE: local stack = []
> GRAVE: A.__exec__() : ??#28 null
> GRAVE: local variables = {e=TransientLink {rule =
> 'myGeneralDataPorts', sourceElements = {s = IN!Data_inout},
> targetElements = {t = OUT!Data_inout}, variables = {}}, self=MarteToAAXL
> : ASMModule}
> GRAVE: local stack = []
> GRAVE: A.__applymyGeneralDataPorts(1 : NTransientLink;) : ??#20
> 264:18-264:42
> GRAVE: local variables = {t=OUT!Data_inout, s=IN!Data_inout,
> link=TransientLink {rule = 'myGeneralDataPorts', sourceElements = {s =
> IN!Data_inout}, targetElements = {t = OUT!Data_inout}, variables = {}},
> self=MarteToAAXL : ASMModule}
> GRAVE: local stack = [OUT!Data_inout, OUT!Data_inout, MarteToAAXL :
> ASMModule]
> GRAVE: ****** END Stack Trace
> INFO: Trying to continue execution despite the error.
>
|
|
| | |
Goto Forum:
Current Time: Thu Apr 25 22:44:59 GMT 2024
Powered by FUDForum. Page generated in 0.03737 seconds
|