Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] get Source from Target
[ATL] get Source from Target [message #62834] Thu, 27 September 2007 14:39
Javi is currently offline JaviFriend
Messages: 23
Registered: July 2009
Junior Member

There are ways to get the target from the source (e.g. in the assignation
of the target part of a rule, or with thisModule.resolveTemp()).
thisModule.resolveTemp() crashes when the element cannot be resolved
because it has not been transformed.

1. Is there any function that makes the opposite, that is, to get the
source from the target?
2. In case not, is there a way to know if thisModule.resolveTemp() would
return a value prior the crash?

What I am trying to achieve is to assign from a collection only the
elements that have been transformed by a rule.

package MM {
class A {
reference collection[*] ordered container : B;
class B {
attribute name : String;

from in : MM!A
to out : MM!A (
collection <- a.collection
-- But I want only the elements matched by the following rule

from in : MM!B (condition-to-be-included-in-the-transformation)
to out : MM!B (
name <-

If 1 or 2 would be possible, I could use (in my particular transformation)
something like
collection <- MM.allInstancesFrom('OUT')
-> collect(i | thisModule.invResolveTemp(i))

I know I could move the condition to the first rule and use a lazy rule
instead of the second. However, I would like to leave the second as normal
matched rule. (This is a simplified example)
Previous Topic:Documentation
Next Topic:[ATL] Launch programmatically
Goto Forum:

Current Time: Mon Aug 15 15:20:00 GMT 2022

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

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

Back to the top