Reflections on OCL 2

By: Ed Willink


Twenty years after the OCL 2.0 Request For Proposals, it is perhaps long overdue for a review as to how well the resulting semi-formal OCL 2 specification makes the informal OCL 1 specification more precise. We briefly relate the history that allowed an imprecise draft to be adopted by the OMG as the OCL 2.0 specification resulting in a language that was fatally flawed from the outset. We draw on personal experience to explain why recognition of the fatality of the flaws has taken so long. However despite these flaws, OCL remains the language of choice for specifying model constraints. Therefore armed with an understanding of the flaws, we make practical suggestions for how an OCL 3.0 might resolve them.


OCL, Object Constraint Language, Precise specification, Side effect free.

Cite as:

Ed Willink, “Reflections on OCL 2”, Journal of Object Technology, Volume 19, no. 3 (October 2020), pp. 3:1-16, doi:10.5381/jot.2020.19.3.a17.

PDF | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn

The JOT Journal   |   ISSN 1660-1769   |   DOI 10.5381/jot   |   AITO   |   Open Access   |    Contact