Next Prev Up Top Contents Index

assert

Backward Chaining Goal
Syntax

assert ( class-name variable { slot-name term }*)

Arguments

class-name is the name of a class of objects known to KnowledgeWorks. variable is a variable beginning with ? . slot-name is the name of a slot in the class. term is an expression composed of Lisp data structures and KnowledgeWorks variables.

Description

If variable is unbound a new instance of class class-name is created with the named slots containing the value of the term immediately following the slot name. If variable is bound, that bound instance has its named slots modified to contain the value of the term immediately following the 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.

Examples
(assert (truck ?truck driver ?driver))
(assert (possible-trucks ? trucks (?truck . ?trucks))
See Also

erase


LispWorks KnowledgeWorks and Prolog User Guide - 14 Dec 2001

Next Prev Up Top Contents Index