pr [Macro]


Purpose

The pr macro prints the definition of a given relation. It should be used interactively rather than in application code.

Syntax

pr datum

Arguments

The datum argument is a Lisp form. It may be an extended identifier having the form kb\^{\space}name, where kb is the knowledge base from which the search starts. It may also be an identifier beginning and/or ending with the wildcard character *, in which case the search proceeds until the first matching object is found. It is not necessary to specify the package in which datum resides since the search is package-independent. If datum is a symbol, Loom first tries to locate the object named by that symbol. If this fails, or if datum is a list, Loom evaluates datum and searches for the object corresponding to the resulting value.

Value

The return value is nil.

Remarks

The definitions printed by pr reflect inferences made by Loom during classification and matching. Unlike the output of save-kb, these definitions may differ considerably from the original source definitions supplied by the user.

Loom provides the pr macro as a development tool. Because datum may be evaluated at compile time, pc cannot be reliably used in application code.

Examples

(pr binary-tuple) --> 
    (DEFRELATION BINARY-TUPLE 
        :CHARACTERISTICS (:CLOSED-WORLD :SYMMETRIC)) 
(pr weight*) -->  
    (DEFRELATION WEIGHT-IN-KILOS 
        :IS (:AND WEIGHT (:RANGE KILOS))) 
(pr (first relations)) --> 
    (DEFRELATION SIBLING 
        :IS-PRIMITIVE RELATIVE)

See Also

Last modified: Jun 1 1995