The Core OCL component provides the following capabilities to support OCL integration:
- Defines APIs for parsing and evaluating OCL constraints and queries on EMF 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 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.
The additional OCL Examples and Editors component provides interactive support for OCL:
- Provides an Interactive OCL Console to evaluate queries on models.
- Provides an OCLinEcore Xtext editor for OCL embedded in an Ecore meta-model.
- Provides a CompleteOCL editor for an OCL document complementing a meta-model.
- Provides an EssentialOCL editor for individual OCL expressions.
The grammars for the Xtext-based editors auto-generate ANTLR parsers. In Eclipse OCL 3.0, the ANTLR parsers are used solely within the editors. As from Eclipse OCL 3.1 the Xtext grammars and parsers provide full evaluation and validation capabilities too. Since the Xtext grammars are associated with a re-engineering to support a model-defined standard library and full OMG compliance, the original LPG parser will be increasingly deprecated.
Downloads and Updates
Eclipse OCL Downloads are available via the Project Downloads page.
Eclipse OCL Updates are available at http://download.eclipse.org/modeling/mdt/ocl/updates and from the Modeling category of the main http://download.eclipse.org/releases/kepler/ Update Site. The OCL End User SDK feature supports OCL in conjunction with Ecore or UML meta-models. The OCL Examples and Editors feature additionally provides an IDE comprising Xtext-based editors, an Interactive Console and Debugger.
Eclipse OCL source code is available from git://git.eclipse.org/c/ocl/org.eclipse.ocl.git, http://git.eclipse.org/c/ocl/org.eclipse.ocl.git and github Network. All source projects may be installed by Import...->Team->Team Project Set, then entering http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/plain/releng/org.eclipse.ocl.releng/psfs/ocl-all.psf?h=master as the URL for import. Be patient; the repository clone takes a while, and there are no obvious progress indicators during the third phase while projects are actually created.
If you plan to contribute to Eclipse OCL, please have a look to the project Developer Resources
Documentation, Publications and FAQs
- (OMG) OCL Compliance and (Eclipse) OCL Limitations
- Eclipse OCL Documentation from the Eclipse Help Center
- New and Noteworthy features of the Eclipse OCL releases.
- 6.3/3.7/1.3 Oxygen release (June 2017)
- 6.2/3.6/1.2 Neon++ release (July 2016)
- 6.1/3.6/1.1 Neon release (June 2016)
- 6.0/3.5/1.0 Mars release (June 2015)
- 5.0/3.4 Luna release (June 2014)
- 4.1/3.3 Kepler release (June 2013)
- 4.0/3.2 Juno release (June 2012)
- 3.1 Indigo release (June 2011)
- 3.0 Helios release (June 2010)
- 1.3 Galileo release (June 2009)
- 1.2.0 Ganymede release (June 2008)
- 1.1.0 Europa release (June 2007)
- Customizing OCL Environments
- Evaluating Stereotype Constraints using the Ecore Environment
- OCL Snippets
Releases and Development
You may want to check the New and Noteworthy features of the Eclipse OCL releases.
- OCL 5.0/3.4 Luna Draft Plan
- OCL 4.1/3.3 Kepler Plan
- OCL 4.0/3.2 Juno Plan
- OCL 3.1 Indigo Plan
- OCL 3.0 Helios Plan
- OCL 1.3 Galileo Plan
- R1.2 Plan
- R1.1 Plan
- API Changes made in the Helios Eclipse OCL release.
- API Changes made in the Indigo Eclipse OCL release.
- Deprecations announced in the Juno Eclipse OCL release.
- Limitations of the Ecore/UML bindings and OCL 2.3 compared to the Pivot binding and 'OCL 2.5'.
The remainder of this section has links to pages of interest primarily to those developing the OCL component.
- How to Make and Publish Builds Using Buckminster
- Transition between releases
- Quiet week
- P2 Repositories Organization
- Features Organization
- Issues Documentation