      (map #(refine-input- % inp-set) sub-children))))
 
 
-
-;; TODO: do something with stub, refine-input.
 (defn- make-atomic-subproblem [stub inp-set function-set out-set reward status]
   (let [children (when (= status :live)
                    (or #_ (refined-children subsuming-as inp-set) ;; TODO!!

#_ (def ^{:private true} cache-trait summaries/lazy-cached-summarizer-node)
#_ (def ^{:private true} cache-trait summaries/pseudo-cached-summarizer-node)


(defprotocol SimpleWatched
  (add-output! [sw o])

    (swap! forwards conj child-sw)
    (doseq [w @watchers] (add-watcher! child-sw w))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     Subproblems     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     Protocols     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defprotocol Evaluable
  (evaluate!      [s]))

(defn can-evaluate? [s]  (satisfies? Evaluable s))

(defprotocol Subproblem
  (subproblem-name   [s])
  (input-set         [s])
  (output-set        [s])
  (tree-summarizer   [s] "Summarizer that includes children."))

(defn sp-str [sp] (format  "#<Subproblem$%h %s>" (System/identityHashCode sp) (subproblem-name sp)) )
(defmethod print-method angelic.search.implicit.fah_astar_eval2.Subproblem [ss o] (print-method (sp-str ss) o))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Tree Summarizer  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Expects to be a parent of inside, but not have inside as a child.
;; All children are tree summarizers.
