Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » resolving links to input model
resolving links to input model [message #61120] Thu, 06 September 2007 13:31 Go to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Hi,

I have a set of transformations which are all superimposed on a base file B.
This base file copies all elements and their attributes of the input model
if a certain flag F of such an element is false.

The other files perform a certain transformation on the elements of the input
model if F is true. This works well most of the time, but consider this
situation:

* An input model Mi:
<a F="false" id="1" b_ref="#2">
<c F="false" id="3"/>
</a>
<b F="true" val="10" id="2"/>

Here, and elsewhere, attribute id is an unique attribute which can be used
to reference other elements.
The type of a is ma, that of b is mb, and that of c is mc.

* A transformation T which (e.g.) adds 1 to the attribute val of element b and
copies the other attributes.

The result is that file B copies a and c to the output model Mo, leaving the
orginal reference to b is unresolved; and that T adds a new version of b:
<a F="false" id="1">
<b_ref xsi:type="mb" href="platform:/<project>/Mi#2"/>
<c F="false" id="3"/>
</a>
<b F="true" val="11" id="2"/>

using these rules:
rule copy_a {
from a : mm!ma(not a.F)
to a1 : mm!ma(
-- copy all attributes
)
}
and a similar rule copy_c.

Because b.F is true, rule copy_b is not used. Instead, rule transform_b
(a _new_ name) of T is used to copy and modify element b :
rule transform_b {
from b : mm!mb(b.F)
to b1 : mm!mb(
val <- b.val + 1,
-- copy all other attributes
)
}

What I need is that href to Mi#2 gets replaced by element b of Mo (i.e. Mo#2).
Since the id attributes are unique, it is "obvious" that Mo#2 == transform_b(Mi#2).

The resulting file (with the href) is editable in the standard EMF editor, but
things get a bit tricky when using a temporary buffer for Mi (which is what I do
in my own EMF editor). In that case, there is no Mi to refer to after the
transformation, which means that the hrefs are invalid. I need a temporary buffer
(either memory or file) because the editor sets the flag F on the user-selected
elements.

When running the transformations stand-alone, switching on
"Allow inter-model references" doesn't make a difference.

Any ideas on how to do this?

Regards,
Rene
[ATL] Re: resolving links to input model [message #61145 is a reply to message #61120] Thu, 06 September 2007 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Prefixing the subject with [ATL] :)

Rene Ladan wrote:
> Hi,
>
> I have a set of transformations which are all superimposed on a base
> file B.
> This base file copies all elements and their attributes of the input model
> if a certain flag F of such an element is false.
>
> The other files perform a certain transformation on the elements of the
> input
> model if F is true. This works well most of the time, but consider this
> situation:
>
> * An input model Mi:
> <a F="false" id="1" b_ref="#2">
> <c F="false" id="3"/>
> </a>
> <b F="true" val="10" id="2"/>
>
> Here, and elsewhere, attribute id is an unique attribute which can be
> used
> to reference other elements.
> The type of a is ma, that of b is mb, and that of c is mc.
>
> * A transformation T which (e.g.) adds 1 to the attribute val of element
> b and
> copies the other attributes.
>
> The result is that file B copies a and c to the output model Mo, leaving
> the
> orginal reference to b is unresolved; and that T adds a new version of b:
> <a F="false" id="1">
> <b_ref xsi:type="mb" href="platform:/<project>/Mi#2"/>
> <c F="false" id="3"/>
> </a>
> <b F="true" val="11" id="2"/>
>
> using these rules:
> rule copy_a {
> from a : mm!ma(not a.F)
> to a1 : mm!ma(
> -- copy all attributes
> )
> }
> and a similar rule copy_c.
>
> Because b.F is true, rule copy_b is not used. Instead, rule transform_b
> (a _new_ name) of T is used to copy and modify element b :
> rule transform_b {
> from b : mm!mb(b.F)
> to b1 : mm!mb(
> val <- b.val + 1,
> -- copy all other attributes
> )
> }
>
> What I need is that href to Mi#2 gets replaced by element b of Mo (i.e.
> Mo#2).
> Since the id attributes are unique, it is "obvious" that Mo#2 ==
> transform_b(Mi#2).
>
> The resulting file (with the href) is editable in the standard EMF
> editor, but
> things get a bit tricky when using a temporary buffer for Mi (which is
> what I do
> in my own EMF editor). In that case, there is no Mi to refer to after the
> transformation, which means that the hrefs are invalid. I need a
> temporary buffer
> (either memory or file) because the editor sets the flag F on the
> user-selected
> elements.
>
> When running the transformations stand-alone, switching on
> "Allow inter-model references" doesn't make a difference.
>
Forgot to mention that I also tried to use the strategy in which the copy_* rules
always copied their input (i.e. no check on F) and prefixing the transform_* rules
with "nodefault" to prevent rule conflicts. This didn't work very well either and
seems a bit obscure to me.

> Any ideas on how to do this?
>
> Regards,
> Rene
Re: [ATL] Re: resolving links to input model [message #61174 is a reply to message #61145] Thu, 06 September 2007 15:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Hi Rene,

Your issue does not seem to be related to ATL itself. I think it is only
related to the EMF XMI serialization.
Could you try to make a sample Java program using EMF that loads you
input model and saves it to a new file with default options. Then, have
a a look at the XMI, I reckon you will get the same output as with your
ATL transformation. In this case, ask the EMF newsgroup for what you
have to do (and post the answer there, it may interest some people ;))

Best regards,
Mikael


Rene Ladan wrote:
> Prefixing the subject with [ATL] :)
>
> Rene Ladan wrote:
>> Hi,
>>
>> I have a set of transformations which are all superimposed on a base
>> file B.
>> This base file copies all elements and their attributes of the input
>> model
>> if a certain flag F of such an element is false.
>>
>> The other files perform a certain transformation on the elements of
>> the input
>> model if F is true. This works well most of the time, but consider this
>> situation:
>>
>> * An input model Mi:
>> <a F="false" id="1" b_ref="#2">
>> <c F="false" id="3"/>
>> </a>
>> <b F="true" val="10" id="2"/>
>>
>> Here, and elsewhere, attribute id is an unique attribute which can
>> be used
>> to reference other elements.
>> The type of a is ma, that of b is mb, and that of c is mc.
>>
>> * A transformation T which (e.g.) adds 1 to the attribute val of
>> element b and
>> copies the other attributes.
>>
>> The result is that file B copies a and c to the output model Mo,
>> leaving the
>> orginal reference to b is unresolved; and that T adds a new version of b:
>> <a F="false" id="1">
>> <b_ref xsi:type="mb" href="platform:/<project>/Mi#2"/>
>> <c F="false" id="3"/>
>> </a>
>> <b F="true" val="11" id="2"/>
>>
>> using these rules:
>> rule copy_a {
>> from a : mm!ma(not a.F)
>> to a1 : mm!ma(
>> -- copy all attributes
>> )
>> }
>> and a similar rule copy_c.
>>
>> Because b.F is true, rule copy_b is not used. Instead, rule transform_b
>> (a _new_ name) of T is used to copy and modify element b :
>> rule transform_b {
>> from b : mm!mb(b.F)
>> to b1 : mm!mb(
>> val <- b.val + 1,
>> -- copy all other attributes
>> )
>> }
>>
>> What I need is that href to Mi#2 gets replaced by element b of Mo
>> (i.e. Mo#2).
>> Since the id attributes are unique, it is "obvious" that Mo#2 ==
>> transform_b(Mi#2).
>>
>> The resulting file (with the href) is editable in the standard EMF
>> editor, but
>> things get a bit tricky when using a temporary buffer for Mi (which is
>> what I do
>> in my own EMF editor). In that case, there is no Mi to refer to after
>> the
>> transformation, which means that the hrefs are invalid. I need a
>> temporary buffer
>> (either memory or file) because the editor sets the flag F on the
>> user-selected
>> elements.
>>
>> When running the transformations stand-alone, switching on
>> "Allow inter-model references" doesn't make a difference.
>>
> Forgot to mention that I also tried to use the strategy in which the
> copy_* rules
> always copied their input (i.e. no check on F) and prefixing the
> transform_* rules
> with "nodefault" to prevent rule conflicts. This didn't work very well
> either and
> seems a bit obscure to me.
>
>> Any ideas on how to do this?
>>
>> Regards,
>> Rene



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: [ATL] Re: resolving links to input model [message #61247 is a reply to message #61174] Fri, 07 September 2007 11:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Mikaël Barbero wrote:
> Hi Rene,
>
> Your issue does not seem to be related to ATL itself. I think it is only
> related to the EMF XMI serialization.
> Could you try to make a sample Java program using EMF that loads you
> input model and saves it to a new file with default options. Then, have
> a a look at the XMI, I reckon you will get the same output as with your
> ATL transformation. In this case, ask the EMF newsgroup for what you
> have to do (and post the answer there, it may interest some people ;))
>
I indeed get the same output when using a simple EMF program that loads
and saves such a resource.

Regards,
Rene
Re: [ATL] Re: resolving links to input model [message #66205 is a reply to message #61145] Thu, 15 November 2007 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

This is a multi-part message in MIME format.
--------------090105070408090403020001
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Rene Ladan wrote:
>> Hi,
>>
>> I have a set of transformations which are all superimposed on a base file B.
>> This base file copies all elements and their attributes of the input model
>> if a certain flag F of such an element is false.
>>
>> The other files perform a certain transformation on the elements of the input
>> model if F is true. This works well most of the time, but consider this situation:
>>
[..]

>> * A transformation T which (e.g.) adds 1 to the attribute val of element b and
>> copies the other attributes.
>>
[..]
>> using these rules:
>> rule copy_a {
>> from a : mm!ma(not a.F)
>> to a1 : mm!ma(
>> -- copy all attributes
>> )
>> }
>> and a similar rule copy_c.
>>
>> rule transform_b {
>> from b : mm!mb(b.F)
>> to b1 : mm!mb(
>> val <- b.val + 1,
>> -- copy all other attributes
>> )
>> }

Resolving the proxies after the transformation works fine using some Java code,
but the ATL engine (CVS 20071017) crashes with the above rules on input having
this format:

<a F="true" id="1">
<c F="false" id="3" b_ref="#2"/>
</a>
<b F="false" id="2" c_ref="#3"/>

So now a.F=true & b.F=false instead of a.F=false & b.F=true, which means that b now
gets processed with the standard rule 'copy_b' of the base file B, and that a now
gets processed with a custom rule transform_a.

The problem is that while generating the new b using copy_b, the engine can't figure out
the value of c_ref, since it is contained in element a which is only added to the output
by the transformation-specific rule.

I've attached an actual example containing the crash report.

Any ideas on how to do this? Would superimposing B on the transformation-specific rules
instead of superimposing the transformation-specific rules on B help?

Regards,
Rene


--------------090105070408090403020001
Content-Type: text/plain;
name="add_backup_Normalization_crash.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="add_backup_Normalization_crash.txt"

<?xml version="1.0" encoding="UTF-8"?>
<meta:Scenario xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:meta="http://com.tue.scenario" Name="Converted"
id="w0">
<nodes xsi:type="meta:ServiceInstance" Name="Voice_Video_IF" id="c1" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="norm" id="rp1_vvi" edges="#e1_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Email_IF" id="c2" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="norm" id="rp1_ei" edges="#e2_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="IM_IF" id="c3" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="norm" id="rp1_ii" edges="#e3_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="SIP_Msg_IF" id="c4" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="norm" id="rp1_smi" edges="#e4_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="MMS_IF" id="c5" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="norm" id="rp1_mi" edges="#e6_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="SMS_IF" id="c6" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="norm" id="rp1_si" edges="#e5_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Normalization" id="c7" partOfTransformation="true"
compRef="{00000000-0000-0000-0000-000000001236}" bufferSizeKByte="-1">
<inputs Name="norm" id="pp1_n" edges="#e1_____________ #e2_____________ #e3_____________ #e4_____________ #e5_____________ #e6_____________">
<operations Name="op1_n" id="op1_n"/>
</inputs>
<outputs Name="contr" id="rp1_n" edges="#e7_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="SMPP_IF" id="c8" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="vas" id="pp1_smi" edges="#e16____________">
<operations Name="op1_smi" id="op1_smi"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="MM7_IF" id="c9" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="vas" id="pp1_m7i" edges="#e17____________">
<operations Name="op1_m7i" id="op1_m7i"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="OSA_IF" id="c10" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="vas" id="pp1_osa_i" edges="#e18____________">
<operations Name="op1_osa_i" id="op1_osa_i"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="WS_IF" id="c11" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="vas" id="pp1_wi" edges="#e19____________">
<operations Name="op1_wi" id="op1_wi"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="TUI" id="c12" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="msg_store" id="rc12" edges="#e8_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="VUI" id="c13" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="msg_store" id="rc13" edges="#e9_____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="IMAP_IF" id="c14" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="msg_store" id="rc14" edges="#e10____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="POP3_IF" id="c15" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="msg_store" id="rc15" edges="#e11____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Web_IF" id="c16" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="msg_store" id="rc16" edges="#e12____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="IM_Buddy" id="c17" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="msg_store" id="pc17" edges="#e13____________">
<operations Name="opc17" id="opc17"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Notifier" id="c18" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="msg_store" id="pc18" edges="#e14____________">
<operations Name="opc18" id="opc18"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Message_Store" id="c19" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="msg_store" id="pc19" edges="#e8_____________ #e9_____________ #e10____________ #e11____________ #e12____________">
<operations Name="opc19" id="opc19"/>
</inputs>
<outputs Name="msg_store" id="p2_ch" edges="#e13____________ #e14____________ #e15____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Feature_Server" id="c20" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="p1_fs" id="rp1_fs" edges="#e23____________ #e22____________ #e20____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Control_Handler" id="c21" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="contr" id="p1_ch" edges="#e7_____________ #e21____________">
<operations Name="op1_ch" id="op1_ch"/>
</inputs>
<inputs Name="msg_store" id="p2_ch" edges="#e15____________">
<operations Name="op2_ch" id="op2_ch"/>
</inputs>
<outputs Name="vas" id="r1_ch" edges="#e16____________ #e17____________ #e18____________ #e19____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Session_Router" id="c22" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="p1_fs" id="p1_sr" edges="#e20____________">
<operations Name="op1_sr" id="op1_sr"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Message_Router" id="c23" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="p1_mr" id="p1_mr" edges="#e24____________">
<operations Name="op1_mr" id="op1_mr"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Retry_Engine" id="c26" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="p1_re" id="p1_re">
<operations Name="op1_re" id="op1_re"/>
</inputs>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="User_Profile_Preferences" id="c27"
compRef="{00000000-0000-0000-0000-000000001236}" bufferSizeKByte="-1">
<inputs Name="p1_fs" id="pc27_" edges="#e25____________ #e23____________">
<operations Name="opc27_" id="opc27_"/>
</inputs>
<outputs Name="p1_mr" id="rc27_1" edges="#e24____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Provisioning" id="c28" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<outputs Name="p1_fs" id="rc28_" edges="#e25____________"/>
</nodes>
<nodes xsi:type="meta:ServiceInstance" Name="Network_Status" id="c29" compRef="{00000000-0000-0000-0000-000000001236}"
bufferSizeKByte="-1">
<inputs Name="p1_fs" id="pc29" edges="#e22____________">
<operations Name="opc29" id="opc29"/>
</inputs>
<outputs Name="contr" id="rc29_2" edges="#e21____________"/>
</nodes>
<edges Name="e1" id="e1_____________" target="#pp1_n" source="#rp1_vvi"/>
<edges Name="e2" id="e2_____________" target="#pp1_n" source="#rp1_ei"/>
<edges Name="e3" id="e3_____________" target="#pp1_n" source="#rp1_ii"/>
<edges Name="e4" id="e4_____________" target="#pp1_n" source="#rp1_smi"/>
<edges Name="e5" id="e5_____________" target="#pp1_n" source="#rp1_si"/>
<edges Name="e6" id="e6_____________" target="#pp1_n" source="#rp1_mi"/>
<edges Name="e7" id="e7_____________" target="#p1_ch" source="#rp1_n"/>
<edges Name="e8" id="e8_____________" target="#pc19" source="#rc12"/>
<edges Name="e9" id="e9_____________" target="#pc19" source="#rc13"/>
<edges Name="e10" id="e10____________" target="#pc19" source="#rc14"/>
<edges Name="e11" id="e11____________" target="#pc19" source="#rc15"/>
<edges Name="e12" id="e12____________" target="#pc19" source="#rc16"/>
<edges Name="e13" id="e13____________" target="#pc17" source="#p2_ch"/>
<edges Name="e14" id="e14____________" target="#pc18" source="#p2_ch"/>
<edges Name="e15" id="e15____________" target="#p2_ch" source="#p2_ch"/>
<edges Name="e16" id="e16____________" target="#pp1_smi" source="#r1_ch"/>
<edges Name="e17" id="e17____________" target="#pp1_m7i" source="#r1_ch"/>
<edges Name="e18" id="e18____________" target="#pp1_osa_i" source="#r1_ch"/>
<edges Name="e19" id="e19____________" target="#pp1_wi" source="#r1_ch"/>
<edges Name="e20" id="e20____________" target="#p1_sr" source="#rp1_fs"/>
<edges Name="e21" id="e21____________" target="#p1_ch" source="#rc29_2"/>
<edges Name="e22" id="e22____________" target="#pc29" source="#rp1_fs"/>
<edges Name="e23" id="e23____________" target="#pc27_" source="#rp1_fs"/>
<edges Name="e24" id="e24____________" target="#p1_mr" source="#rc27_1"/>
<edges Name="e25" id="e25____________" target="#pc27_" source="#rc28_"/>
</meta:Scenario>

Starting model transformation add_backup
SEVERE: ****** BEGIN Stack Trace
SEVERE: message: cannot set feature meta!Edge.target to value [org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3bed68 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@964f8e (name: ProvidesPort) (instanceClassName: null) (abstract: false, interface: false))]
SEVERE: exception:
SEVERE: java.util.ArrayList cannot be cast to org.eclipse.emf.ecore.InternalEObject
java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.eclipse.emf.ecore.InternalEObject
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl .java:2369)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1116)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1090)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:281)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:292)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
at transform.Transform.doATLTransformation(Transform.java:189)
at transform.Transform.transform(Transform.java:701)
at call_custom.MetaEditor$1.doExecuteWithResult(MetaEditor.java :99)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
at call_custom.MetaEditor.run(MetaEditor.java:117)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy. execute(ActionDelegateHandlerProxy.java:289)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
at org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
at org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:821)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:879)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:568)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:126)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:115 0)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1571)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4002 )
at org.eclipse.swt.widgets.Tree.WM_KEYDOWN(Tree.java:5478)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3703 )
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5368)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4435 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:23 19)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3351)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 515)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455)
at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
at org.eclipse.equinox.launcher.Main.main(Main.java:1169)
SEVERE: A.main() : ??#24 null
SEVERE: local variables = {self=add_backup : ASMModule}
SEVERE: local stack = []
SEVERE: A.__exec__() : ??#8 null
SEVERE: local variables = {e=TransientLink {rule = 'add_backup', sourceElements = {se = IN!<unnamed>}, targetElements = {rp1 = OUT!<unnamed>, o2 = OUT!<unnamed>, e1 = OUT!<unnamed>, s2 = OUT!<unnamed>, o1 = OUT!<unnamed>, e2 = OUT!<unnamed>, rp2 = OUT!<unnamed>, pp1 = OUT!<unnamed>, se1 = OUT!<unnamed>, s3 = OUT!<unnamed>, pp2 = OUT!<unnamed>}, variables = {}}, self=add_backup : ASMModule}
SEVERE: local stack = []
SEVERE: A.__applyadd_backup(1 : NTransientLink;) : ??#334 58:4-58:27
SEVERE: local variables = {rp2=OUT!<unnamed>, o2=OUT!<unnamed>, rp1=OUT!<unnamed>, se1=OUT!<unnamed>, se=IN!<unnamed>, link=TransientLink {rule = 'add_backup', sourceElements = {se = IN!<unnamed>}, targetElements = {rp1 = OUT!<unnamed>, o2 = OUT!<unnamed>, e1 = OUT!<unnamed>, s2 = OUT!<unnamed>, o1 = OUT!<unnamed>, e2 = OUT!<unnamed>, rp2 = OUT!<unnamed>, pp1 = OUT!<unnamed>, se1 = OUT!<unnamed>, s3 = OUT!<unnamed>, pp2 = OUT!<unnamed>}, variables = {}}, o1=OUT!<unnamed>, self=add_backup : ASMModule, e2=OUT!<unnamed>, e1=OUT!<unnamed>, s3=OUT!<unnamed>, s2=OUT!<unnamed>, pp2=OUT!<unnamed>, pp1=OUT!<unnamed>}
SEVERE: local stack = [OUT!<unnamed>]
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow continuation after errors).
SEVERE: cannot set feature meta!Edge.target to value [org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3bed68 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@964f8e (name: ProvidesPort) (instanceClassName: null) (abstract: false, interface: false))]
java.lang.RuntimeException: cannot set feature meta!Edge.target to value [org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3bed68 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@964f8e (name: ProvidesPort) (instanceClassName: null) (abstract: false, interface: false))]
at org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:284)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:292)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
at transform.Transform.doATLTransformation(Transform.java:189)
at transform.Transform.transform(Transform.java:701)
at call_custom.MetaEditor$1.doExecuteWithResult(MetaEditor.java :99)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
at call_custom.MetaEditor.run(MetaEditor.java:117)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy. execute(ActionDelegateHandlerProxy.java:289)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
at org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
at org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:821)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:879)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:568)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:126)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:115 0)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1571)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4002 )
at org.eclipse.swt.widgets.Tree.WM_KEYDOWN(Tree.java:5478)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3703 )
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5368)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4435 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:23 19)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3351)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 515)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455)
at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
at org.eclipse.equinox.launcher.Main.main(Main.java:1169)
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.eclipse.emf.ecore.InternalEObject
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl .java:2369)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1116)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1090)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:281)
... 69 more
Model transformation done

