Skip to main content



      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] Tue, 27 October 2009 22:06
Eclipse UserFriend
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: Tue, 27 October 2009 22:08] by Moderator

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


Current Time: Fri Jul 04 05:22:22 EDT 2025

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

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

Back to the top