Skip to Main content Skip to Navigation
Journal articles

On OCL-based Imperative Languages

Abstract : The Object Constraint Language (OCL) is a well-accepted ingredient in model-driven engineering and accompanying modeling languages such as UML (Unified Modeling Language) and EMF (Eclipse Modeling Framework) that support object-oriented software development. Among various possibilities, OCL offers the formulation of class invariants and operation contracts in form of pre- and postconditions, and side effect-free query operations. Much research has been done on OCL and various mature implementations are available for it. OCL is also used as the foundation for several modeling-specific programming and transformation languages. However, an intrusive way of embedding OCL into these language hampers us when we want to benefit from the existing achievements for OCL. In response to this shortcoming, we propose the language SOIL (Simple OCL-like Imperative Language), which we implemented in the UML and OCL modeling tool USE to amend its declarative model validation features. The expression sub-language of SOIL is identical to OCL. SOIL adds imperative constructs for programming in the domain of models. Thus by employing OCL and SOIL, it is possible to describe any operation in a declarative way and in an operational way on the modeling level without going into the details of a conventional programming language. In contrast to other similar approaches, the embedding of OCL into SOIL is done in a careful, non-intrusive way so that purity of OCL is preserved.
Document type :
Journal articles
Complete list of metadatas
Contributor : Salvador Martínez <>
Submitted on : Thursday, October 24, 2013 - 9:50:24 AM
Last modification on : Thursday, March 5, 2020 - 5:48:08 PM


  • HAL Id : hal-00876206, version 1


Fabian Büttner, Martin Gogolla. On OCL-based Imperative Languages. Science of Computer Programming, Elsevier, 2013. ⟨hal-00876206⟩



Record views