--------------090105070408090403020001
Content-Type: text/plain;
name="add_backup.atl"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="add_backup.atl"

LS1AYXRsY29tcGlsZXIgYXRsMjAwNgptb2R1bGUgYWRkX2JhY2t1cDsKY3Jl YXRlIE9VVCA6
IG1ldGEgZnJvbSBJTiA6IG1ldGE7CgotLSBBIC0+IG1hc3Rlci0tPihBLEEn KQoKLS0gcHJl
OiBOYW1lLmxlbmd0aCgpID09IDEgJiYgTmFtZVsxXS5sZW5ndGgoKSA+PSAw CgpydWxlIGFk
ZF9iYWNrdXAgewoJZnJvbQoJCXNlIDogbWV0YSFTZXJ2aWNlSW5zdGFuY2Uo c2UucGFydE9m
VHJhbnNmb3JtYXRpb24gYW5kIHNlLm91dHB1dHMuYXNTZXF1ZW5jZSgpLT5u b3RFbXB0eSgp
KQoJdG8KCQlzZTEgOiBtZXRhIVNlcnZpY2VJbnN0YW5jZSgKCQkJaXNTdGFy dCA8LSBzZS5p
c1N0YXJ0LAoJCQlpc0ZpbmlzaCA8LSBzZS5pc0ZpbmlzaCwKCQkJY29tcFJl ZiA8LSBzZS5j
b21wUmVmLAoJCQlpc0J1ZmZlciA8LSBzZS5pc0J1ZmZlciwKCQkJYnVmZmVy U2l6ZUtCeXRl
IDwtIHNlLmJ1ZmZlclNpemVLQnl0ZSwKCQkJaW5wdXRzIDwtIHNlLmlucHV0 cywKCQkJb3V0
cHV0cyA8LSBzZS5vdXRwdXRzLAoJCQlOYW1lIDwtIHNlLk5hbWUsCgkJCWlk IDwtIHNlLmlk
LAoJCQloZWlnaHQgPC0gc2UuaGVpZ2h0LAoJCQl3aWR0aCA8LSBzZS53aWR0 aCwKCQkJeCA8
LSBzZS54LAoJCQl5IDwtIHNlLnksCgkJCW1hcHMgPC0gc2UubWFwcywKCQkJ c2NlbmFyaW8g
PC0gc2Uuc2NlbmFyaW8sCgkJCXNjTW9kZWwgPC0gaWYgc2Uuc2NlbmFyaW8u b2NsSXNVbmRl
ZmluZWQoKSB0aGVuIHNlLnNjTW9kZWwgZWxzZSBPY2xVbmRlZmluZWQgZW5k aWYKCQkpLAoJ
CXMyIDogbWV0YSFTZXJ2aWNlSW5zdGFuY2UoCgkJCWJ1ZmZlclNpemVLQnl0 ZSA8LSAnLTEn
LAoJCQlzY2VuYXJpbyA8LSBzZS5zY2VuYXJpbywKCQkJaW5wdXRzIDwtIFNl cXVlbmNle3Bw
MX0sCgkJCW91dHB1dHMgPC0gU2VxdWVuY2V7cnAxLCBycDJ9LAoJCQlOYW1l IDwtIHNlLk5h
bWUgKyAnX21hc3RlcicsCgkJCWlkIDwtIHNlLmlkICsgJy1jYWNhJywKCQkJ c2NNb2RlbCA8
LSBpZiBzZS5zY2VuYXJpby5vY2xJc1VuZGVmaW5lZCgpIHRoZW4gc2Uuc2NN b2RlbCBlbHNl
IE9jbFVuZGVmaW5lZCBlbmRpZgoJCSksCgkJczMgOiBtZXRhIVNlcnZpY2VJ bnN0YW5jZSgK
CQkJYnVmZmVyU2l6ZUtCeXRlIDwtICctMScsCgkJCXNjZW5hcmlvIDwtIHNl LnNjZW5hcmlv
LAoJCQlpbnB1dHMgPC0gU2VxdWVuY2V7cHAyfSwKCQkJTmFtZSA8LXNlLk5h bWUgKyAnX2Nv
cHknLAoJCQlpZCA8LSBzZS5pZCArICctYzBjMCcsCgkJCXNjTW9kZWwgPC0g aWYgc2Uuc2Nl
bmFyaW8ub2NsSXNVbmRlZmluZWQoKSB0aGVuIHNlLnNjTW9kZWwgZWxzZSBP Y2xVbmRlZmlu
ZWQgZW5kaWYKCQkpLAoJCWUxIDogbWV0YSFFZGdlKAoJCQlzY2VuYXJpbyA8 LSBzZS5zY2Vu
YXJpbywKCQkJdGFyZ2V0IDwtIHNlLmlucHV0cy5hc1NlcXVlbmNlKCktPmZp cnN0KCksCgkJ
CXNvdXJjZSA8LSBycDEsCgkJCU5hbWUgPC0gc2UuTmFtZSArICdfb3JpZycs CgkJCWlkIDwt
IHNlLmlkICsgJy0nICsgc2UuaWQsCgkJCXNjTW9kZWwgPC0gaWYgc2Uuc2Nl bmFyaW8ub2Ns
SXNVbmRlZmluZWQoKSB0aGVuIHNlLnNjTW9kZWwgZWxzZSBPY2xVbmRlZmlu ZWQgZW5kaWYK
CQkpLAoJCWUyIDptZXRhIUVkZ2UoCgkJCXNjZW5hcmlvIDwtIHNlLnNjZW5h cmlvLAoJCQl0
YXJnZXQgPC0gcHAyLAoJCQlzb3VyY2UgPC0gcnAyLAoJCQlOYW1lIDwtIHNl Lk5hbWUgKyAn
X3NsYXZlJywKCQkJaWQgPC0gc2UuaWQgKyAnLScgKyBzZS5pZCArICcxJywK CQkJc2NNb2Rl
bCA8LSBpZiBzZS5zY2VuYXJpby5vY2xJc1VuZGVmaW5lZCgpIHRoZW4gc2Uu c2NNb2RlbCBl
bHNlIE9jbFVuZGVmaW5lZCBlbmRpZgoJCSksCgkJcHAxIDogbWV0YSFQcm92 aWRlc1BvcnQo
CgkJCW9wZXJhdGlvbnMgPC0gU2VxdWVuY2V7bzF9LAoJCQlOYW1lIDwtICdw cDEnLAoJCQlp
ZCA8LSBzZS5pZCArICcwMDAxJwoJCSksCgkJcHAyIDogbWV0YSFQcm92aWRl c1BvcnQoCgkJ
CW9wZXJhdGlvbnMgPC0gU2VxdWVuY2V7bzJ9LAoJCQlOYW1lIDwtICdwcDIn LAoJCQlpZCA8
LSBzZS5pZCArICcwMDAyJwoJCSksCgkJbzEgOiBtZXRhIU9wZXJhdGlvbigK CQkJTmFtZSA8
LSAnb3AxJywKCQkJaWQgPC0gc2UuaWQgKyAnMDAxJwoJCSksCgkJbzIgOiBt ZXRhIU9wZXJh
dGlvbigKCQkJTmFtZSA8LSAnb3AyJywKCQkJaWQgPC0gc2UuaWQgKyAnMDAy JwoJCSksCgkJ
cnAxIDogbWV0YSFSZXF1aXJlc1BvcnQoCgkJCU5hbWUgPC0gJ3JwMScsCgkJ CWlkIDwtIHNl
LmlkICsgJzEwMDEnCgkJKSwKCQlycDIgOiBtZXRhIVJlcXVpcmVzUG9ydCgK CQkJTmFtZSA8
LSAncnAyJywKCQkJaWQgPC0gc2UuaWQgKyAnMTAwMicKCQkpCn0=
--------------090105070408090403020001--
Re: [ATL] Re: resolving links to input model [message #66306 is a reply to message #66205] Fri, 16 November 2007 10:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Rene Ladan wrote:
> Rene Ladan wrote:
>>> Hi,
>>>
>>> I have a set of transformations which are all superimposed on a base file B.
>>> This base file copies all elements and their attributes of the input model
>>> if a certain flag F of such an element is false.
>>>
>>> The other files perform a certain transformation on the elements of the input
>>> model if F is true. This works well most of the time, but consider this situation:
>>>
> [..]
>
>>> * A transformation T which (e.g.) adds 1 to the attribute val of element b and
>>> copies the other attributes.
>>>
> [..]
>>> using these rules:
>>> rule copy_a {
>>> from a : mm!ma(not a.F)
>>> to a1 : mm!ma(
>>> -- copy all attributes
>>> )
>>> }
>>> and a similar rule copy_c.
>>>
>>> rule transform_b {
>>> from b : mm!mb(b.F)
>>> to b1 : mm!mb(
>>> val <- b.val + 1,
>>> -- copy all other attributes
>>> )
>>> }
>
> Resolving the proxies after the transformation works fine using some Java code,
> but the ATL engine (CVS 20071017) crashes with the above rules on input having
> this format:
>
> <a F="true" id="1">
> <c F="false" id="3" b_ref="#2"/>
> </a>
> <b F="false" id="2" c_ref="#3"/>
>
> So now a.F=true & b.F=false instead of a.F=false & b.F=true, which means that b now
> gets processed with the standard rule 'copy_b' of the base file B, and that a now
> gets processed with a custom rule transform_a.
>
> The problem is that while generating the new b using copy_b, the engine can't figure out
> the value of c_ref, since it is contained in element a which is only added to the output
> by the transformation-specific rule.
>
> I've attached an actual example containing the crash report.
>
> Any ideas on how to do this? Would superimposing B on the transformation-specific rules
> instead of superimposing the transformation-specific rules on B help?
>
Changing the superimposition order doesn't help, the error message just slightly changes.
I guess I'll have to make all the scripts self-contained, i.e. include the common part in all parts.
That should also remove the need to add code to handle the case where this thread was originally about.

Regards,
Rene
Re: [ATL] Re: resolving links to input model [message #66327 is a reply to message #66306] Fri, 16 November 2007 13:11 Go to previous message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Rene Ladan wrote:
> Rene Ladan wrote:
>> Rene Ladan wrote:
>>>> Hi,
>>>>
>>>> I have a set of transformations which are all superimposed on a base file B.
>>>> This base file copies all elements and their attributes of the input model
>>>> if a certain flag F of such an element is false.
>>>>
>>>> The other files perform a certain transformation on the elements of the input
>>>> model if F is true. This works well most of the time, but consider this situation:
>>>>
>> [..]
>>
>>>> * A transformation T which (e.g.) adds 1 to the attribute val of element b and
>>>> copies the other attributes.
>>>>
>> [..]
>>>> using these rules:
>>>> rule copy_a {
>>>> from a : mm!ma(not a.F)
>>>> to a1 : mm!ma(
>>>> -- copy all attributes
>>>> )
>>>> }
>>>> and a similar rule copy_c.
>>>>
>>>> rule transform_b {
>>>> from b : mm!mb(b.F)
>>>> to b1 : mm!mb(
>>>> val <- b.val + 1,
>>>> -- copy all other attributes
>>>> )
>>>> }
>> Resolving the proxies after the transformation works fine using some Java code,
>> but the ATL engine (CVS 20071017) crashes with the above rules on input having
>> this format:
>>
>> <a F="true" id="1">
>> <c F="false" id="3" b_ref="#2"/>
>> </a>
>> <b F="false" id="2" c_ref="#3"/>
>>
>> So now a.F=true & b.F=false instead of a.F=false & b.F=true, which means that b now
>> gets processed with the standard rule 'copy_b' of the base file B, and that a now
>> gets processed with a custom rule transform_a.
>>
>> The problem is that while generating the new b using copy_b, the engine can't figure out
>> the value of c_ref, since it is contained in element a which is only added to the output
>> by the transformation-specific rule.
>>
Ok, this can also be caused by a duplicate identifier in the source model :/ Renaming one of
the duplicate identifiers made the transformation work again.

Regards,
Rene
Previous Topic:[ATL][UML] Problem with UML transformation
Next Topic:[ATL] Problem with uml2copy.atl
Goto Forum:
  


Current Time: Sat May 08 07:33:12 GMT 2021

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

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

Back to the top