Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Problem with navigating in ATL
Problem with navigating in ATL [message #1753939] Mon, 13 February 2017 08:05 Go to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
In other words, I have a problem with navigating in ATL. In the figure below,
1. How can I reach "D" from "B"?
2. How can I reach "targets" from "source"?
3. How can I navigate from "C" to "A"?
4. if I have a class "E" which is inherited from "A", How can I navigate from "C" to "E"?
index.php/fa/28445/0/
  • Attachment: image.jpg
    (Size: 13.21KB, Downloaded 299 times)


Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Tue, 14 February 2017 16:35]

Report message to a moderator

Re: Problem with navigating in ATL [message #1754047 is a reply to message #1753939] Tue, 14 February 2017 07:18 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Can't any one help me?

Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: Problem with navigating in ATL [message #1754120 is a reply to message #1754047] Tue, 14 February 2017 15:53 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
1.
B.refImmediateComposite().body

2.
B.refImmediateComposite().target

3. I don't see the relation between them, except the Inheritance. And C can't have reference or be referenced in your model, he has no relations.
4. Same problem than 3.

edit: your problem is probably more related with OCL/Class Diagram than ATL Wink

[Updated on: Tue, 14 February 2017 15:58]

Report message to a moderator

Re: Problem with navigating in ATL [message #1754136 is a reply to message #1754120] Tue, 14 February 2017 16:44 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Thanks for your kind help.
I asked my question in OCL forum before. They use oclAsType for question "3" that doesn't support in ATL. I want to know what is equievalent of "oclAsType" in ATL?

and also I have another question "How can I access 'G' from 'B'?"
Should I write "B.refImmediateComposite().refImmediateComposite()" or another thing?
(I edited my old image)


Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Tue, 14 February 2017 17:17]

Report message to a moderator

Re: Problem with navigating in ATL [message #1754146 is a reply to message #1754136] Tue, 14 February 2017 17:42 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
From what I know of ATL, the oclAsType doesn't have equivalent.

"B.refImmediateComposite().refImmediateComposite()" must be fine in that case.
Re: Problem with navigating in ATL [message #1754147 is a reply to message #1754146] Tue, 14 February 2017 17:57 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Many thanks.
and as a final question, if "A" has more than one composition relation with elements, what change occurs? for example, in below picture, we want arrive "G" from "B".
it seems "B.refImmediateComposite().refImmediateComposite()" can not distinguish between "G" and "E".
index.php/fa/28449/0/
  • Attachment: image.jpg
    (Size: 15.08KB, Downloaded 284 times)


Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Tue, 14 February 2017 18:00]

Report message to a moderator

Re: Problem with navigating in ATL [message #1754148 is a reply to message #1754147] Tue, 14 February 2017 18:05 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
An element can be contain only by one container. So you can have only E -> A -> B (and there is no G to reach), or G -> A -> B.
You should search for class diagram relationships if you have trouble with them.
Re: Problem with navigating in ATL [message #1754188 is a reply to message #1754148] Wed, 15 February 2017 07:21 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
But I see this type of composition in metamodels!

Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: Problem with navigating in ATL [message #1754267 is a reply to message #1754188] Wed, 15 February 2017 22:29 Go to previous message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
Yes and it's fine in metamodel. I was talking about instantiated models. An instance of A can only be referred by a G or a E at once.

But in case you have simple relation of reference between yours objects, you can do something like :
G.allInstances()->select(G|G.g=A1) where A1 is referring to your A obtained by B.refImmediateComposite() for example.
Previous Topic:two parts metamodel
Next Topic:error in ATL transformation
Goto Forum:
  


Current Time: Fri Apr 19 06:30:37 GMT 2024

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

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

Back to the top