The Eclipse OCL Project provides an implementation of the Object Constraint Language (OCL) OMG standard for EMF-based models.
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.
- 1 Downloads and Updates
- 2 Documentation, Publications and FAQs
- 3 Example Code
- 4 Releases and Development
- 5 Sponsors
- 6 Related Links
Downloads and Updates
Eclipse OCL may be installed directly from the main Eclipse http://download.eclipse.org/releases/photon/ Update Site.
- Help->Install New Software...
- Works with: Photon - http://download.eclipse.org/releases/photon
- Select Modeling->OCL Examples and Editors SDK
or from an OCL-specific site: http://download.eclipse.org/modeling/mdt/ocl/updates. The Eclipse OCL Repositories and Updates for Milestone, Interim and Nightly builds are described in P2 Repositories Organization and retained in accordance with the Retention Policy.
The OCL Examples and Editors SDK feature provides the full IDE comprising Xtext-based editors, Interactive Console, Debugger and Java Code Generator all using the new Unified Pivot -based OCL.
The OCL End User SDK feature provides the Classic OCL support with distinct Ecore and UML APIs.
Eclipse OCL may be installed indirectly by downloading an archive ZIP from Project Downloads and then using the downloaded ZIP as the Works with site for Help->Install New Software...
Eclipse OCL has Open Bugs and a newsgroup or forum. See the OCL Forum Netiquette.
An Eclipse OCL development environment may be created automatically using the OOMPH Eclipse Installer. Follow the OOMPH instructions to first create an Eclipse installation with a Java VM, then invoke File->Import Projects->Oomph->Projects into Workspace->Eclipse Projects->OCL->Development. After a few minutes the required dependencies have been downloaded and a restart is required. Then after a few tens of minutes the required GIT repositories have been cloned and you are ready to go; there should be no errors in the Problems View. You may wish to select Working Sets as the top level elements in the Package Explorer. You may Run->Run Configurations...->JUnit->org.eclipse.ocl.examples.xtext.tests (standalone) to demonstrate that the standard tests are passing.
Alternatively an Eclipse OCL development environment may be created manually using the Eclipse OCL source code 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
- Articles and Presentations
- Latest Eclipse OCL Documentation HTML]
- 2021-12 OCL 6.17/3.19/1.16 Documentation HTML PDF
- 2021-09 OCL 6.16/3.18/1.15 Documentation HTML PDF
- 2021-06 OCL 6.15/3.17/1.14 Documentation HTML PDF
- 2021-03 OCL 6.14/3.16/1.13 Documentation HTML PDF
- 2020-12 OCL 6.13/3.15/1.12 Documentation HTML PDF
- 2020-06 OCL 6.12/3.14.2/1.11 Documentation HTML PDF
- 2020-03 OCL 6.11/3.14.1/1.11 Documentation HTML
- 2019-12 OCL 6.10/3.14/1.10 Documentation HTML
- 2019-09 OCL 6.9/3.13/1.9 Documentation HTML
- 2019-06 OCL 6.8/3.12/1.8 Documentation HTML
- 2018-12 OCL 6.6/3.10/1.6 Documentation PDF
- Photon OCL 6.4/3.8/1.4 Documentation PDF Javadoc
- Oxygen OCL 6.3/3.7/1.3 Documentation PDF Javadoc
- Neon OCL 6.1/3.6/1.1 Documentation PDF Javadoc
- Mars OCL 6.0/3.5/1.0 Documentation PDF Javadoc
- Luna OCL 5.0/3.4 Documentation PDF Javadoc
- New and Noteworthy features of the Eclipse OCL releases.
- 6.17/3.17.0/1.17 2022-03 release (March 2022)
- 6.17/3.17.0/1.17 2021-12 release (December 2021)
- 6.16/3.16.200/1.16 2021-09 release (September 2021)
- 6.15/3.16.100/1.15 2021-06 release (June 2021)
- 6.14/3.16/1.14 2021-03 release (March 2021)
- 6.13/3.15/1.13 2020-12 release (December 2020)
- 6.12/3.14.2/1.12 2020-06 release (June 2020)
- 6.11/3.14.1/1.11 2020-03 release (March 2020)
- 6.10/3.14/1.10 2019-12 release (December 2019)
- 6.9/3.13/1.9 2019-09 release (September 2019)
- 6.8/3.12/1.8 2019-06 release (June 2019)
- 6.7/3.11/1.7 2019-03 release (March 2019)
- 6.6/3.10/1.6 2018-12 release (December 2018)
- 6.5/3.9/1.5 2018-09 release (September 2018)
- 6.4/3.8/1.4 Photon release (June 2018)
- 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)
- Javadoc API Reference
- Frequently Asked Questions
- (OMG) OCL Compliance and (Eclipse) OCL Limitations
- 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.
- Deprecations announced in the Oxygen Eclipse OCL release.
- Deprecations announced in the Photon Eclipse OCL release.
- Limitations of the Ecore/UML bindings and OCL 2.3 compared to the Pivot binding and 'OCL 2.5'.
The standard Eclipse API tooling is used to ensure stability of the Classic OCL plugins. Since very little development of Classic OCL occurs, maintaining stability is not too difficult.
The standard Eclipse API tooling is also used to ensure stability of the org.eclipse.ocl.pivot plugin.
However strict API tooling inhibits most change, but any change to an EMF model adjust numerous logically internal constants. Clearly any deletion is bad; some client might use the deleted facility. Unfortunately any addition is also bad since a derived client may have already added a same-named facility. Change is therefore limited to function bodies and private additions.
org.eclipse.ocl.pivot evolution is therefore more prgamatic. Additions are permitted; clients may need to recode to avoiud name clashes. Numerous API filters are applied to placate the API tooling. Unfortunately use of numerous API filters lreads to a dangerous just-filter-it development culture potentially negating the benefits of API tooling. Therefore, see , a new approach is being taken. EMF model changes are made on baseline branch, and filtered mercilessly. Best endeavours are made to preserve old names and often old functionality. The master branch merges the baseline branch, avoiding EMF model changes swaping the API tooling. The baseline branch is used to create nightly builds with a BYYYYMMDD alias. The latest BYYYYMMDD build is used as the baseline for regular builds.
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
- End of Year tasks
- Transition between releases
- Quiet week
- P2 Repositories Organization
- Features Organization
- Issues Documentation
- Tycho build considerations
Thanks to the following organizations who support the Eclipse OCL project with infrastructure and software
YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.
- Modeling Project Category Wiki
- Model Development Tools Category Wiki
- How to build Modeling sub-projects like OCL