X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_refiner%2FnCicUnifHint.ml;h=0f0708d638f58cef8fac17303492c6f7111a68b6;hb=6686ac3a4671abce7c053c9fee7696eeb2182583;hp=e3112f3f2c1d6df176dd19e10cbd527713f9b73c;hpb=7b112b0cd39c5ab0db5c28636c0a7f7e36b4d6e2;p=helm.git diff --git a/helm/software/components/ng_refiner/nCicUnifHint.ml b/helm/software/components/ng_refiner/nCicUnifHint.ml index e3112f3f2..0f0708d63 100644 --- a/helm/software/components/ng_refiner/nCicUnifHint.ml +++ b/helm/software/components/ng_refiner/nCicUnifHint.ml @@ -144,6 +144,7 @@ let add_user_provided_hint db t precedence = index_hint db c a b precedence ;; +(* let db () = let combine f l = List.flatten @@ -203,6 +204,7 @@ let db () = !user_db (List.flatten hints) *) ;; +*) let saturate ?(delta=0) metasenv subst context ty goal_arity = assert (goal_arity >= 0); @@ -210,7 +212,8 @@ let saturate ?(delta=0) metasenv subst context ty goal_arity = | NCic.Prod (name,s,t) as ty -> let metasenv1, _, arg,_ = NCicMetaSubst.mk_meta ~attrs:[`Name name] metasenv context - (`WithType s) in + ~with_type:s `IsTerm + in let t, metasenv1, args, pno = aux metasenv1 (NCicSubstitution.subst arg t) in @@ -247,6 +250,11 @@ let eq_class_of hdb t1 = ;; let look_for_hint hdb metasenv subst context t1 t2 = + if NDiscriminationTree.NCicIndexable.path_string_of t1 = + [Discrimination_tree.Variable] || + NDiscriminationTree.NCicIndexable.path_string_of t2 = + [Discrimination_tree.Variable] then [] else begin + debug(lazy ("KEY1: "^NCicPp.ppterm ~metasenv ~subst ~context t1)); debug(lazy ("KEY2: "^NCicPp.ppterm ~metasenv ~subst ~context t2)); (* @@ -277,7 +285,8 @@ let look_for_hint hdb metasenv subst context t1 t2 = | NCic.LetIn (name,ty,bo,t) -> let m,_,i,_= NCicMetaSubst.mk_meta ~attrs:[`Name name] m context - (`WithType ty)in + ~with_type:ty `IsTerm + in let t = NCicSubstitution.subst i t in aux () (m, (i,bo)::l) t | t -> NCicUntrusted.map_term_fold_a (fun _ () -> ()) () aux acc t @@ -314,6 +323,7 @@ let look_for_hint hdb metasenv subst context t1 t2 = rc))); rc + end ;; let pp_hint t p =