if Utils.debug_metas then
ignore(check_for_duplicates menv "unification_aux prima di apply_subst");
let menv = Subst.apply_subst_metasenv subst menv in
- let _ = check_for_duplicates menv "unif_aux after" in
- check_metasenv "unification_aux after 1" menv;
- subst, menv, ug
+ if Utils.debug_metas then
+ (let _ = check_for_duplicates menv "unif_aux after" in
+ check_metasenv "unification_aux after 1" menv);
+ subst, menv, ug
;;
exception MatchingFailure;;
List.exists
(fun (_,_,ty) ->
try
- let s,_ = CicTypeChecker.type_of_aux' metas ctx ty CicUniv.empty_ugraph
+ let s,_ = CicTypeChecker.type_of_aux' metas ctx ty CicUniv.oblivion_ugraph
in s = Cic.Sort(Cic.Prop)
with _ ->
prerr_endline ("ERROR typing " ^ CicPp.ppterm ty); assert false) metas
Founif.matching
metasenv metas context term (S.lift lift_amount c) ugraph
in
- check_metasenv "founif :" metasenv';
+ if Utils.debug_metas then
+ check_metasenv "founif :" metasenv';
Some (Cic.Rel(1+lift_amount),subst',metasenv',ugraph',candidate)
in
let c, other =
let _, _, (ty, left, right, _), tmetas, _ = Equality.open_equality target in
let _, context, ugraph = env in
let metasenv = tmetas in
- check_for_duplicates metasenv "subsumption_aux_all";
+ if Utils.debug_metas then
+ check_for_duplicates metasenv "subsumption_aux_all";
let predicate, unif_fun =
if use_unification then
Unification, Founif.unification
let module S = CicSubstitution in
let module M = CicMetaSubst in
let module HL = HelmLibraryObjects in
- check_for_duplicates metasenv "in input a demodulation aux";
+ if Utils.debug_metas then
+ check_for_duplicates metasenv "in input a demodulation aux";
let candidates =
get_candidates
~env:(metasenv,context,ugraph) (* Unification *) Matching table term
- in let candidates = List.filter (fun _,x -> not (not_unit_eq context x)) candidates
- in
+ in
+(* let candidates = List.filter (fun _,x -> not (not_unit_eq context x)) candidates in *)
let res =
match term with
| C.Meta _ -> None
| C.Meta (i, l) -> res, lifted_term
| term ->
let termty, ugraph =
-(* C.Implicit None, ugraph *)
- CicTypeChecker.type_of_aux' metasenv context term ugraph
+ C.Implicit None, ugraph
+(* CicTypeChecker.type_of_aux' metasenv context term ugraph *)
in
let candidates = get_candidates Unification table term in
(* List.iter (fun (_,e) -> debug_print (lazy (Equality.string_of_equality e))) candidates; *)
(fun (subst, equality, swapped) (bag,acc) ->
let (_,p,(ty,l,r,_),m,id) = Equality.open_equality equality in
let cicmenv = Subst.apply_subst_metasenv subst (m @ menv) in
- Indexing.check_for_duplicates cicmenv "from subsumption";
+ if Utils.debug_metas then
+ Indexing.check_for_duplicates cicmenv "from subsumption";
let bag, p =
if swapped then
Equality.symmetric bag eq_ty l id uri m