destroy [Method]

destroym [Macro]


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.


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


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.


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


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.


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

See Also

Last modified: Sep 20 1995