destroy [Method]

destroym [Macro]


Purpose

The destroy function retracts all propositions relating to a given instance, and removes the instance from the extensions of all concepts in its type. The destroym macro does the same thing and then advances to a new knowledge base state.

Syntax

destroy instance &key dont-unintern-p
destroym instance &key dont-unintern-p

Arguments

The instance argument is an instance or instance identifier. If the dont-unintern-p argument is t, instance remains accessible (as a Thing with no role fillers or features). Otherwise, instance is deleted from the knowledge base.

Value

The destroy function returns t. The destroym macro returns the current agent time.

Remarks

Caution: Pointers to a deleted CLOS instance I are deleted from adjacent instances only if I inherits the mixin INSTANCE-WITH-INVERSES. Otherwise it is the user's responsibility to avoid creating dangling references.

Examples

      (destroy 'Joe) ==> T 
      (destroy (fi Sue) :dont-unintern-p t) ==> NIL 
      (destroym 'Sue) ==> 34

See Also

Last modified: Sep 20 1995