Dresden OCL Toolkit

About the project

What is the Dresden OCL Toolkit?

The Dresden OCL Toolkit is all about the Object Constraint Language (OCL). OCL is part of the well-known Unified Modelling Language (UML). It extends the UML's graphical notation with the possiblity of adding more formally defined textual constraints on method invocations and on class structures as a whole. Many aspects of a model that cannot be expressed adequately with the graphical notation alone find their representation in OCL constraints.

So, where does the Dresden OCL Toolset come into play? As its name indicates it is not some standalone solution. Instead, many of these tools are meant to be used as a library, integrated into other tools, but there exist also some standalone tools in the Toolkit.

Who did the work?

Work on the Toolkit started as early as 1999 when the OCL base library was first implemented in Java. Since the first version of the OCL compiler was completed alongside a Diploma Thesis, continuous work on and around the Toolkit has led to quite a considerable number of modules, which are now available.

The Toolkit is enhanced and maintained mainly by students and scientific staff of the Software Technology Group at Technische Universität Dresden, where the project is also coordinated. Contribution is however not restricted to this group so feel free to get in touch.

The different applications in the Toolkit

Although this is not a stand-alone tool there is a demonstration module coming with the Toolkit which helps to understand the way the Toolkit works.

There are seven applications in the Toolkit by now. The different demonstration modules are listed below with some inspirational screenshots.

1. OCL2 Workbench

This software was written by Stefan Ocke for his diploma thesis. It provides the following functions:

meta model and OCL script code generator
Installed meta model
and OCL script
Generated code

2. OCL2 Parser GUI

This software was written by Ansgar Konermann for his diploma thesis. It provides a GUI to the OCL2 parser and allows:

constraint input concrete syntax tree visualized concrete syntax tree
Enter OCL constraint Parsing constraint results in concrete syntax tree Visualized concrete syntax tree

3. OCL22SQL

This software was written as a prototype example for the OCL Declarative Code Generator by Florian Heidenreich for his diploma thesis. It provides a GUI to create integrity views from textual OCL invariants and allows:

Please note, that this tool doesn't support association classes and OCL constraints which use the class names instead of association ends for navigation.

loading model and constraints setting transformation parameters generated SQL model generated SQL integrity views
Loading UML model and OCL constraints Setting transformation parameters Generated SQL model Generated SQL integrity views

4. UtilityTest

This Software was written by Jordi Cabot Sagrera. It is an example how to use the Class Utility which provides some helper methods. Take a look at the classes UtilityTest and Utility if you plan to work directly on the repository. It is a text-based application, which uses the CarWorld-Model in /resources/PoseidonProjects.

5. Transformation Framework

This Software was written by Christian Wende for his student research project (Großer Beleg). It provides a framework to implement, manage, configure and execute metamodel based transformations. The distribution comes with an implementation of transformations performing a database-shema generation from uml models.

model selection transformation transformation configuration transformation result
Model selection Transformation Transformation configuration Transformation result

6. Eclipse Plugins

There are three Eclipse plugins shipped with this Toolkit. The Base plugin and the OCL Editor plugin were written by Mirko Stölzel. The Visualization plugin was written by Kai-Uwe Gärtner. The OCL Editor plugin provides a text editor for OCL Constraints. The Visualization plugin helps to see what is inside the Netbeans Repository. The Base plugin provides the basic functions of the Toolkit to other plugins.

7. Java Code Generator GUI

This software was written by Ronny Brandt for his student research project (Großer Beleg). It is an extension of the code generator written by Stefan Ocke. With this software you can load UML-models provided as XMI files and OCL-constraints and generate java code to check these constraints at runtime. This generated code also can be injected in existing java files (instrumentation) and they can be reverse engineered too.

Java Code Generator Java Code Injector Reverse Engineering
Java Code Generator Java Code Injector Reverse Engineering