anchor.diff:  ;; for unbound variables this encoding assumes that integers will not be used
   ;; as functors
   
  -;;(eval-when (eval compile load)
  +;;(eval-when (:compile-toplevel :load-toplevel :execute)
   ;;  (pushnew :include-name-in-variable *features*))
   
   (defun new-variable (var-name var-level)
  
positive.code: (defmacro variable-level (x)
    `(car ,x))
  
  (eval-when (eval compile load)
    (defmacro variable-value (x)
      #+include-name-in-variable `(cadr ,x)
      #-include-name-in-variable `(cdr ,x)))
  
negative.code: ;;; counter for number of inferences
  (defvar *ncalls* 0)
  
  ;;; QUERY/0 is generated by the PTTPP compiler and not defined in the
  ;;; Lisp code.  Declare its type to avoid compiler warnings.
  ;;;
  (declaim (ftype (function (t t) t) query/0))
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (defun wrap-count-calls (form)
      (if (and count-calls (not (eq name 'query/0)))
  	`(progn (incf *ncalls*) ,form)
  	form)))
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (defun head-locs (terms &optional (name 'arg) nth)
      (let* ((prop (if nth 'nth-arguments 'arguments))
  	   (n (if (numberp terms) terms (length terms)))
  