OCL Overview

The OCL Parser/Interpreter provides an implementation of the Object Constraint Language 2.0 specification for EMF-based metamodels and models. It offers OCL constraint and query parsing and evaluation, model-based validation, and provides an infrastructure for content assist in textual editors.

The following features are supported in the current version:

The above constructs are supported by the parser for parsing and for evaluation, with the exception of the oclIsNew() operation and message expressions. All of the above are supported for both Ecore and UML models. The following are supported by default for UML (both in parsing and evaluation):

The following features are provided in addition to the OCL specification:

The OCL implementation is defined in plug-ins for convenient deployment in Eclipse, but as is the case for EMF, it can also be used stand-alone. The plug-ins are partitioned thus:

Please refer to the OCL Interpreter Tutorial for review of the code samples.


Copyright (c) 2000, 2007 IBM Corporation and others. All Rights Reserved.