(* $Id: orderings.ml 9869 2009-06-11 22:52:38Z denes $ *)
let debug s = prerr_endline s ;;
-let debug _ = ();;
+(* let debug _ = ();;*)
let monster = 500;;
(false,cl,remove_passive_clause passives cl,g_passives)
else
let g_cl = pick_min_passive ~use_age:use_age g_passives in
- if (fst cl <= fst g_cl) then
+ let (id1,_,_,_),(id2,_,_,_) = snd cl, snd g_cl in
+ let cmp = if use_age then id1 <= id2
+ else fst cl <= fst g_cl
+ in
+ if cmp then
(false,cl,remove_passive_clause passives cl,g_passives)
else
(true,g_cl,passives,remove_passive_clause g_passives g_cl)
end
else raise (Failure ("Timeout !",bag,maxvar,iterno));
- (* let use_age = iterno mod 10 = 0 in *)
+ let use_age = iterno mod 5 = 0 in
let rec aux_select bag passives g_passives =
let backward,(weight,current),passives,g_passives =
- select ~use_age:false passives g_passives
+ select ~use_age passives g_passives
in
+ if use_age && weight > monster then
+ let bag,cl = Utils.add_to_bag bag current in
+ if backward then
+ aux_select bag passives (add_passive_clause g_passives cl)
+ else
+ aux_select bag (add_passive_clause passives cl) g_passives
+ else
if backward then
+ let _ = debug ("Selected goal : " ^ Pp.pp_unit_clause current) in
match
if noinfer then
if weight > monster then None else Some (bag,current)