Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Combining values from several input models
[ATL] Combining values from several input models [message #108210] Fri, 10 July 2009 17:44 Go to next message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
I have three input models conforming to the following ecore metamodels;
MMA, MMB and MMC:

- MMA consists of two concepts: X and A where X has a containment
reference to A and an int attribute AA.

- MMB consists of concepts X and B where X contains a reference to B and
an int attribute BB.

- MMC has the concepts X and C, where X is composed of C. In addition, X
has an int attribute named CC.

- The output metamodel MMO has the concepts X, A, B and C, where X is
composed of A, B and C.

The question is; is it possible to transform input models conforming to
the metamodels MMA, MMB and MMC with objects (x a, aa : 3), (x b, bb : 4)
and (x c, cc : 5) in such a way that the output model conforming to MMO
yields entities x, a, b, c, where x is composed of a, b and c and contains
the attributes aa, bb and cc with values 3, 4 and 5 using ATL? In other
words; X in the output model is build by combining the values for X from
the three input models.

You probably need to evaluate input models somehow. Anyone who can
illustrate this with some ATL rules?

Any help is highly appreciated! Thanks! :)
Re: [ATL] Combining values from several input models [message #108488 is a reply to message #108210] Mon, 20 July 2009 21:21 Go to previous messageGo to next message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
Is there nobody who has any input on this? For instance, if this is at all
possible in ATL?

Thanks!
Re: [ATL] Combining values from several input models [message #453245 is a reply to message #108488] Sat, 01 August 2009 15:13 Go to previous messageGo to next message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
No suggestions on this?

The main problem seems to be that only one source model element may be
addressed in matched rules. Consequently, it doesn't seem possible to
initialise one target model class with features from several input model
classes (spread across several input models).

Someone who knows how this can be done? In a figurative sense, I would lik
to do this:

rule A
{
from
a:MetamodelA!ClassA,

b:MetamodelB!ClassA,

c:MetamodelC!ClassA

to d:MetamodelD!ClassA
(
featureA <- a.featureA
featureB <- b.featureB
featureC <- c.featureC
)
}

Any ideas?
Re: [ATL] Combining values from several input models [message #467836 is a reply to message #453245] Mon, 03 August 2009 05:51 Go to previous messageGo to next message
venkatesh  is currently offline venkatesh Friend
Messages: 41
Registered: July 2009
Member
Hi ,
when u create ATL file

create MetaD : MetamodelD from MetaA : MetamodelA,MetaB : MetamodelB,MetaC
: MetamodelC;


then create a rule

rule A {
from
a:MetamodelA!ClassA,b:MetamodelB!ClassA,c:MetamodelC!ClassA
to
to d:MetamodelD!ClassA
(
featureA <- a.featureA
featureB <- b.featureB
featureC <- c.featureC
)

}

Please refer this atl file (TypeA2TypeB_v3_secondStep.atl) in the
following example which has the same scenario

http://www.eclipse.org/m2m/atl/atlTransformations/SideEffect /SideEffect.zip

regards,
venkatesh
Re: [ATL] Combining values from several input models [message #479086 is a reply to message #467836] Sun, 09 August 2009 00:08 Go to previous message
Tee Bee is currently offline Tee BeeFriend
Messages: 18
Registered: July 2009
Junior Member
Thanks very much!

In fact, the only reason why I didn't try several model elements in the
source pattern is because the syntax for matched rules does not allow it
according to the ATL manual I have (page 37). The only manual I've found
is version 0.7 from 2006. Apparently, this manual describes an older
version of ATL.

Is there a new manual available for ATL 3.0?
Previous Topic:[QVTO] Model elements disappear
Next Topic:[QVTO] Where to find the log output?
Goto Forum:
  


Current Time: Thu Apr 25 15:57:11 GMT 2024

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

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

Back to the top