Creates or modifies objects in the object base.
kw
assert (class-name variable {slot-and-term}*)
slot-and-term ::= (slot-name term)
class-name⇩ |
The name of a class. |
variable⇩ |
A variable beginning with ? . |
slot-name⇩ |
The name of a slot in class-name. |
term⇩ |
An expression. |
The backward chaining goal assert
creates or modifies objects in the object base.
class-name must be the name of a class of objects known to KnowledgeWorks. Each term is an expression composed of Lisp data structures and KnowledgeWorks variables.
If variable is unbound a new instance of class-name is created with each named slot-name initialized to the value of the corresponding term.
If variable is bound, that bound instance has its named slots modified to contain the values of term corresponding to each slot-name. It is an error if the bound object is not of the named class.
It is an error to put an unbound variable into a slot of an object in the object base.
Only objects in the current inferencing state will be affected.
(assert (truck ?truck driver ?driver)) (assert (possible-trucks ? trucks (?truck . ?trucks))
KnowledgeWorks and Prolog User Guide (Windows version) - 01 Dec 2021 19:36:03