Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] how to navigate in 2 source models of the same metamodel?
[ATL] how to navigate in 2 source models of the same metamodel? [message #108776] Mon, 27 July 2009 14:59 Go to next message
Eclipse UserFriend
Originally posted by: mhe09002.student.mdh.se

Hi,
I want to merge two models of the same metamodel. So my header would lool
like this:

module MM_MM2mergedMM; -- Module Template
create OUT : MM from IN1 : MM, IN2 : MM;

Now I want to build rules, which check, if an Element, which exists in
model "IN1" does also exist in model "IN2" or is even changed there. But
since a can only have a single source element, it is quite hard to
reference to an comparing elemnt in the other model.
Maybe someone has an idea or - what would be great - an information source
different then the Eclipse-Wiki-ATL-Documentation (I read through this
one),
regards,
mats
Re: [ATL] how to navigate in 2 source models of the same metamodel? [message #350235 is a reply to message #108776] Tue, 28 July 2009 09:15 Go to previous message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

mats a écrit :
> Hi,
> I want to merge two models of the same metamodel. So my header would
> lool like this:
>
> module MM_MM2mergedMM; -- Module Template
> create OUT : MM from IN1 : MM, IN2 : MM;
>
> Now I want to build rules, which check, if an Element, which exists in
> model "IN1" does also exist in model "IN2" or is even changed there. But
> since a can only have a single source element, it is quite hard to
> reference to an comparing elemnt in the other model.

You can write a rule like that (if I understand well):

rule sample {
from
a : MM!Element in IN1,
b : MM!Element in IN2 (
--write here a condition to compare a and b,
-- e.g.: a.name = b.name
)
...

> Maybe someone has an idea or - what would be great - an information
> source different then the Eclipse-Wiki-ATL-Documentation (I read through
> this one),

It seems that there is no section about the "in" keyword", I will try to
update the doc asap.

Best Regards,

William

> regards,
> mats
>
Previous Topic:[Proposal] EMF Tiger and EMF Refactor
Next Topic:[QVTO] using QVTO on dynamic EMF models
Goto Forum:
  


Current Time: Thu Mar 28 18:00:52 GMT 2024

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

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

Back to the top