Chapter 4. Implementing OCL


This chapter describes how OCL expressions can be implemented in code. Although the Java language is used in the examples, the principles explained can be applied using any object-oriented programming language as target language. Even a non-object-oriented language could be used, but the process would be more cumbersome.

The process of mapping OCL expressions to code can be perfomed manually or by automated tools. Several available tools can translate OCL to code. Because the tool market is rapidly changing, we do not provide a list of tools in this book; it would be outdated quickly. Instead, on the Web site http://www.klasse.nl/ocl/ you can find an up-to-date list of tools that are currently available.

This chapter does not systematically treat the mapping of all OCL constructs. A systematic treatment would basically be a specification of an OCL compiler which would be very space consuming and to some extent boring to read. Instead, this chapter describes the main challenges and solutions of implementing OCL.



Object Constraint Language, The. Getting Your Models Ready for MDA
The Object Constraint Language: Getting Your Models Ready for MDA (2nd Edition)
ISBN: 0321179366
EAN: 2147483647
Year: 2003
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net