Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Trying to capture record of transformation
[ATL] Trying to capture record of transformation [message #103875] Wed, 22 April 2009 14:22 Go to next message
Andy Carpenter is currently offline Andy CarpenterFriend
Messages: 145
Registered: July 2009
Senior Member
For one type from my input model I'd like to capture a
trace of each instance to the output model. I've tried the
following code

rule x {
from in : IN!InType1
to out : OUT!OutType1 (
a <- in.a
),
trace : Trace!TraceLink (
target <- out
)
do {
trace.refSetValue('source', in);
}
}

I get the expected elements in my target trace model, but neither
of the attributes of these elements is set. I'm working with 3.0.0M6
and have tried with both the Regular and EMF specific VMs. Does
anyone have any ideas on what I might have done wrong?

thanks
Andy.

--
-- ------------------------------------------------------------ -------------
Dr Andy Carpenter
School of Computer Science,
University of Manchester, Manchester M13 9PL, UK
Email: Andy.Carpenter@manchester.ac.uk
Tel: +44 161 275 6168
Fax: +44 161 275 6280
Re: [ATL] Trying to capture record of transformation [message #103944 is a reply to message #103875] Thu, 23 April 2009 08:12 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 302
Registered: July 2009
Senior Member
Hello,

To make references between input and output models, you have to check
the "Allow inter-model references" parameter in the advanced tab of the
launch configuration.

Best regards,

William

Andy Carpenter a écrit :
> For one type from my input model I'd like to capture a
> trace of each instance to the output model. I've tried the
> following code
>
> rule x {
> from in : IN!InType1
> to out : OUT!OutType1 (
> a <- in.a
> ),
> trace : Trace!TraceLink (
> target <- out
> )
> do {
> trace.refSetValue('source', in);
> }
> }
>
> I get the expected elements in my target trace model, but neither
> of the attributes of these elements is set. I'm working with 3.0.0M6
> and have tried with both the Regular and EMF specific VMs. Does
> anyone have any ideas on what I might have done wrong?
>
> thanks
> Andy.
>
Re: [ATL] Trying to capture record of transformation [message #103968 is a reply to message #103944] Thu, 23 April 2009 09:23 Go to previous messageGo to next message
Andy Carpenter is currently offline Andy CarpenterFriend
Messages: 145
Registered: July 2009
Senior Member
William,

Thanks. I know about the need to explicitly allow inter-model
references; why did my brain not realise that this was the problem!

BTW: I'm using a programmatic launch and have found that the
allowIntermodelReferences option needs to be present in the
options passed to the Launcher.initialize method for the Regular VM
and the options passed to the Launcher.launch method for the EMF
Specific VM. It would be nice if the two were consistent.

Andy.

> To make references between input and output models, you have to check the
> "Allow inter-model references" parameter in the advanced tab of the launch
> configuration.

>> For one type from my input model I'd like to capture a
>> trace of each instance to the output model. I've tried the
>> following code
>>
>> rule x {
>> from in : IN!InType1
>> to out : OUT!OutType1 (
>> a <- in.a
>> ),
>> trace : Trace!TraceLink (
>> target <- out
>> )
>> do {
>> trace.refSetValue('source', in);
>> }
>> }
>>
>> I get the expected elements in my target trace model, but neither
>> of the attributes of these elements is set. I'm working with 3.0.0M6
>> and have tried with both the Regular and EMF specific VMs. Does
>> anyone have any ideas on what I might have done wrong?
Re: [ATL] Trying to capture record of transformation [message #103990 is a reply to message #103944] Thu, 23 April 2009 10:06 Go to previous messageGo to next message
Andy Carpenter is currently offline Andy CarpenterFriend
Messages: 145
Registered: July 2009
Senior Member
William,

When I set the allowIntermodelReferences option with the
EMF Specific VM I get the following exception; the Regular VM
works fine.

Andy.
org.eclipse.m2m.atl.engine.emfvm.VMException

at
org.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter.set (EMFModelAdapter.java:609)

at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:437)

....

Caused by: java.lang.ArrayStoreException

at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:124)

at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicELi st.java:514)

at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAl lUnique(NotifyingListImpl.java:506)

at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:478)

at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:406)

at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractELi st.java:374)

at
org.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter.set (EMFModelAdapter.java:548)

.... 62 more



"William Piers" <william.piers@obeo.fr> wrote in message
news:gsp7sl$9cc$1@build.eclipse.org...

> To make references between input and output models, you have to check the
> "Allow inter-model references" parameter in the advanced tab of the launch
> configuration.
>
> Andy Carpenter a
Re: [ATL] Trying to capture record of transformation [message #104009 is a reply to message #103990] Fri, 24 April 2009 08:34 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 302
Registered: July 2009
Senior Member
Hello,

Could you report a bug with your project (or a minimal version) ?
It would help me a lot to reproduce that exception.

Best regards,

William

Andy Carpenter a écrit :
> William,
>
> When I set the allowIntermodelReferences option with the
> EMF Specific VM I get the following exception; the Regular VM
> works fine.
>
> Andy.
> org.eclipse.m2m.atl.engine.emfvm.VMException
>
> at
> org.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter.set (EMFModelAdapter.java:609)
>
> at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:437)
>
> ...
>
> Caused by: java.lang.ArrayStoreException
>
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:124)
>
> at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicELi st.java:514)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAl lUnique(NotifyingListImpl.java:506)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:478)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:406)
>
> at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractELi st.java:374)
>
> at
> org.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter.set (EMFModelAdapter.java:548)
>
> ... 62 more
>
>
>
> "William Piers" <william.piers@obeo.fr> wrote in message
> news:gsp7sl$9cc$1@build.eclipse.org...
>
>> To make references between input and output models, you have to check the
>> "Allow inter-model references" parameter in the advanced tab of the launch
>> configuration.
>>
>> Andy Carpenter a écrit :
>>> For one type from my input model I'd like to capture a
>>> trace of each instance to the output model. I've tried the
>>> following code
>>>
>>> rule x {
>>> from in : IN!InType1
>>> to out : OUT!OutType1 (
>>> a <- in.a
>>> ),
>>> trace : Trace!TraceLink (
>>> target <- out
>>> )
>>> do {
>>> trace.refSetValue('source', in);
>>> }
>>> }
>>>
>>> I get the expected elements in my target trace model, but neither
>>> of the attributes of these elements is set. I'm working with 3.0.0M6
>>> and have tried with both the Regular and EMF specific VMs. Does
>>> anyone have any ideas on what I might have done wrong?
>
>
Re: [ATL] Trying to capture record of transformation [message #104225 is a reply to message #104009] Tue, 28 April 2009 11:06 Go to previous message
Andy Carpenter is currently offline Andy CarpenterFriend
Messages: 145
Registered: July 2009
Senior Member
Hi William,

I've now extracted a sensible sized example that demonstrates the
problem. It's reported a 274006. It looks like its associated with guard
conditions on rules.

Andy.

"William Piers" <william.piers@obeo.fr> wrote in message
news:gsrtim$5vi$1@build.eclipse.org...
> Hello,
>
> Could you report a bug with your project (or a minimal version) ?
> It would help me a lot to reproduce that exception.
>
> Best regards,
>
> William
>
> Andy Carpenter a
Previous Topic:GraBaTs Tool Contest on model transformation: Call for Cases
Next Topic:[ATL] pathmap access for Profiles
Goto Forum:
  


Current Time: Fri Dec 27 04:12:59 GMT 2024

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

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

Back to the top