 ;;    I.e., live decrease -50 to -49, now blocked sibling becomes best; above is -50 TDB;
 ;; TODO: smarter summary updates (i.e., pass child)
 ;; TODO: smarter choose-leaf?
+;; TODO: conspiracy number, weighted, etc.
 
 ;;;;; SP caching
 ;; TODO: tail (i.e., pair) caching? -- Only help for >2 len refs...

(def *decreases* (ArrayList.))
(def *subsumes* (ArrayList.))

(defn schedule-decrease! [sp] (.add ^ArrayList *decreases* sp))
(defn schedule-increase! [sp] (.add ^ArrayList *increases* sp))
(defn schedule-subsumption! [ts subsumed-ts] (.add ^ArrayList *subsumes* [ts subsumed-ts]))



(defn do-changes! [^ArrayList a f]
  (doseq [sp a] (f sp))
  (.clear a))

(declare evaluate!)

;; Note: doing pairs right away doesn't help.
(defn evaluate-and-update! [s]
  (evaluate! s)
  (do-changes! *increases* summaries/summary-increased!) ;; Must go first for correctness.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn- get-root-summarizer [inp-set fs] (sp-ts (make-atomic-subproblem fs inp-set )))

;; TODO: sa options...
(defn implicit-dash-a*
