 
 ; first-action can be null, iff we're done.
 
-;; Which function to calal for recursive i-r.  Should probably be hierarchy/immediate-refs.
-
 ;; Note: can get primitives 
 
 (defn rec-immediate-refinements [a s]


;; Currently, was written as if we've always done as much greedy stuff as possible, leave ourselves with a choice of leaf preconds.
;; Problem is, e.g., in source var this means we lose caching.
;; Also problems when we have moved something out front, would rather not hypothetically clean up current.


;; TODO: this is fundamentlaly broken, since it doesn't do "lookahead".

      (when ((:cycle-to hierarchy) var dst-val)
        ((:var-levels hierarchy) var))))

(defn- make-inactive-leaf-precond-hla [hierarchy var dst-val]
  (SDH-Inactive-Leaf-Precond-HLA hierarchy [:!P var dst-val] var dst-val 
    ((:dtg-to           hierarchy) var dst-val)
    ((:ancestor-var-set hierarchy) var)))

;; TODO: when can greedy sat arise?  After creation, other-sat, or finish

