Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » "oclAsType" in ATL
"oclAsType" in ATL [message #1754190] Wed, 15 February 2017 07:37 Go to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi,

I want to know what is the equivalent of "OclAsType" in ATL?
I see in some transformation, select and oclIsKindOf are used.
In the figure below, I wanna to access "name" attribute of "SubSubElement" class.

index.php/fa/28471/0/

when I write the below code I have an error. What can I do?

s : MM!Exp
.
.
.
class <- s.ref.oclIsKindOf(MM!SubElement).oclIsKindOf(MM!SubSubElement).name
  • Attachment: sub.JPG
    (Size: 17.20KB, Downloaded 430 times)


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

[Updated on: Wed, 15 February 2017 07:42]

Report message to a moderator

Re: "oclAsType" in ATL [message #1754236 is a reply to message #1754190] Wed, 15 February 2017 15:52 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

Try using oclAsType rather than oclIsKIndOf twice.

Regards

Ed Willink
Re: "oclAsType" in ATL [message #1754237 is a reply to message #1754236] Wed, 15 February 2017 16:02 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Thanks for your response,
The operation oclAsType() defined by OCL are currently not supported by the ATL engine [1].

[1] https://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Language


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: "oclAsType" in ATL [message #1754253 is a reply to message #1754237] Wed, 15 February 2017 17:44 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

Ow! The operations oclIsNew() and oclAsType() defined by OCL are currently not supported by the ATL engine.

Omitting oclIsNew() is very understandable, it is very hard and very costly to support and I've yet to want to use it. Omitting oclAsType() is very unfortunate. It is very useful and very easy to implement. I see no Bugzilla requesting it.

I guess that the justification is that a declaration transformation language does pattern matching and so assignments do oclAsType automatically or fail.

Regards

Ed Willink
Previous Topic:Assignment statement in ATL helpers
Next Topic:"Binding" and "BindingStat" in ATL
Goto Forum:
  


Current Time: Sun Jul 21 16:57:06 GMT 2024

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

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

Back to the top