anchor.diff:                                   (nconc bindings `(',name ,value))))))))
       (expand-slots slots nil)))
   
  -(defun insert-new-fact (head slots)
  -  (format t "inserting fact: ~S ~S~%" head slots))
  -
   (defun parse-and-insert-fact (body)
  -  `(insert-new-fact ',(first body)
  -                    (normalize-slots ,@(expand-slot-variables (rest body)))))
  +  (let ((head (first body))
  +        (slots (rest body)))
  +    (cond ((symbolp head)
  +           (let ((class (find-imported-class head nil)))
  +             (if (null class)
  +                 (error "No class object found for ~S." head)
  +               `(assert-fact (current-engine)
  +                             (make-fact ,class
  +                                        (normalize-slots
  +                                         ,@(expand-slot-variables slots)))))))
  +          (t
  +           (error "PARSE-AND-INSERT-FACT: parse error at ~S." body)))))
   
   (defun parse-and-modify-fact (fact body)
  -  (format t "modify ~S, ~S~%" fact (parse-fact-body body)))
  +  `(format t "modify fact: ~S ~S~%" ,fact
  +           (normalize-slots ,@(expand-slot-variables body))))
  
positive.code: ;;; File: parser.lisp
  ;;; Description: The LISA programming language parser.
  ;;;
  ;;; $Id: parser.lisp,v 1.17 2000/12/09 21:41:30 youngde Exp $
  
  (in-package :lisa)
  
  
negative.code:                      (t
                        (error "CANONICALIZE-FACT: parse error at ~S." slots))))))
      (create-slots body 0)))
  
  (defun normalize-slots (&rest args)
    (labels ((compose-slots (pairs slot-name slots)
  