   (make-wrapped-subproblem
    (oc-name (sp-name inner-sp)) (input-set inner-sp) #{:Atomic :Pair} inner-sp
    identity
-   (fn child-watch [sp child-sp]
+   (fn child-watch [sp child-sp] #_ (println inner-sp sp child-sp)
      (if (=-state-sets (get-output-set! inner-sp) (get-output-set! child-sp))
        (do (connect-and-watch! sp child-sp nil #(child-watch sp %2))
            (summaries/summary-changed! sp))

  (get-children        [s]  "List current outputs, for debugging only.")
  (add-child-watcher!  [s w] "Add a watcher to be notified of all child sps.")

  (subsuming-sps       [ts] "subproblems with same name, >= inp-set") 
  (add-subsuming-sp!   [ts subsuming-sp]) 

  (refine-input        [s refined-input-set] "Return a child sp. Must have output.")


       s
       (if (= :Atomic (first (sp-name inner-sp)))
         (let [ret (get-subproblem (sp-name s) ni)]
           (add-subsuming-sp! ret inner-sp)
           ret)
         (make-output-collecting-subproblem (refine-input inner-sp ni)))))))

