Overview

Overview

What is OCL?
Getting Started
How Does It Work?
Eclipse OCL is Extensible
Who Uses OCL and Eclipse OCL?
Who is Behind Eclipse OCL?
Table of Contents
Glossary

For a quick demonstration of OCL enrichment of an Ecore meta-model with computed constraints go to Getting Started.

What is OCL?

  • EMF is Modeled Structure

The Eclipse Modeling Framework ( EMF) supports the definition of structural meta-models and the subsequent use of models conforming to these meta-models. EMF also supports generating of Java code to represent the meta-models. Additional Java code can be provided to add behavior to the structural meta-models.

  • OCL is EMF and Modeled Behavior

OCL provides a modeling language that allows the behavior to be embedded within the structural meta-models or provided as a complement to those meta-models. As a modeling language, OCL understands the models and so OCL code is much more compact than the equivalent Java. OCL code can be statically checked, where as the corresponding Java code often uses reflection and so cannot.

Eclipse OCL is an implementation of the OMG OCL 2.3 specification for use with Ecore and UML meta-models.