Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 371024

Summary: Integration of OCL pivot meta model with EMF Validation Framework
Product: [Modeling] OCL Reporter: Max Bureck <max.bureck>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: ed
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Constraint provider for complete OCL files
none
Example plugin making use of the OCL constraint provider none

Description Max Bureck CLA 2012-02-08 18:37:38 EST
Build Identifier: Version: Indigo Service Release 1 Build id: 20110916-0149

It looks like the current implementation of constraint providers (EMF Validation Engine) for OCL are not based on the OCL pivot meta model. As side product of one of our projects at Fraunhofer FOKUS we created an implementation of a constraint provider, loading complete OCL files with the pivot meta model and registering the containing constraints. We would like to contribute the code to the OCL implementation. So we can build on top of an official Eclipse implementation and duplicate implementation efforts by implementing the same thing at FOKUS and Eclipse can be avoided.
This is a first implementation, based on the code of the CompleteOCLEObjectValidator (EValidator) and contains several TODO tags, where it should be checked if better solutions are possible.
There is currently no license information provided with the code, we would (of course) provide the code under the EPL.
We also provide an example plugin showing how the constraint provider can be used.

Reproducible: Always
Comment 1 Max Bureck CLA 2012-02-08 18:38:35 EST
Created attachment 210765 [details]
Constraint provider for complete OCL files
Comment 2 Max Bureck CLA 2012-02-08 18:39:33 EST
Created attachment 210766 [details]
Example plugin making use of the OCL constraint provider
Comment 3 Ed Willink CLA 2012-02-09 02:39:58 EST
Thank you for your interest. There are unfortunately a couple of problems.

a) The pivot is current in examples plugins, and will not be promoted until Kepler, so no code dependent on it can be non-examples. The Pivot APIs are not stable and while the model is close to being UML-aligned, there is a bit more work to be done.

b) Currently EMFv depends on OCL rather than OCL on EMFv, so any contribution using EMFv should be to the OCL extension of EMFv. 

I have previously offered to take the OCL parts of EMFv, EMFq into MDT/OCL since they are small and awkward for the relevant teams to support now that Christian Damus is no longer the committer for all relevant projects.

It seems that in the short term an o.e.o.examples.pivot.validator plugin could provide all the EMFv (and EMFq) OCL functionality for the pivot model. This could be promoted to o.e.o.pivot.validator along with the pivot for Kepler.

I'm currently working hard to get all the UML-alignment and OCL-driven WFR validation in place, so additional pivot dependencies are not high on my priority list for Juno.

If you are able to assist in creating the full o.e.o.examples.pivot.validator plugin then it could happen, I might finally understand how an added layer on top of OCL is useful, and it would be maintained along with the OCL code base.