 (def ^:dynamic *throw-exception-if-failed-to-add-complement* false)
 
 (defn moreover-comp [parent child lexfn-sem-impl]
-  (log/trace (str "moreover-comp type parent: " (type parent)))
-  (log/trace (str "moreover-comp type comp:" (type child)))
+  (log/debug (str "moreover-comp type parent: " (type parent)))
+  (log/debug (str "moreover-comp type comp:" (type child)))
   (log/debug (str "moreover-comp: child cat: " (get-in child [:synsem :cat])))
   (log/debug (str "moreover-comp: parent comp cat: " (get-in parent [:comp :synsem :cat])))
   

        (log/trace (str "moreover-comp:  parent value: " (strip-refs (get-in parent (fail-path result)))))
        :fail))))

(defn overh [parent head morph]
  "add given head as the head child of the phrase: parent."
  (when (map? parent)
    (do
      (log/trace (str "overh: parent: " (strip-refs parent)))))

  (cond


                  (get-in child [:synsem :subcat] :top)))))

(defn moreover-head [parent child lexfn-sem-impl morph]
  (let [morph (if morph morph (fn [x] (strip-refs (dissoc x :serialized))))]
    (log/debug (str "moreover-head (candidate) parent: [" (get-in parent [:rule]) "] '" (morph parent) "' sem:    " (strip-refs (get-in parent '(:synsem :sem) :no-semantics))))
    (log/debug (str "moreover-head (candidate) head child: [" (get-in parent [:child]) "] '" (morph child) "' sem:" (strip-refs (get-in child '(:synsem :sem) :top))))
    (let [head-pre-checks (head-pre-checks parent child)
          result
          (if head-pre-checks
            (do
              (log/debug (str "head failed prechecks."))
              :fail)
            (unify
             (copy parent)
             (unify {:head (copy child)
