OCL (Object Constraint Language)

Primary tabs

Eclipse OCL is an implementation of the Object Constraint Language (OCL) OMG standard for EMF-based models.

Classic OCL Ecore/UML

The Classic core OCL component provides the following capabilities to support OCL integration:

  • Defines APIs for parsing and evaluating OCL constraints and queries on Ecore or UML models.
  • Defines Ecore and UML implementations of the OCL abstract syntax model, including support for serialization of parsed OCL expressions.
  • Provides a Visitor API for analyzing/transforming the AST model of OCL expressions.
  • Provides an extensibility API for clients to customize the parsing and evaluation environments used by the parser.

The accompanying examples provide:

  • A Console for interactive evaluation of OCL expression on models.
  • (Indigo) An Impact Analyzer to support analysis and optimised re-evaluation.

The core OCL parser is generated by the LALR Parser Generator, a SourceForge project, licensed under the EPL v1.0. Download it from the LPG home page. This site includes the generator executable required to regenerate the parser code.

Unified Pivot OCL

The Pivot OCL prototypes resolution of many oroblems in the OMG 2.4 specification.

  • An Xtext editor for OCL expressions (used by Papyrus and the Console).
  • An Xtext editor for OCL documents complemementing meta-models (Complete OCL).
  • An Xtext editor for OCLinEcore - OCL embedded in Ecore.
  • An Xtext editor for the OCL 'Standard' Library model.
  • A UML-aligned Unified or Pivot OCL meta-model supporting templates and reflection.
  • An OCL evaluator exploiting the extensible OCL library model.

The accompanying examples provide:

  • An Xtext Console for interactive evaluation of OCL expression on models.
  • Extensible direct OCL to Java code generation
  • A Validity View for detailed Constraint/ModelElement validity visualization
  • Extensible OCL debugger
This project is part of Oxygen, Neon, Mars, Luna, Kepler, Juno, Indigo, Helios, Galileo, and Ganymede.
Latest Releases: 

From June 23rd, 2009 to June 21st, 2017

NameDateReview
6.3.0 Oxygen2017-06-21
6.2.0 Neon++ New!2016-07-24Review
6.1.0 Neon2016-06-22Review
6.0.0 Mars2015-06-24Review
5.0.02014-06-25Review
4.1.02013-06-26Review
4.0.02012-06-27Review
3.1.02011-06-22Review
3.0.02010-06-23
1.3.02009-06-23Review
Contribution Activity: 
Commits on this project (last 12 months).