- x)
- | x::_, _ ->
- prerr_endline ("INSTANTIATING " ^ string_of_var p.var_names x);
- x in
-(* Strategy that decreases the special_k to 0 first (round robin)
-1:11m42 2:14m5 3:11m16s 4:14m46s 5:12m7s 6:6m31s *)
- let x =
- try
- match
- hd_of (List.find (fun t ->
- compute_special_k (Listx.Nil (t :> nf)) > 0 && arity_of_hd t > 0
- ) (all_terms p))
- with
- | None -> assert false
- | Some x ->
- prerr_endline ("INSTANTIATING AND HOPING " ^ string_of_var p.var_names x);
- x
- with
- Not_found ->
- let arity_of_x = max_arity_tms x (all_terms p) in
- assert (Util.option_get arity_of_x > 0);
- x in
-(* Instantiate in decreasing order of compute_special_k
-1:15m14s 2:13m14s 3:4m55s 4:4m43s 5:4m34s 6:6m28s 7:3m31s
-let x =
- try
- (match hd_of (snd (List.hd (List.sort (fun c1 c2 -> - compare (fst c1) (fst c2)) (filter_map (function `I _ as t -> Some (compute_special_k (Listx.Nil (t :> nf)),t) | _ -> None) (all_terms p))))) with
- None -> assert false
- | Some x ->
- prerr_endline ("INSTANTIATING AND HOPING " ^ string_of_var x);
- x)
- with
- Not_found -> x
-in*)
- let special_k =
- compute_special_k (Listx.from_list (all_terms p :> nf list) )in
- if special_k < n then
- prerr_endline ("@@@@ NEW INSTANTIATE PHASE (" ^ string_of_int special_k ^ ") @@@@");