Dresden OCL Logo
Dresden OCL
OCL support for your modeling language

Contents

Dresden OCL2 Toolkit

The Dresden OCL2 Toolkit is an older version of the Toolkit which is based on the Netbeans Metadata Repository (MDR) and contains a lot of different tools.

The newest version of the toolkit is called Dresden OCL. More information about the Dresden OCL can be found via this link.

The different applications in the Dresden OCL2 Toolkit

Although the Dresden OCL2 Toolkit 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 Dresden OCL2 Toolkit. The different demonstration modules are listed below.

1. OCL2 Workbench

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

  • loading meta models into the repository using XMI
  • creation of OCL invariants for loaded meta models
  • generating code for those invariants
  • loading of models and execution of generated code to check for compliance with invariants

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:

  • editing, loading and saving of text files containing OCL2 constraints
  • parsing OCL2 constraints into a concrete syntax tree and visualizing this tree
  • loading UML15 models to run attribute evaluation/AST generation against (using XMI)
  • browse UML models in the repository (very basic browsing only)
  • running an attribute evaluator over the concrete syntax tree to create the abstract 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:

  • loading of OCL constraint files
  • loading UML1.5 models to run attribute evaluation/AST generation against (using XMI)
  • choosing between different object-relational mapping schemes to create DDL-scripts for table schemas and DDL-scripts for object views
  • generating of SQL integrity views from the AST

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

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.

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.

Packages and Tools of the Dresden OCL2 Toolkit

This section explains the different packages of the Dresden OCL2 Toolkit. The Dresden OCL2 Toolkit is divided into the following parts:

  • The MDR repository
  • base tools
  • tools working on the base tools
  • end user tools
Package Structure of the Dresden OCL2 Toolkit

Metadata Repository (MDR)

The whole toolkit is metamodel-based and relies on a common metamodel derived from the MOF14 and UML15 metamodels.

All models and metamodels (MOF14, UML15 and our common OCL metamodel) are stored in a metadata repository. We use NetBeans' metadata repository implementation.

Using the MDR and our metamodels, we are able to generate Java interfaces for accessing models in the MDR.

The base tools

OCL2 Parser

Our OCL2 Parser written by Ansgar Konermann is based on a tailored, hand-optimized L-attributed grammar of OCL2.0. We feed it to an enhanced version of the popular LALR(1) parser generator SableCC to create lexer, syntax analyzer ("parser") and an abstract attribute evaluator skeleton. The implementation class of the attribute evaluator is derived from the abstract skeleton by inheritance.

The parser uses two passes. Pass one creates a concrete syntax tree from the textual constraint. During pass two, the attribute evaluator performs the transformation from CST to AST.

OCL Base Library

We adapted our well proven "OCL-Basisbibliothek" by Frank Finger to fit the new, metamodel-based architecture. Code generator/constraint evaluator

The Code Generator developed by Stefan Ocke and adapted by Florian Heidenreich is an abstraction of multiple general template engines (as StringTemplate) helpful for the reuse by the Transformation Framework and the OCL Declarative Code Generator. Tools working with base tools

OCL Editor

The OCL Editor plugin provides a text editor for OCL Constraints. The editor was developed by Steffen Zschaler and adapted as an Eclipse plugin by Mirko Stölzel.

OCL Declarative Code Generator

The Declarative Code Generator written by Florian Heidenreich generates declarative target code for a given expression in OCL. The Declarative Code Generator is used by the OCL22SQL tool.

End user tools

OCL Fujaba4Eclipse

The Fujaba Tool Suite is developed at the university of paderborn (http://wwwcs.uni-paderborn.de/cs/fujaba/projects/eclipse/index.html). One project based on the Fujaba Tool Suite is Fujaba4Eclipse. Fujaba4Eclipse is as an open source project and its goal is to provide an integrated teaching environment based on Eclipse for secondary schools and first year university courses. It should assist teaching object-oriented technology, design patterns and the syntax and semantics of a programming language.

In 2005 and 2006 Mirko Stölzel integrated parts of the Dresden OCL2 Toolkit into Fujaba4Eclipse (for his student research projects Großer Beleg and Diploma Thesis), to use OCL constraints in class and story diagrams created with Fujaba4Eclipse.

OCL2 Parser GUI

This demo application written by Ansgar Konermann shows the OCL2 Parser in action. It allows you to load or edit textual OCL constraints, load UML1.5 ord MOF1.4 models through XMI import and parse the constraints in the context of the model loaded. After parsing, the constraints will be attached to their contextual model elements and you can export the enhanced model using XMI export.

OCL22Java

The OCL22Java tool written generates Java code out of OCL expressions as well as instruments Java programs with the generated code. The tool was developed by Ralf Wiebicke and adapted for the Dresden OCL2 Toolkit by Ronny Brandt.

OCL2 Workbench

The the OCL2 Workbench written by Stefan Ocke allows you to evaluate constraints in the context of a concrete model (M1) and to generate Java code.

Model visualization

The model visualization written by Uwe Gärtner helps to see what is inside the Netbeans Repository.

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 a implementation of transformations performing a database-schema generation from uml models.

OCL22SQL

This software was written as a prototype example for the DeclarativeCode-Generator by Florian Heidenreich for his diploma thesis (The first version of the tool (OCL2SQL) was developed by Sten Löcher). It generates SQL code to create integrity views from a given UML1.5 model and textual OCL invariants.