 ;; TODO TODO: fix names.
 ;; TODO: turn kill back on
 
+;; --> TODO: merge stubs and subproblems!
 
 (set! *warn-on-reflection* true)
 

              (ts-stub [ts] stb)
              (subsuming-sps [ts] (keys subsuming-sp-set))
              (add-subsuming-sp! [ts subsuming-sp]
                (util/assert-is (= (norm-name (stub-name stb)) (norm-name (sp-name subsuming-sp))))                 
                (when-not (.containsKey subsuming-sp-set subsuming-sp)
                  (.put subsuming-sp-set subsuming-sp true)
                  (summaries/connect-subsumed! (sp-ts subsuming-sp) ts)))

(defn- make-fs-seq-name [fs-seq]
  (assert (seq fs-seq))
  ((if *left-recursive* left-factor right-factor)
   (map wrapped-atomic-name fs-seq)))

;; TODO: flatten as well?
(comment
  (defn norm-name [n]
   (case (first n)
     :Atomic n
     :Pair   [:Pair (norm-name (nth n 1)) (norm-name (nth n 2))]
     :SA     (norm-name (second n))
     :OC     (norm-name (second n)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;      Atomic       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

