 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Summarizers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;; Outer summary (on subproblem itself) covers everything -- "semantic" view.
-;; Inner summary (accesed by inner-summarizer) covers self and stubs.
-;; Self-summary is just self, nothing else.
-
-;; Either use tree, or watch tere and use inner.
-;; Who actually uses tree?  Only top-level ? !
-;; TODO: add removal later ? 
-
-
-
 #_ (def  ^{:private true} cache-trait summaries/uncached-summarizer-node)
  (def ^{:private true} cache-trait summaries/eager-cached-summarizer-node)
 #_ (def ^{:private true} cache-trait summaries/less-eager-cached-summarizer-node)
 #_ (def ^{:private true} cache-trait summaries/lazy-cached-summarizer-node)
 #_ (def ^{:private true} cache-trait summaries/pseudo-cached-summarizer-node)
 
-
-
-
-;; Expects to be a parent of inside, but not have inside as a child.
-;; All children are tree summarizers.
-;; Non-subsuming children must be added by calling connect-child-sp!
 
 (defprotocol SimpleWatched
   (add-output! [sw o])

        ret (traits/reify-traits [cache-trait summaries/simple-node]
             summaries/Summarizable (summarize [s] (summary-fn s))
             Subproblem             (subproblem-name [s] name)
                                    (input-set       [s] input-set)
                                    (output-set       [s] output-set)
                                    (tree-summarizer [s] @ts-atom)
             OutputWatched          (add-watcher! [s w] (add-watcher! @ts-atom w)))
        ts  (make-tree-summarizer ret)]

;; TODO: assuming consistency and evaluation s.t. no bounding is necessary. Otherwise, downwards would be better anyway?
;; TODO: do something with stub, refine-input.
(defn- make-atomic-subproblem [stub inp-set function-set out-set reward status]
;  (println (fs/fs-name function-set) inp-set)
  (let [children (when (= status :live)
                   (or #_ (refined-children subsuming-as inp-set) ;; TODO!!
                       (map #(make-fs-seq-stub inp-set %)
