Validating uml models and ocl constraints
Just select a class in the model browser and drag it to the object diagram. The upper right view indicates that there is now one department object, and the object diagram shows this object graphically.
A context menu available on a right mouse click in the object diagram provides several display options.
Objects and links can be created which constitute a system state reflecting a snapshot of a running system.
In every system state, the constraints are automatically checked for validity.
The initial system state is empty, i.e., there are no objects and links yet.
The view at the lower left displays a list of OCL invariants and their results.
Consider the following UML class diagram for a simple model describing employees, departments, projects, and their relationships to each other.
The message says: Model inherent constraints violated.use At this point you can enter commands at the prompt (try 'help' for a list of available commands).For example, you can enter OCL expressions by starting the input with a question mark.The expression will be evaluated and its result will be shown, e.g.: The command line interface is useful for experienced users and for automated validation procedures since commands can be read from a script file.The graphical user interface is easier to learn and provides different ways of visualizing a system state.