X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2FnCicBlob.ml;h=bc7289176776131a7837e35c0a86dd811d9b93ca;hb=f7804325dbb5b51820edefe5d5ffff89809fe35c;hp=91746f210480f9eefae71b9cfde9aea198c238c0;hpb=1341f9c234571b4172cd76cd84e7230039cb4642;p=helm.git diff --git a/helm/software/components/ng_paramodulation/nCicBlob.ml b/helm/software/components/ng_paramodulation/nCicBlob.ml index 91746f210..bc7289176 100644 --- a/helm/software/components/ng_paramodulation/nCicBlob.ml +++ b/helm/software/components/ng_paramodulation/nCicBlob.ml @@ -11,6 +11,29 @@ (* $Id: terms.mli 9822 2009-06-03 15:37:06Z tassi $ *) +let eqPref = ref (fun _ -> assert false);; +let set_eqP t = eqPref := fun _ -> t;; + +let default_eqP() = + let uri = NUri.uri_of_string "cic:/matita/ng/Plogic/equality/eq.ind" in + let ref = NReference.reference_of_spec uri (NReference.Ind(true,0,2)) in + NCic.Const ref +;; + +let set_default_eqP() = eqPref := default_eqP + +let set_reference_of_oxuri f = + let eqnew = function + _ -> + let r = f(UriManager.uri_of_string + "cic:/matita/logic/equality/eq.ind#xpointer(1/1)") + in + NCic.Const r + in + eqPref := eqnew +;; + + module type NCicContext = sig val metasenv : NCic.metasenv @@ -23,7 +46,8 @@ with type t = NCic.term and type input = NCic.term = struct type t = NCic.term - let eq x y = NCicReduction.alpha_eq C.metasenv C.subst C.context x y;; + let eq x y = x = y;; + (* NCicReduction.alpha_eq C.metasenv C.subst C.context x y;; *) let rec compare x y = match x,y with @@ -37,11 +61,14 @@ with type t = NCic.term and type input = NCic.term = struct | ( NCic.Meta _ | NCic.Appl _ ), NCic.Const _ -> 1 | NCic.Appl _, NCic.Meta _ -> ~-1 | NCic.Meta _, NCic.Appl _ -> 1 - | _ -> assert false + | _ -> Pervasives.compare x y + (* was assert false, but why? *) + ;; let compare x y = - if NCicReduction.alpha_eq C.metasenv C.subst C.context x y then 0 + (* if NCicReduction.alpha_eq C.metasenv C.subst C.context x y then 0 *) + if x = y then 0 else compare x y ;; @@ -67,7 +94,7 @@ with type t = NCic.term and type input = NCic.term = struct let saturate t ty = let sty, _, args = - NCicMetaSubst.saturate ~delta:max_int C.metasenv C.subst C.context + NCicMetaSubst.saturate ~delta:0 C.metasenv C.subst C.context ty 0 in let proof = @@ -77,14 +104,8 @@ with type t = NCic.term and type input = NCic.term = struct let sty = embed sty in proof, sty ;; - - let eqP = - let r = - OCic2NCic.reference_of_oxuri - (UriManager.uri_of_string - "cic:/matita/logic/equality/eq.ind#xpointer(1/1)") - in - NCic.Const r + + let eqP = (!eqPref)() ;; end