Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Using collection in an imperative block section
Using collection in an imperative block section [message #53488] Thu, 19 July 2007 14:18 Go to next message
Eclipse UserFriend
Originally posted by: mefloricel.yahoo.com

Hello,

In an ATL transformation can I use Collection in an imperative block,
things like :

helper def : listClass : Sequence(UML!Class) = Sequence {};

and then use them during the transformation to memorise elements, like :

do
{
thisModule.listClass <- thisModule.listClass -> append(ruleClass);
}


or like

do
{
thisModule.listClass -> append(ruleClass);
}


where ruleClass is a UML!Class.

I've tried both variants and it doesn't seems to work.

Do you know where I could find more documentation or examples on the
imperative of ATL?

Thank you!

Best regards,

Flori
[atl] Re: Using collection in an imperative block section [message #53647 is a reply to message #53488] Thu, 19 July 2007 21:27 Go to previous messageGo to next message
Jean Bezivin is currently offline Jean BezivinFriend
Messages: 38
Registered: July 2009
Member
dear Flori,

Please remember to use the [atl] prefix in your posts.
We are going to have soon other components in this news group.

Best regards,

Jean


"Flori Glitia" <mefloricel@yahoo.com> a
Re: Using collection in an imperative block section [message #54023 is a reply to message #53488] Fri, 20 July 2007 12:07 Go to previous message
Eclipse UserFriend
Originally posted by: Hugo.Bruneliere.univ-nantes.fr

Flori Glitia a écrit :
> Hello,
>

Hi Flori,

> In an ATL transformation can I use Collection in an imperative block,
> things like :
>
> helper def : listClass : Sequence(UML!Class) = Sequence {};
>
> and then use them during the transformation to memorise elements, like :
>
> do
> {
> thisModule.listClass <- thisModule.listClass -> append(ruleClass);
> }
>

Have you already tried to do something like this:
do {
thisModule.listClass <- thisModule.listClass->union(Sequence{ruleClass});
}
>
> or like
>
> do
> {
> thisModule.listClass -> append(ruleClass);
> }
>
>
> where ruleClass is a UML!Class.
>
> I've tried both variants and it doesn't seems to work.
>
> Do you know where I could find more documentation or examples on the
> imperative of ATL?
>
> Thank you!
>
> Best regards,
>
> Flori
>

Best regards,

Hugo

--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
Previous Topic:[ATL]Problem in run ATL standalone
Next Topic:[ATL] model modification possible?
Goto Forum:
  


Current Time: Fri Apr 26 23:43:14 GMT 2024

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

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

Back to the top