[ATL] ArrayStoreException when ->collect()ing the result of a lazy rule returning several element [message #493794] |
Wed, 28 October 2009 02:06 |
Nuno Correia 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 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
|
|
|
Powered by
FUDForum. Page generated in 0.02946 seconds