You can evaluate a single OCL statement to query the characteristics of your metamodel. For example, you can evaluate an OCL statement that returns a simple type, such as a Boolean value, or you can evaluate an OCL statement that returns a list of metamodel objects. If the OCL resource contains multiple OCL statements, the Console view reports that the OCL statements are syntactically incorrect. However, if the OCL resource contains multiple OCL statements, you can evaluate a single selected OCL statement.
To evaluate an OCL statement, you must set the target model to Meta Model. Also, to evaluate an OCL statement, you must have a model or profile open, and have an OCL resource in your workspace.
If the evaluation is successful, the results from the OCL statement are displayed in the Console view. If the evaluation fails, the first encountered syntax error is displayed in the Console view, and additional information is displayed in the Problems view.