Creating
a Blank Constraint
You can create a blank constraint using the PAL Expression
Editor. To do this, you can open the
editor in one of three ways:
The first two methods give identical results; they just reflect different
ways of viewing constraints in Protégé. The third method actually attaches
the constraint to the class. Attaching a constraint to a class creates an
implicit range definition over all instances of the class, for all variables
that appear in the constraint statement and that are not defined by an explicit
range definition.
Note: You can also create constraints using the EZPAL plug-in, which
provides template-based guidance to writing PAL constraints. To access
this plug-in, go to the Protégé
Plug-In library, click on the Inference and Reasoning link, and then
click on the EZPAL Tab Widget link.
At the Constraints Tab
To open the editor at the Constraints tab:
- Go to the PAL Constraints Tab
- Click the Create button at the
upper right of the Choose Constraints pane.
A new constraint is created and the editor opens in a separate window.
At the Instances Tab
- Go to the Instances Tab.
- Display the classes under :SYSTEM-CLASS, display the classes under
:CONSTRAINT, and click on :PAL-CONSTRAINT to highlight it.
- Go to the Direct Instances pane and click the Create
button.
A new constraint is created and the PAL Expression
Editor
appears in the Forms pane of the Instances tab.
At the Classes Tab
To create a constraint at the Classes Tab, and attach
it to a class:
- Go to the Classes Tab.
- Highlight the class to which you wish to attach the constraint to be
created.
The Class Form for the selected class is displayed at the right of the
Classes Tab.
- Click the Create
button at the upper right of the Class Constraints pane in the Class
Form.
A new constraint is created and the PAL Expression
Editor
opens in s separate window.
Working With a New Constraint
Once the constraint has been created, you can:
- Name it by typing directly in the Name field
- Enter a description by typing directly in the Description
field.
- Define variable ranges by typing directly in the Range area, or using the Range Editor.
- Create a statement by typing directly in the Statement area, or using the Statement Editor.
PAL Constraints User Interface/Creating a Blank Constraint
Next: Viewing a Constraint
PAL Table of Contents