iOCL is an interactive Object Constraint Language (OCL) specification and validation framework. The main objective of iOCL is to automate an OCL constraint specification process as much as possible. The key automation of iOCL is to dynamically shortlist available options at any given step, such that a user can more efficiently perform the selection user operation. iOCL enables this by systematically check the UML model, the already specified partial OCL constraint and the current step of the specification process. The second key automation feature of iOCL is to categorise types of constraints, OCL operations, and properties and only display relevant ones at a given step. This feature helps to reduce specification effort and potential errors that a user might make..

IOCL Architecture

The overall architecture of iOCL is presented in Figure 1, which can be divided into two main parts, i.e., Front End and Back End. The Front End focuses on the interactions with users via a friendly interface. More specifically, Front is designed as an action listener used to monitor the actions sent from the domain experts and communicate with the Backend. The Front End takes charge of the actions and requests from domain experts and dynamically displays the information produced by the Back End (e.g., selection operation or basic value input operation). Furthermore, iOCL defines a set of view templates, which are filled with properties and operations. Filled templates are returned to the users during a particular step during the process of OCL constraint specification. .

IOCL Logical Architecture
Figure 1: IOCL Architecture
IOCL Technical Architecture
Figure 2: IOCL Back End Architecture

The Back End architecture of iOCL is presented in Figure 2 which is implemented on Eclipse Modeling Framework and Eclipse OCL. iOCL Back End is the core Engine that handles various requests from the Front End ( and return the corresponding output to the Front End dynamically. By doing so, users can be provided with dynamic guidelines for specifying OCL constraints interactively. More specifically, as shown in Figure 1, the Back End has four key parts, which include:

  1. Load Model: imports and parses a UML model, on which OCL constraints can be specified.
  2. Specify Constraint: specifies constraint parts and returns relevant details (e.g context, constraint type, operations).
  3. Validate Constraint : validates OCL constraint syntax and evaluates the correctness of specified constraints on particular UML model instances. By correctness, we mean there exist one or more valid model instances that can satisfy a specified OCL constraint, i.e., a given OCL constraints for problems.
  4. Download Constraint: exports specified OCL constraints into required formats (e.g., .ocl files).


  • Specify OCL Constraints Interactively.
  • Validate OCL Constraints.
  • Evaluate OCL Constraint Correctness.


iOCL Java Web Application can be found here:


Related Publications
H. Muhammad, T. Yue, S. Wang, S. Ali and J. F. Nygård. IOCL: An Interactive Tool for Specifying, Validating and Evaluating OCL Constraints. In: Science of Computer Programming (SCP), 2017.

H. Muhammad, T. Yue, S. Wang, S. Ali and J. F. Nygård. IOCL: An Interactive Tool for Specifying, Validating and Evaluating OCL Constraints. In: ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems (MODELS), Tool Demonstrations Track, pp. 1-6, 2016.