Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » OCLinEcore and ATL
OCLinEcore and ATL [message #1753357] Sat, 04 February 2017 15:21 Go to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi,

Starting from an Ecore metamodel with OCL constraints (written in OCLinEcore editor), I should generate an ATL transformation that contains the OCL constraints translated into ATL.

I don't know if it is convenient to use a ATL higher order transformation or Java to generate my ATL file. Is there any documentation or examples that treat/analyze Ecore metamodel with OCL constraints?

Thank you

Regards

Meriem

Re: OCLinEcore and ATL [message #1753360 is a reply to message #1753357] Sat, 04 February 2017 17:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5834
Registered: July 2009
Senior Member
Hi

"I should generate an ATL transformation" makes no sense. Perhaps you are misunderstanding English's could/should/would/...

What do you actually want to do? What did you try to do? What did you fail to observe?

OCL enriches a Java-defined model, perhaps with interpreted, perhaps with CGed validations. These should be just as irrelevant to ATL as manually defined Java validations.

There are tutorials on OCL, OCLinEcore.

If you want to generate a transformation from a transformation, I would recommend that you use a language whose metamodel and semantics are better defined. Perhaps QVTo, perhaps QVTr which is becoming increasingly credible. Oxygen M5 even has a graphical syntax for it.

Regards

Ed Willink
Re: OCLinEcore and ATL [message #1753362 is a reply to message #1753360] Sat, 04 February 2017 18:21 Go to previous messageGo to next message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi Ed

Yes, perhaps I had to use "would" instead of "should". Please excuse my poor English.

There are tutorials on OCLinEcore that show how to create metamodels and model instances, and how to validate them, etc. But I'm interested only at the use of the metamodels as input of a HOT.

I try to generate a ATL transformation from a Ecore metamodel (using a higher order transformation. In preference : written in ATL). What I fail to do, is to access the OCL constraints embedded in the metamodel in order to translate them into equivalent ATL helpers.

I asked about the use of Java because Java code that exploits the embedded OCL can be generated and perhaps, that can help translating the constraints. I'm just lost in front of several possibilities and I wish someone that has an experience can lead me to the more suitable solution.

Thanks for your suggestions

Meriem


Re: OCLinEcore and ATL [message #1753365 is a reply to message #1753362] Sat, 04 February 2017 21:00 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5834
Registered: July 2009
Senior Member
Hi

If you are in the purely modeling world, Java is irrelevant (apart from speed optimizations.)

The OCL embedded in Ecore is embedded as EAnnotations. Read the tutorial, or the XML. Within an EAnnotation the OCL is an unparsed text string. If you want an OCL AST, then you can OCL->Save AS->Pivot in the OCLinEcore editor.

Regards

Ed Willink
Re: OCLinEcore and ATL [message #1753379 is a reply to message #1753365] Sun, 05 February 2017 11:12 Go to previous message
meriem lahr is currently offline meriem lahrFriend
Messages: 31
Registered: March 2013
Member
Hi

Ok. Thank you very much and sorry for not being clear enough.

Regards

Meriem
Previous Topic:[CDO] - PostgreSQL ClassLoader issue
Next Topic:[CDO] View invalidation causes severe problems with Adapters
Goto Forum:
  


Current Time: Thu Apr 19 18:01:10 GMT 2018

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

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