list-kb [Macro]


Purpose

The list-kb macro lists all objects in specified partitions of a knowledge base.

Syntax

list-kb &optional knowledgeBase &key partitions sort-p

Arguments

The knowledgeBase argument is the knowledge base to be listed, or a symbol or string which names that knowledge base. It defaults to the current knowledge base.

The partitions argument is a keyword or list of keywords specifying the types of objects to be retrieved. Available partitions are :instances, :concepts, :relations, and :behaviors. If this argument is not supplied, all partitions are used.

The sort-p argument is t or :sort-each-partition. If it is t, all objects in the specified partitions are sorted together. If it is :sort-each-partition, the specified partitions are sorted separately.

Value

A list of knowledge base objects is returned.

Remarks

Though concepts and relations are interned in the :instances partition (as well as their own partitions), these objects are not included when the :instances partition is listed.

Examples

(list-kb) 
(list-kb "USER-KB") ==> (|I|JOE |C|Z |C|A |R|R |ACTION|MOVE) 
(list-kb :sort-p t) ==> (|C|A |I|JOE |ACTION|MOVE |R|R |C|Z) 
(list-kb :partitions (:concepts :relations)  
         :sort-p :sort-each-partition) ==> (|C|A |C|Z |R|R)

See Also

Last modified: Jun 1 1995