|
|
Re: [ATL] inter-model reference [message #786733 is a reply to message #749851] |
Mon, 30 January 2012 19:12 |
|
Hi
I've been reading your post, and I'm having the same case.
Have you been any problem with the second type of inter-model-references in previous transformations? Do you know how I can force the first type of references?
Thanks you very much and sorry for my English.
|
|
|
Re: [ATL] inter-model reference [message #792908 is a reply to message #743656] |
Tue, 07 February 2012 14:57 |
Dennis Wagelaar Messages: 147 Registered: July 2009 |
Senior Member |
|
|
On 21/10/11 18:38, giovi wrote:
> *snip*
> That's exactly what i wont but when i try to do fo example this:
>
>
> rule test{
> from
> i : Manager!ManagerState in IN1
>
> to
> o_1: CtxManager!CtxState(
> name <- i.name,
> managerStates <- i
> )
> }
>
>
>
> i receive this model as output:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:contextmanager="http://www.kermeta.org/contextmanager">
> <contextmanager:CtxState name="1A" managerStates="/0"/>
> <contextmanager:CtxState name="1B" managerStates="/1"/>
> </xmi:XMI>
>
>
> Why there is not a reference href in this way? it seems that it's happens when
> i try to do a reference with the source pattern element.... how do i get even
> here a reference as in the first example?
Well, you're transforming 'i' into 'o_1', so when you assign 'i' to
'managerStates', ATL's implicit tracing mechanism will replace it by 'o_1'.
Hence, it becomes a self-reference. To avoid this, use the '<:=' assignment
operator instead of '<-', which should bypass implicit tracing.
Cheers,
Dennis
|
|
|
|
Powered by
FUDForum. Page generated in 0.03675 seconds