What is it?
OCL is an add-on feature of UML, used to describe constraints, rules,
specifications. Like a programming language, it is precisely defined, enough
to be machine processable. Unlike a programming language, its chief purpose
is to provide an accurate way of stating requirements (rather than implementations).
What are the chief benefits of using OCL?
The precise thinking required to write these statements in OCL exposes
inconsistencies and holes in the less formal requirements documents, forcing
important issues to be clarified at an early stage, rather than discovering
them during programming.
Business rules and requirements can be stated succinctly and unambiguously:
readers and writers are less likely to have different ideas about what
OCL provides a programming-language-neutral way of stating requirements,
so that (for example) where there are many components or subsystems that
perhaps come from different sources and yet are to be part of one integrated
enterprise, we can use the OCL statements to define the rules they all
should conform to.
We don't recommend writing UML diagrams and OCL statements alone.
A proper document should consist of a narrative text, interspersed with
formal material to reduce ambiguity.
complete solutions for component and object specification with OCL
(consultancy, courses, workshops, mentoring, seminars, development)