Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Issue with matching non related targets.
[ATL] Issue with matching non related targets. [message #105736] Wed, 27 May 2009 12:29 Go to next message
Eclipse UserFriend
Originally posted by: amehmood.sophia.inria.fr

Hi All,

I have got a problem, which i suppose is do-able in ATL. I have UML as
input source model and output is a custom metamodel myML. I have two
rules, mapping UML components and UML classes

rule component {
from u : UML2!Component
to v : myML!ComponentType
(name<-u.name,
,absif<-atype
--NEXT IS THE LINE THAT I WANT TO CORRECT.
,busif<-thisModule.btype)
,atype:myML!AbstractType--(blah blah blah)
}

rule class {
from s : UML2!NamedElement
to t : myML!InterfaceType
(name<-s.name
,port<-prt)
,prt:myML!PortType--(blah blah blah)
,btype:myML!BusType--(blah blah blah)
}

I want that the target of component rule can use one of the targets from
the class rule...But I must not use the implicit mapping between
component and class, as there is not direct link between the two. and
secondly, the class rule is referenced else where also..... I want a
direct mapping of 'busif' with the 'btype' where btype is mapped with
uml2 class.

I thought that it can be done some way with the 'resolveTemp' thing, but
i couldn't found it. Plz do reply, it will help many others in future also.

Regards,

-aamir-
Re: [ATL] Issue with matching non related targets. [message #106221 is a reply to message #105736] Mon, 08 June 2009 13:37 Go to previous message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050801080501060902090101
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Aamir,

Yes, you could solve your problem by using resolveTemp instruction.
You should write something like this: thisModule.resolveTemp(
u.linkToUMLNamedElement,'btype') -- where u.linkToUMLNamedElement is the
link to the corresponding UML class

You can find more details on resolveTemp here:
http://wiki.eclipse.org/index.php?title=ATL/User_Guide&s ection=30#The_ATL_Module_data_type

Regards,
Freddy.

Aamir a
Previous Topic:Float and Double
Next Topic:[ATL] two questions
Goto Forum:
  


Current Time: Thu Sep 26 06:11:21 GMT 2024

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

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

Back to the top