In this section, we use Ontolingua to express the method ontology for Propose&Revise. We depict the knowledge roles of the inference structure of P&R, thus making explicit the assumptions about the knowledge used by the method. We formalize the knowledge roles, and then, we define the inferences according to the knowledge roles defined.
Ontolingua [Gruber, 1992] is a tool for building libraries of reusable knowledge bases represented according to the knowledge level. Ontolingua uses a set of definitions to define classes and relations. The body of these definitions are KIF sentences that express the semantics of the terms. Besides KIF, Ontolingua uses the frame ontology, which provides standard primitives for organizing knowledge as used in many frame systems. KIF and the frame ontology can be seen as a base ontology or as a specialized knowledge-level representation language used to define more specific ontologies. For more details about KIF and frame ontology see [Genesereth and Fikes, 1992,Gruber, 1993a].
The inferences specify the basic inference capability of the problem-solving method. However, Ontolingua does not cope with the representation of the inferences. In a previous work [Coelho and Lapalme, 1995], we proposed an extension to Ontolingua to represent control knowledge. There, we proposed a new Ontolingua form to represent the inference rules of a method by means of a KIF rule. Here, we present a different extension to represent the primitive inferences by means of three arguments: (1) a condition, (2) a body, and (3) a result. The new extension is defined here:
(define-inference <inference-name> :cond <KIF-sentence> :body <inference-function> :result <KIF-sentence>)
The <inference-name> contains the name of the inference. The :cond argument is used to define the conditions on the application of the inference. This condition is expressed in terms of a KIF sentence, which refers to the knowledge roles defined in Ontolingua. The :body argument refers to a function for carrying out the inference and it uses the variables given in the condition. The :result argument expresses the conditions that must be true after the realization of the inference by the body. The :result expression also refers to the variables of the :cond sentence.
The :body represents a call to a function that will
accomplish the inference and that will be responsible for the
satisfaction of the :result sentence. In our system, this
function is realized by the implemented language Loom. In not showing
the body of the inference, we want to emphasize that how the inference
is implemented is not important to the comprehension of the PSM.
However, the function of the body argument is to indicate that must
exist a corresponding function in the implemented system to execute
the inference. Thus, the :cond and the :result
sentences provide a declarative and knowledge-level definition of the
inferences. In the next sections, we depict the structure of the
knowledge roles and we define the inferences according to the
knowledge roles formally defined.