let cache_empty = (Universe.empty,[]);;
let get_candidates (univ,_) ty =
- if Universe.key ty = ty then
+(* if Universe.key ty = ty then *)
Universe.get_candidates univ ty
+(*
else
- []
+ (prerr_endline ("skip: " ^ CicPp.ppterm (Universe.key ty)); [])
+ *)
;;
let index (univ,cache) key term =
let univ =
List.fold_left
(fun univ (t,ty) ->
+ prerr_endline ("indexing: " ^ CicPp.ppterm ty);
Universe.index_local_term univ context t ty)
univ terms_and_types
in
let cache_examine (_,oldcache) cache_key =
prerr_endline ("examine : " ^ CicPp.ppterm cache_key);
- try List.assoc cache_key oldcache with Not_found ->
+ try snd (List.find (fun (x,_) -> CicUtil.alpha_equivalence x cache_key)
+ oldcache) with Not_found ->
prerr_endline "notfound";
Notfound
;;