(* let debug_print = fun _ -> () *)
-(* Da rimuovere, solo per debug*)
-let print_context ctx =
- let print_name =
- function
- Cic.Name n -> n
- | Cic.Anonymous -> "_"
- in
- List.fold_right
- (fun i (output,context) ->
- let (newoutput,context') =
- match i with
- Some (n,Cic.Decl t) ->
- print_name n ^ ":" ^ CicPp.pp t context ^ "\n", (Some n)::context
- | Some (n,Cic.Def (t,None)) ->
- print_name n ^ ":=" ^ CicPp.pp t context ^ "\n", (Some n)::context
- | None ->
- "_ ?= _\n", None::context
- | Some (_,Cic.Def (_,Some _)) -> assert false
- in
- output^newoutput,context'
- ) ctx ("",[])
- ;;
-
+let experimental_hint =
+ let profile = CicUtil.profile "experimental_hint" in
+ fun ~dbd ~facts ?signature status ->
+ profile (MetadataQuery.experimental_hint ~dbd ~facts ?signature) status
let search_theorems_in_context status =
let (proof, goal) = status in
Some (ey, ty) ->
(* the goal is still there *)
(*
- debug_print ("CURRENT GOAL = " ^ (CicPp.ppterm ty));
- debug_print ("CURRENT PROOF = " ^ (CicPp.ppterm p));
- debug_print ("CURRENT HYP = " ^ (fst (print_context ey)));
+ debug_print ("CURRENT GOAL = " ^ CicPp.ppterm ty);
+ debug_print ("CURRENT PROOF = " ^ CicPp.ppterm p);
+ debug_print ("CURRENT HYP = " ^ CicPp.ppcontext ey);
*)
(* if the goal contains metavariables we use the input
signature for at_most constraints *)
[] (* the empty list means no choices, i.e. failure *)
| No _
| NotYetInspected ->
- debug_print ("CURRENT GOAL = " ^ (CicPp.ppterm ty));
- debug_print ("CURRENT PROOF = " ^ (CicPp.ppterm p));
- debug_print ("CURRENT HYP = " ^ (fst (print_context ey)));
+ debug_print ("CURRENT GOAL = " ^ CicPp.ppterm ty);
+ debug_print ("CURRENT PROOF = " ^ CicPp.ppterm p);
+ debug_print ("CURRENT HYP = " ^ CicPp.ppcontext ey);
let sign, new_sign =
if is_meta_closed then
None, Some (MetadataConstraints.signature_of ty)
new_search_theorems
(fun status ->
List.map snd
- (MetadataQuery.experimental_hint
+ (experimental_hint
~dbd ~facts:facts ?signature:sign status))
dbd proof goal (depth-1) new_sign in
let all_choices =