pb [Macro]


Purpose

The pb macro prints the definition of a given action, method, or production. It should be used interactively rather than in application code.

Syntax

pb behavior &optional title

Arguments

The behavior argument is a Lisp form which either names a behavior (an action, method, or production), or evaluates to a behavior or behavior name. If it is a symbol, special characters are interpreted as in pc, and package prefixes are optional because the search extends across packages.

The title argument is a string which titles a method.

Value

The return value is nil.

Remarks

If behavior and title are supplied, pb searches for a method of behavior having the specified title. Otherwise, it searches for an action or production named behavior.

Examples

(pb move) --> 
    (DEFACTION MOVE (?X) 
        :FILTERS (:MOST-SPECIFIC) 
        :MISSING-METHOD :WARNING) 
(pb bottom-kb\^{\space}move "move box") --> 
    (DEFMETHOD MOVE (?X) 
        :TITLE "move box" 
        :SITUATION (BOX ?X) 
        :RESPONSE ((MOVE-BOX ?X))) 
(pb *-container) --> 
    (DEFPRODUCTION ALMOST-FULL-CONTAINER 
        :WHEN (:DETECTS (:AND (CONTAINER ?X) (>= (PCT-FULL ?X) 90))) 
        :PERFORM (MOVE ?X))

See Also

Last modified: Jun 1 1995