     (hla-type        [] orig-type)
     (extend-hla!     [init-sets par-effect-sets] (throw (UnsupportedOperationException.)))
   env/Action
-    (action-name [] name)
+    (action-name [] [:!C  name])
     (primitive?  [] false)
   env/ContextualAction 
     (precondition-context [s] precond-vars)

    (precondition-context [s] (precond-var-set this))
  hierarchy/HighLevelAction
    (immediate-refinements- [s]
      (let [[stalled-refs rest-refs] (split-with #(= (type (first %)) ::SAS-Precond-Set-HLA) refinements)]
;        (println (map count [stalled-refs rest-refs]))
;        (println (map #(map type %) rest-refs))
        (if-let [[target-ref & more-refs] (seq rest-refs)]



(defn default-compile-hla-noflatten [hla retain-type-set]
  (println "compiling-noflatten" (env/action-name hla))
  (or (get *compile-cache* hla)
      (let [chla (make-compiled-hla (env/action-name hla) (type hla) (precond-var-set hla) (effect-sets hla))]
        (.put *compile-cache* hla chla)
        (set-compiled-hla-refinements chla
                                      (doall (for [[p r] (pre-ref-pairs hla)] [p (compile-refinement r retain-type-set)])))
        chla)))

(defn default-compile-hla [hla retain-type-set]
  (println "compiling" (env/action-name hla))
  (let [pr (pre-ref-pairs hla)]
     (if (and (util/singleton? pr) 
              (empty? (ffirst pr)) 
              (not (contains? retain-type-set (hla-type hla))))
         (compile-refinement (second (first pr)) retain-type-set)
         (default-compile-hla-noflatten hla retain-type-set))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; VV HLAs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
