Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How to right such a rule down (see picture)
[ATL] How to right such a rule down (see picture) [message #546596] Tue, 13 July 2010 14:00 Go to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Hello! I cannot find in any ATL-Sample how must the ATL-rule look like, if I have 2 classes on the Left side and 1 class on the right side?


Here is the description to this transformation:

http://pics.livejournal.com/modeller77/pic/00001z00/s640x480

On the left side we have specobject and spectype (input modell) and on the right side - the Class Attribute (output modell).


Could please someone help me to right the ATL-rule for that transformation?
Thanks.

Alexey
Re: [ATL] How to right such a rule down (see picture) [message #546605 is a reply to message #546596] Tue, 13 July 2010 14:19 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
You can have multiple "from" elements :

from s : MM!A , t : MM!B
Re: [ATL] How to right such a rule down (see picture) [message #546616 is a reply to message #546605] Tue, 13 July 2010 14:48 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Sylvain EVEILLARD wrote on Tue, 13 July 2010 10:19
You can have multiple "from" elements :

from s : MM!A , t : MM!B


Hallo, Sylvain!
Thank you!

U mean like this:


--Rubbish---




?

[Updated on: Tue, 13 July 2010 15:17]

Report message to a moderator

Re: [ATL] How to right such a rule down (see picture) [message #546628 is a reply to message #546616] Tue, 13 July 2010 15:08 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Or, better, like this:

rule SpecGroup2Artefact {
	
	from
	   s: RIF!SPECGROUP
	to
	   t: ISyFMU!ARTIFACT ( 
	      identifier<-s.IDENTIFIER, name <- s.LONGNAME	
	   )
}



?
Re: [ATL] How to right such a rule down (see picture) [message #546634 is a reply to message #546616] Tue, 13 July 2010 15:21 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 13/07/2010 16:48, Alexey a écrit :
> Sylvain EVEILLARD wrote on Tue, 13 July 2010 10:19
>> You can have multiple "from" elements :
>>
>> from s : MM!A , t : MM!B
>
>
>
> Thank you!
>
> U mean like this:
>
> rule SpecGroup2Artefact {
>
> from
> s: RIF!SPECGROUP(LONGNAME) t: RIF!SPECGROUP(IDENTIFIER)
> to
> u: ISyFMU!ARTIFACT(name), v: ISyFMU!ARTIFACT(identifier)
> }
>
>
>
> ?
From your initial question, it would be :

rule Spec2Attribute {
from
so : IN!specobject,
sp: IN!spectype
to
attr : OUT!Attribute(
... )
}

--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: [ATL] How to right such a rule down (see picture) [message #548059 is a reply to message #546634] Tue, 20 July 2010 14:38 Go to previous message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Thank you very much, Vincent!
Previous Topic:[QVTO] object creation, using EMF reflection API.
Next Topic:[ATL] A strange console-Message by launching ATL-transformatiom
Goto Forum:
  


Current Time: Fri Mar 29 01:51:39 GMT 2024

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

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

Back to the top