Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] ArrayStoreException when ->collect()ing the result of a lazy rule returning several element
[ATL] ArrayStoreException when ->collect()ing the result of a lazy rule returning several element [message #493794] Wed, 28 October 2009 02:06
Nuno Correia is currently offline Nuno CorreiaFriend
Messages: 2
Registered: October 2009
Junior Member
Hi everybody,

I'm applying a lazy rule in a ->collect() call of a binding for a sequence of objects, and the call causes a java.lang.ArrayStoreException when I formulate the rule like this (assume the binding shown corresponds to a containment).
lazy rule s2t {
from
  s_a: s!A
to
  t_a: t!A ( ... )
  t_b: t!B ( ...,
    my_t_a <- t_a
  )
}


That is, the rule should create two target elements t_a and t_b, the latter containing the former, and t_as should be contained in a collection of target element of the calling rule. In my concrete case, since Java was throwing ArrayStoreException I figured the problem would be that ATL did not infer which of the target elements the collect call should use, or similar. So I added a
do { t_b; }
statement, but this did not help.

I believe I could solve this by factoring out the other target patterns to other lazy rules which I'd call in the bindings of "t_b," but shouldn't this formulation work as it is?

BR,
Nuno

[Updated on: Wed, 28 October 2009 02:08]

Report message to a moderator

Previous Topic:[ATL] Lazy Rule Filter Not Working
Next Topic:EDataType
Goto Forum:
  


Current Time: Thu Mar 28 09:16:29 GMT 2024

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

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

Back to the top