In typical software development projects the Object Constraint Language (OCL)
can be used for the specification of object-oriented software. The OCL is a formal
language to express constraints. It is based on predicate logic.
Conventional integrated development environments (IDEs) provide a wide range of
func-tionality to programmers, such as: editor with syntax highlighting, integrated
compiler and debugger, wizards, etc. Many of these IDEs can be extended by 3rd party
tools, which can be integrated homogenously.
The goal of this work is the development of a tool for the Eclipse platform
that can be used for writing and maintaining OCL expressions. The OCL language is
used to specify pre-, post-conditions and invariants for interfaces and classes
(in a Design by Contract style). The tool also contains a parser to check the
syntactical and semantical correctness (better known as typechecking) of the
written OCL expressions.
Some Technical Background
Dresden OCL Toolkit
is used for parsing the OCL statements. This toolkit
supports only OCL version 1.3, which doesn't allow to fully specify the location
of a context. So the Dresden OCL Toolkit was modified to support package structures
(introduced in OCL 1.4). This is the only modification to the toolkit's sources.
The model information is extracted from a Eclipse Java project using Eclipse's
Java development tooling ( JDT).
The extracted model information is structured in a
form that the Dresden OCL Toolkit can use it to check the semantical correctness of
the written OCL statements.
Second Alpha version (released 2004-10-06). Currently the OCL editor is only
working with Eclipse 3.0. Eclipse 2.1 support will follow soon.