open AutoTypes;;
open AutoCache;;
-let debug = false;;
+let debug = true;;
let debug_print s =
if debug then prerr_endline (Lazy.force s);;
in
debug_print (lazy (" OK: " ^ ppterm cand));
let metasenv = CicRefine.pack_coercion_metasenv metasenv in
- assert_subst_are_disjoint subst subst';
- let subst = subst@subst' in
+ (* assert_subst_are_disjoint subst subst'; *)
+ let subst = subst' in
let open_goals = order_new_goals metasenv subst open_goals ppterm in
let open_goals = List.map (fun (x,sort) -> x,depth-1,sort) open_goals in
Some (metasenv,subst,open_goals), tables , maxmeta
debug_print
(lazy ("INSPECTING " ^ string_of_int goalno^ ":"^ppterm goalty));
debug_print (lazy (AutoCache.cache_print context cache));
- if sort = T && tl <> [] then (* FIXME!!!! *)
+ if sort = T (* && tl <> []*) then
+ Success (metasenv,subst,tl), tables, cache,maxm
+ (*
(debug_print
(lazy (" FAILURE(not in prop)"));
- aux flags tables maxm cache tl (* FAILURE (not in prop) *))
+ aux flags tables maxm cache tl (* FAILURE (not in prop) *)) *)
else
match aux_single flags tables maxm universe cache metasenv subst elem goalty cc with
| Fail s, tables, cache, maxm' ->
debug_print
(lazy ("DONE: " ^ ppterm goalty^" with: "^ppterm proof));
if is_a_green_cut goalty then
- (assert_proof_is_valid proof metasenv context goalty;
+ (* assert_proof_is_valid proof metasenv context goalty; *)
let cache = cache_add_success sort cache goalty proof in
- aux flags tables maxm cache ((metasenv,subst,gl)::tl))
+ aux flags tables maxm cache ((metasenv,subst,gl)::tl)
else
(let goalty = CicMetaSubst.apply_subst subst goalty in
- assert_proof_is_valid proof metasenv context goalty;
+ (* assert_proof_is_valid proof metasenv context goalty; *)
let cache =
if is_a_green_cut goalty then
cache_add_success sort cache goalty proof
let goalty = CicMetaSubst.apply_subst subst goalty in
(* else if not (is_in_prop context subst metasenv goalty) then Fail,cache *)
(* FAILURE (euristic cut) *)
+ if depth <= 0 then
+ Fail (string_of_int goalno ^ "as depth <=0"),
+ tables,cache,maxm (*FAILURE(depth)*)
+ else
match cache_examine cache goalty with
| Failed_in d when d >= depth ->
Fail ("depth " ^ string_of_int d ^ ">=" ^ string_of_int depth),