Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Using MARTE Profile in ATL
[ATL] Using MARTE Profile in ATL [message #82656] Thu, 29 May 2008 13:13 Go to next message
Eclipse UserFriend
Originally posted by: amehmood.sophia.inria.fr

Hi all,

I have applied MARTE Profile on a model which i am using as the ATL input.
I try to get the UML Elements which have specific stereotype from MARTE,
applied on them. But it doesn't work, but when i try it with my own
profile/stereotyes, it works.

I have seen some codes, using the line 'uses MARTE' but i don't know which
library to add and from where? Any hints comments r highly appreciated.

Regards,
-aamir-

THE CODE:
-- @atlcompiler atl2006
module UML2TEST; -- Module Template
create OUT : UML2 from IN : UML2 , IN_PRO : UML2;
uses MARTE;

------------------------------------------------------------ ------------------
-- Checks if the given stereotype is applied or not.
helper context UML2!Element def : isStereotypeApplied(name :
String):Boolean =
not self.getAppliedStereotypes()->select(p | p.name = name).isEmpty();

------------------------------------------------------------ ------------------
rule processor {
from s : UML2!Element (s.isStereotypeApplied('HwProcessor'))
to t : UML2!Class(name <- s.name)
}
Re: [ATL] Using MARTE Profile in ATL [message #83455 is a reply to message #82656] Mon, 02 June 2008 14:50 Go to previous message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Got the answer, Just to help the guys dealing with the same problem in
future, its the issue regarding the ATL configuration and now the
syntax. Just go to the run menu and there, where u specify the UML
Registry uri, make sure that the relevant UML MARTE package is present.
I don't know how to install it but when i updated the MARTE plugins it
worked. I could see the 'HwComputing package.

Regards,
-aamir-






Aamir wrote:
> Hi all,
>
> I have applied MARTE Profile on a model which i am using as the ATL
> input. I try to get the UML Elements which have specific stereotype from
> MARTE, applied on them. But it doesn't work, but when i try it with my
> own profile/stereotyes, it works.
>
> I have seen some codes, using the line 'uses MARTE' but i don't know
> which library to add and from where? Any hints comments r highly
> appreciated.
>
> Regards,
> -aamir-
>
> THE CODE:
> -- @atlcompiler atl2006
> module UML2TEST; -- Module Template
> create OUT : UML2 from IN : UML2 , IN_PRO : UML2;
> uses MARTE;
>
> ------------------------------------------------------------ ------------------
>
> -- Checks if the given stereotype is applied or not.
> helper context UML2!Element def : isStereotypeApplied(name :
> String):Boolean =
> not self.getAppliedStereotypes()->select(p | p.name = name).isEmpty();
>
> ------------------------------------------------------------ ------------------
>
> rule processor {
> from s : UML2!Element (s.isStereotypeApplied('HwProcessor'))
> to t : UML2!Class(name <- s.name) }
>
>
Previous Topic:ATL rule transform: output model format
Next Topic:[ATL] using getters and setters of static profiles in ATL code
Goto Forum:
  


Current Time: Wed Apr 24 21:36:05 GMT 2024

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

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

Back to the top