PAL Conceptual Framework

PAL provides a set of special-purpose frames to hold constraints and queries that are added to a Protégé knowledge base, respectively the :PAL-CONSTRAINT and the PAL-QUERY classes. Specifically, a PAL constraint is an instance of the :PAL-CONSTRAINT class and a PAL query is an instance of the PAL-QUERY class. Both classes have the following slots attached to them:

Creation of a constraint or query

To create a PAL constraint (or a PAL query), one simply needs to create a new instance of the :PAL-CONSTRAINT class (or of the PAL-QUERY class), using the Instance tab or the PAL Constraints Tab (or the PAL Queries Tab) of Protégé. Then, one needs to fill-in the slots listed above with valid PAL sentences. The PalConstraintWidget and the PalRangeWidget are two slot widgets that provide a structured editor to enter valid PAL range definitions and statements. Normally, these two widgets are set by default on the knowledge-entry forms for the instances of :PAL-CONSTRAINT and PAL-QUERY. If they are not set, see Configuring the PAL Expression Editor for more information.

Important note

The :PAL-CONSTRAINT class comes as part of the PAL plugin, and appears in the subtree of system classes for Protégé (under the :SYSTEM-CLASS root class). Constraint classes are system classes and are written with a colon (:) in front of the name.

PAL-QUERY does not come as part of the PAL plugin: This class is available in the pal_query.pprj project, that needs to be included in the working project. The pal_query.pprj project does come as part of the Protege release, though, in the projects subdirectory of the Protege-2000 installation directory (it is also available with the newspaper sample project). Once this project included in the working project, the PAL-QUERY class also appears in the :SYSTEM-CLASS subtree. Query classes are written without a colon.

Attachment of a constraint to a class and implicit range definition

Another way of creating a PAL constraint for a class is to use the Constraints widget that appears on the form for every class. As a result of clicking the "C" button, Protégé creates a new instance of the :PAL-CONSTRAINT class and attaches it to the selected class. 

In that case, all variables that are not defined within a range in the :PAL-range slot implicitly range over all instances of that class. In addition, all unquantified variables are given an implicit quantification over that implicit range. In this case, you could omit a defrange statement for that variable. This can be used when you want the defrange of the constraint to apply to multiple classes that are not subclasses of a single class, as otherwise you would have to write the constraint in the scope of each class.  However, this should be used with caution, because if a constraint is de-attached from all of its classes, it will lose its implicit range definitions, and will have unbound variables. 

This screen shot below shows the Editor class, which has the example constraint about editors' salary attached to it (top right box). This screen shot also shows the :SYSTEM-CLASS subtree with the :PAL-CONSTRAINT and PAL-QUERY classes.

The screen shot below shows the example constraint about the salary of an editor formalized as an instance of the   :PAL-CONSTRAINT class:

Queries work similarly. The screen shot below shows the example query about employees in a team formalized as an instance of the PAL-QUERY class:


The PAL Language and Frames/PAL Conceptual Framework

Next: Supported Predicates and Functions in PAL

PAL Table of Contents