O'Reilly logo

UML™ Bible by Tom Pender

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 18

Applying Constraints to the UML Diagrams

images

In This Chapter

  • Defining the Object Constraint Language
  • Defining OCL data types
  • Defining OCL statements
  • Creating invariants, preconditions, and post conditions
  • Navigating association
  • Working with collections, messages, and tuples
  • Applying the OCL Standard Library

images

As I mentioned in earlier chapters, you can use a formal language, the Object Constraint Language (OCL), to specify constraints on attributes and associations, and, in fact, on any classifier.

images There was a previous release of the same document under the title “UML 1.4 with Action Semantics.” To my knowledge, the only difference is the addition of the Action Semantics section. The OMG simply thought that the added content warranted a new version number. You will even find references to 1.4 in the OCL 2.0 specification.

A constraint may be specified as an invariant, a precondition, or a post condition. This description of a constraint reveals one very important fact about OCL: OCL is used to specify static requirements.

images There has been work proposed to integrate a dynamic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required