From f27a3e2fa6aee86ef255842b51bdfa8a92a99ce5 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 27 Jun 2006 16:53:48 +0000 Subject: [PATCH] used the new metadataConstraint function to retrieve equalities from the library --- .../tactics/paramodulation/inference.ml | 30 +++++++++++++++++-- .../tactics/paramodulation/inference.mli | 2 +- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/components/tactics/paramodulation/inference.ml b/components/tactics/paramodulation/inference.ml index 1c3daffec..a27116bc9 100644 --- a/components/tactics/paramodulation/inference.ml +++ b/components/tactics/paramodulation/inference.ml @@ -331,12 +331,38 @@ let utty_of_u u = u, t, ty ;; -let find_library_equalities dbd context status maxmeta = +let find_library_equalities caso_strano dbd context status maxmeta = let module C = Cic in let module S = CicSubstitution in let module T = CicTypeChecker in let _ = <:start> in - let eqs = (MetadataQuery.equations_for_goal ~dbd status) in + let signature = + if caso_strano then + begin + let proof, goalno = status in + let _,metasenv,_,_ = proof in + let metano,context,ty = CicUtil.lookup_meta goalno metasenv in + match ty with + | Cic.Appl[Cic.MutInd(u,0,_);eq_ty;l;r] -> + (let mainl, sigl = MetadataConstraints.signature_of l in + let mainr, sigr = MetadataConstraints.signature_of r in + match mainl,mainr with + | Some (uril,tyl), Some (urir, tyr) + when LibraryObjects.is_eq_URI uril && + LibraryObjects.is_eq_URI urir && + tyl = tyr -> + Some (mainl,MetadataConstraints.UriManagerSet.union sigl sigr) + | _ -> + let u = (UriManager.uri_of_string + (UriManager.string_of_uri u ^ "#xpointer(1/1)")) in + let main = Some (u, []) in + Some (main,MetadataConstraints.UriManagerSet.union sigl sigr)) + | _ -> assert false + end + else + None + in + let eqs = (MetadataQuery.equations_for_goal ~dbd ?signature status) in let _ = <:stop> in let candidates = List.fold_left diff --git a/components/tactics/paramodulation/inference.mli b/components/tactics/paramodulation/inference.mli index 0de5e8433..5c6a1979b 100644 --- a/components/tactics/paramodulation/inference.mli +++ b/components/tactics/paramodulation/inference.mli @@ -57,7 +57,7 @@ val find_equalities: searches the library for equalities that can be applied to the current goal *) val find_library_equalities: - HMysql.dbd -> Cic.context -> ProofEngineTypes.status -> int -> + bool -> HMysql.dbd -> Cic.context -> ProofEngineTypes.status -> int -> UriManager.UriSet.t * (UriManager.uri * Equality.equality) list * int (** -- 2.39.2