anchor.diff:                       *query-result*)))
              (remember-query ,hash ,query))
            (run-query ,query)))))
  -
  -(defvar *query-map*
  -    (make-hash-table))
  -
  -(defun forget-all-queries ()
  -  "Discards all queries from both *QUERY-MAP* and the rete network."
  -  (clrhash *query-map*))
   
   (defun forget-query (name)
     "Discards a query from the cache by 1) removing it from *QUERY-MAP*; and 2)
  
positive.code: (defun define-query (name body)
    "The actual query definition function. Creates a RULE instance identified by
    the symbol NAME, with BODY as its LHS and RHS, and adds the new rule to the
    rete network."
    (let ((rule (define-rule name body)))
      (add-rule (current-engine) rule)
      (values rule)))
  
negative.code: ;;; Description: Macros and functions implementing LISA's initial query
  ;;; language implementation.
  
  ;;; $Id: retrieve.lisp,v 1.15 2002/04/13 02:26:32 youngde Exp $
  
  (in-package "LISA")
  
  (defvar *query-map*
      "Serves as the query name cache."
    (make-hash-table))
  
  (defvar *query-result* 
      "Holds the results of query firings."
    '())
  
  (deftemplate query-fact ()
    (slot name))
  
  (defun run-query (query)
    "Runs a query (RULE instance), and returns both the value of *QUERY-RESULT*
    and the query name itself."
    (with-inference-engine ((current-engine))
      (let* ((?name (get-name query))
  