Defines a class of named objects for use in the object base.
kw
def-named-kb-class class-name superclass-list slot-descriptions &rest options => class
class-name⇩ |
A symbol. |
superclass-list⇩ |
A list of symbols. |
slot-descriptions⇩ |
A list of defclass slot descriptions. |
options⇩ |
defclass options. |
class |
The named class object. |
The macro def-named-kb-class
defines a new CLOS class name class-name, as defclass does. However, if none of the superclasses in superclass-list is a subclass of named-kb-object, then named-kb-object is added to the list of superclasses. The class inherits a name slot called kb-name
, with accessor kb-name and default initialization form (:initform
) that generates a symbol from the class name using (gentemp class-name)
.
slot-descriptions and options are used as in the standard defclass macro.
(def-named-kb-class vehicle () ((driver :initarg :driver))) (def-named-kb-class truck (vehicle) ((load :accessor truck-load)))
def-kb-class
def-kb-struct
get-kb-object
kb-name
named-kb-object
KnowledgeWorks and Prolog User Guide (Macintosh version) - 01 Dec 2021 19:35:35