(* $Id: orderings.ml 9869 2009-06-11 22:52:38Z denes $ *)
-let debug s = prerr_endline s ;;
-let debug _ = ();;
+let debug s = prerr_endline (Lazy.force s) ;;
+let debug _ = ();;
let monster = 100;;
let backward_infer_step bag maxvar actives passives
g_actives g_passives g_current iterno =
(* superposition left, simplifications on goals *)
- debug "infer_left step...";
+ debug (lazy "infer_left step...");
let bag, maxvar, new_goals =
Sup.infer_left bag maxvar g_current actives
in
- debug "Performed infer_left step";
+ debug (lazy "Performed infer_left step");
let bag = Terms.replace_in_bag (g_current,false,iterno) bag in
bag, maxvar, actives, passives, g_current::g_actives,
(add_passive_goals g_passives new_goals)
* new = supright e'' A'' *
* new'= demod A'' new *
* P' = P + new' *)
- debug "Forward infer step...";
+ debug (lazy "Forward infer step...");
debug (lazy("Number of actives : " ^ (string_of_int (List.length (fst actives)))));
let bag, maxvar, actives, new_clauses =
Sup.infer_right bag maxvar current actives
in
- debug "Demodulating goals with actives...";
+ debug (lazy "Demodulating goals with actives...");
(* keep goals demodulated w.r.t. actives and check if solved *)
let bag, g_actives =
List.fold_left
if weight > monster then bag,None
else bag, Some (current,actives)
else if Sup.orphan_murder bag (fst actives) current then
- let _ = debug "Orphan murdered" in
+ let _ = debug (lazy "Orphan murdered") in
let bag = Terms.replace_in_bag (current,true,iterno) bag in
bag, None
else Sup.keep_simplified current actives bag maxvar