anchor.diff:  
   (defstruct ground-domain
     (variables nil :type list)
  -  (variable-type nil :type hash-table)
  +  (variable-type nil :type tree-map)
     (derived-variables nil :type list)
  -  (derived-type nil :type hash-table)
  +  (derived-type nil :type tree-map)
     (operators nil :type list)
     (axioms nil :type list)
     (start nil :type list)
     (goal nil :type list))
   
  +(defun type-map-keys (map)
  +  (map-tree-map :inorder 'list (lambda (key value)
  +                                 (declare (ignore value))
  +                                 key)
  +                map))
   
   ;; TODO: ground derived types
   ;;       - add to variables (separate slot for derived variables)
  
positive.code:      for s in (ground-domain-variables domain)
       for v = (format-state-variable s i)
       collect (multiple-value-bind (type contains)
                   (gethash s types)
                 (assert contains)
                 (smt-declare-fun v () type))))
  
  
negative.code:           ;(print (list var args (pddl-derived-body d)))
            (setf (gethash var variable-type) (pddl-function-type d)
                  (gethash var variable-body) (ground-derived-body d args type-objects)))))
      (values (hash-table-tree-map variable-type #'gsymbol-compare)
              (loop for k being the hash-keys in variable-body
                   collect `(= ,k ,(gethash k variable-body))))))
  
  