author: Patrick Thijssen
title: OCL Made Easy
keywords: OCL, Semantics, Graph Transformation
topics: Logics and semantics
committee: Luís Ferreira Pires ,
Arend Rensink
started: December 2019
end: June 2020

Description

The assignment is to define and implement a graph-based formal semantics for OCL, the standard Object Constraint Language for UML.

OCL has been around for a while and is slowly being accepted as a valuable part of UML, for instance to specify model constraints that cannot be expressed in class diagrams; it is also used for MOF/ECore metamodels and as a navigation language in model transformations.

There is a formal OCL semantics in terms of first-order logic. However, it is to be feared that this semantics does not appeal to many of the (potential) OCL users.

Graph transformation, supported by the tool GROOVE developed at the FMT group, offers a way to visually specify models and model behaviour in terms of graphs. Among other things, graph rules are an intuitive and appealing way to make first-order logic properties accessible. In fact, OCL constraints have a natural meaning in terms of graph structures.

This assignment involves the following tasks:

  • Get acquainted with OCL and GROOVE
  • Develop a compositional OCL semantics in terms of nested graph rules, consistent with the existing First-Order Logic semantics
  • Implement a translation of OCL constraints into GROOVE (conditional) rules

 

Additional Resources

  1. Thesis