   hierarchy/HighLevelAction
     (immediate-refinements- [s]
       (let [[stalled-refs rest-refs] (split-with #(= (hla-type (first %)) ::SAS-Precond-Set-HLA) refinements)]
+;        (println "\n\n" s "\n" (map (comp env/action-name first) refinements))
 ;        (println (map count [stalled-refs rest-refs]))
 ;        (println (map #(map type %) rest-refs))
         (if-let [[target-ref & more-refs] (seq rest-refs)]

(def *simple-dtgs* nil)   ; Map from var to edge list.
(def #^HashMap *hla-cache* nil) ; a map from [action-name] to map from init-sets to action.
(def #^IdentityHashMap *compile-cache* nil) ; a map from [action-name] to map from init-sets to action.

;; Memoized partial computations to speed up acylic edge generation.
(def #^HashMap *forward-reachability-cache* nil)

;; Greedily pull irrelevant actions out, until we get to a normalized HLA
(defn make-interleaving-hla-refinement [pre-actions refinements shared-var-set]  
;  (println (count refinements))
;  (println pre-actions (map type refinements) (map #(map type %) refinements))
;  (println (map type pre-actions) (map type refinements) (map #(map type %) refinements))  
;  (println "MIHR" (map env/action-name pre-actions) (map #(map env/action-name %) refinements))
  (loop [in-refinements refinements, out-refinements [], pre-actions pre-actions]
    (if-let [[f & r] (seq in-refinements)]
