Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Metamodel constraints in ATL HOT
Metamodel constraints in ATL HOT [message #1752101] Wed, 18 January 2017 18:57 Go to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi all,

I'm writing a higher order transformation that takes a UML metamodel as input and provides an ATL transformation as output. The output transformation should verify either a model conforms to the metamodel (input of the HOT) so I need to access the metamodel constraints in OCL.

Please, does someone know how to access the metamodel constraints in a ATL? For example, for the class diagram metamodel, if a constraint asserts that two classes cannot have the same name, an ATL helper in this form should be created in the output transformation :

helper context CD!Class def: existSameName() : Boolean =
-- verification of the constraint

I hope my problem is clear. Thank you very much!

Meriem

[Updated on: Sun, 22 January 2017 12:58]

Report message to a moderator

Re: Metamodel constraints in ATL HOT [message #1752330 is a reply to message #1752101] Sat, 21 January 2017 17:33 Go to previous messageGo to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Anyone can help please !
Re: Metamodel constraints in ATL HOT [message #1752435 is a reply to message #1752330] Mon, 23 January 2017 17:56 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
You should look in your metamodel where OCL constraints are stored? You don't have a package OCL in UML metamodel like ATL has?
Re: Metamodel constraints in ATL HOT [message #1752517 is a reply to message #1752435] Tue, 24 January 2017 16:17 Go to previous messageGo to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
No, there isn't a package OCL in the UML metamodel. There is just text expressions embedded within classes. I want my OCL expressions to conform to the OCL metamodel in order to analyze them and apply some changes. The problem is that I don't know how to extract or reference a constraint for a given element in ATL.
Re: Metamodel constraints in ATL HOT [message #1753100 is a reply to message #1752517] Wed, 01 February 2017 20:15 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

In that case, you will have to invoke the Eclipse OCL parser manually (OCLHelper?) on each OCL text snippet embedded in the UML model. EMFTVM allows you to invoke Java methods from your transformation.

Cheers,
Dennis
Re: Metamodel constraints in ATL HOT [message #1753229 is a reply to message #1753100] Thu, 02 February 2017 19:15 Go to previous message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi Dennis,

Thank you for your response. Is it the case if I use a Ecore metamodel with OCL constraints using OCLinEcore editor? Should I parse the OCL constraints? I'm confused about the solution to take.
Previous Topic:Meta model transformation from one XSD source
Next Topic:Empty XMI when running a transformation from an eclipse plugin
Goto Forum:
  


Current Time: Tue Apr 23 07:42:31 GMT 2024

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

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

Back to the top