Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]on defining source and domains with more than one element
[ATL]on defining source and domains with more than one element [message #25089] Fri, 23 March 2007 15:39 Go to next message
Eclipse UserFriend
Originally posted by: maher.lamari.lip6.fr

Hi,

I would like to know if the current version of ATL supports defining a
source domain (the from part) with more than one element as in the following
relation which defines a class and an attribute in the source domain.

rule Class2Table {
from

c : UMLClass!Class (isPersistent) , a : UMLClass!Attribute

to

out : RDB!Table (

name <- c.name

)

}



Thanks in advance,



Maher
Re: [ATL]on defining source and domains with more than one element [message #25132 is a reply to message #25089] Fri, 23 March 2007 16:51 Go to previous message
Eclipse UserFriend
Originally posted by: marcos.didonet-del-fabro.univ-nantes.fr

Hi,

Yes, ATL 2006 supports matching several input elements. We have been using this feature
for a while to develop matching transformations that produce weaving models.

However, the guard should be unique for both elements, so you should rewrite your rule
like that:


rule Class2Table {
from
c : UMLClass!Class , a : UMLClass!Attribute (c.isPersistent)
....

This rule will match all classes and attributes of the model, not only the attributes
contained in class "c".


Don't forget to put the following annotation in the first line of your ATL transformation:
-- @atlcompiler atl2006


Regards,

Marcos.

Maher wrote:
> Hi,
>
> I would like to know if the current version of ATL supports defining a
> source domain (the from part) with more than one element as in the following
> relation which defines a class and an attribute in the source domain.
>
> rule Class2Table {
> from
>
> c : UMLClass!Class (isPersistent) , a : UMLClass!Attribute
>
> to
>
> out : RDB!Table (
>
> name <- c.name
>
> )
>
> }
>
>
>
> Thanks in advance,
>
>
>
> Maher
>
>
Previous Topic:[ATL] Multiple Input Models Issue
Next Topic:[ATL] sequence & collect
Goto Forum:
  


Current Time: Tue Mar 19 11:38:02 GMT 2024

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

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

Back to the top