Evaluating Constraints

You can evaluate constraints using the PAL Constraints Tab. The PAL engine will check that the instances in the knowledge base conform to your constraints and the PAL Constraints Tab will display any instances that violate them.

To evaluate constraints:

  1. Go to the PAL Constraints Tab and make sure the constraint(s) you want to evaluate are displayed. See Displaying Constraints at the Constraints Tab for more information.
  2. Tag the constraints you want to evaluate by clicking in the Evaluate? column. Tag constraints are shown with a check .
  3. Click the Evaluate indicated constraints button.
    The PAL engine evaluates the instances of each tagged constraint. Constraints that are not violated are marked with a green checkmark; constraints which are violated by some instance are marked with a red warning.
  4. To see details about a particular constraint, click on the constraint to select it. 
    The area at the right of the PAL Constraints Tab displays the instances which violate the constraints grouping them by the name of the variable that they fill in one violated occurrence of the constraint. In some cases, for clarity, you might want to declare a variable which is otherwise unused so that the specific instances that fill that variable on violation will appear when the constraint is evaluated.

For example, in this report for the editor-employees-salary-constraint in the newspaper example, the following violating instances are displayed:

 

 

We see that in one instance, Joe Schmo earns more than his editor Mr. Science. Similarly, Larry Tennis-nut makes more than Sports Nut.

You can view the Instance Form for any of the displayed instances by clicking on the instance to highlight it and then clicking the View button at the upper right of the pane.


PAL Constraints User Interface/Evaluating Constraints

Next: Tracing Constraint Functions and Predicates

PAL Table of Contents