anchor.diff:  ;;; Description: Macros and functions implementing LISA's early attempt at a
   ;;; query language.
   
  -;;; $Id: retrieve.lisp,v 1.4 2002/01/10 15:40:42 youngde Exp $
  +;;; $Id: retrieve.lisp,v 1.5 2002/01/10 16:36:59 youngde Exp $
   
   (in-package "LISA")
   
  
positive.code:     `(defquery (gensym)
         ,@body
         =>
         (push (list ,@(mapcar #'make-query-binding varlist)) *query-result*))))
  
negative.code: 
  (defun define-and-run-query (name body)
    (let ((*query-result* '())
          (query-engine (make-inference-engine)))
      (setf (get-facts query-engine) (get-facts (current-engine)))
      (with-inference-engine (query-engine)
        (add-rule query-engine (define-rule name body))
        (run)
        (values *query-result*))))
  
  (defmacro defquery (name &body body)
    (let ((rule-name (gensym)))
  