X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fng_refiner%2FnCicCoercion.ml;h=757041451bbe7978aeb30d0dcdaf88cdf35663d8;hb=aff007d80f87128884c96a664bc88aec69107d85;hp=d168ba5488d9ffa1ccf92311887ab05da4767cba;hpb=20427121e8114fa60b64bd1669a0fc734bf39205;p=helm.git diff --git a/helm/software/components/ng_refiner/nCicCoercion.ml b/helm/software/components/ng_refiner/nCicCoercion.ml index d168ba548..757041451 100644 --- a/helm/software/components/ng_refiner/nCicCoercion.ml +++ b/helm/software/components/ng_refiner/nCicCoercion.ml @@ -12,7 +12,7 @@ (* $Id: nCicRefiner.mli 9227 2008-11-21 16:00:06Z tassi $ *) let debug s = prerr_endline (Lazy.force s);; -let debug _ = ();; +(* let debug _ = ();; *) module COT : Set.OrderedType with type t = string * NCic.term * int * int * NCic.term * @@ -98,10 +98,13 @@ let index_old_db odb (status : #status) = let look_for_coercion status metasenv subst context infty expty = let db_src,db_tgt = status#coerc_db in - match infty, expty with + match + NCicUntrusted.apply_subst subst context infty, + NCicUntrusted.apply_subst subst context expty + with | (NCic.Meta _ | NCic.Appl (NCic.Meta _::_)), (NCic.Meta _ | NCic.Appl (NCic.Meta _::_)) -> [] - | _ -> + | infty, expty -> debug (lazy ("LOOK FOR COERCIONS: " ^ NCicPp.ppterm ~metasenv ~subst ~context infty ^ " |===> " ^ @@ -122,6 +125,16 @@ let look_for_coercion status metasenv subst context infty expty = CoercionSet.union (DB.retrieve_unifiables db_tgt expty) set) CoercionSet.empty tgt_class in + + debug (lazy ("CANDIDATES SRC: " ^ + String.concat "," (List.map (fun (name,t,_,_,_,_) -> + name ^ " :: " ^ NCicPp.ppterm ~metasenv ~subst ~context t) + (CoercionSet.elements set_src)))); + debug (lazy ("CANDIDATES TGT: " ^ + String.concat "," (List.map (fun (name,t,_,_,_,_) -> + name ^ " :: " ^ NCicPp.ppterm ~metasenv ~subst ~context t) + (CoercionSet.elements set_tgt)))); + let candidates = CoercionSet.inter set_src set_tgt in debug (lazy ("CANDIDATES: " ^