Here's the Syntax. There's only one statement in the language. It's a statement which is a constraint.
The constraint has a couple of keywords in it, and a couple of expressions. The first keyword is context. And it's followed by an identifier.
That identifier gives a name to the context. The context is where you are in a diagram. Usually this means a class, so it's the name of a class.
It might be the name of a particular method in a class. Then there comes another keyword which is the kind of constraint, and we'll see that there's three kinds of constraints. One is invariance, one is pre, preconditions, and one is post conditions.
And then comes a Boolean expression, which is the actual constraint that the statement is expressing. >From what I've just said you can infer correctly that OCL constraints are inherently connected with UML class model diagrams, and you probably will have already developed the class model diagram.