Defines a class for use in the object base.
kw
def-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-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 standard-kb-object, then standard-kb-object is added to the list of superclasses.
slot-descriptions and options are used as in the standard defclass macro.
(def-kb-class vehicle () ((driver :initarg :driver))) (def-kb-class truck (vehicle) ((load :accessor truck-load)))
KnowledgeWorks and Prolog User Guide (Unix version) - 01 Dec 2021 19:35:49