X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_refiner%2FnCicMetaSubst.mli;h=4cce960956f37a9eae86922aa3b5c2f4e823254d;hb=806ecbdd749ecf2a1cabff52b41cf748fe022401;hp=1d7b6729e11ee5d6be2db10be7f2bbe3c8e08ebd;hpb=002d456397be2f0046bb50356e80816f7296647d;p=helm.git diff --git a/helm/software/components/ng_refiner/nCicMetaSubst.mli b/helm/software/components/ng_refiner/nCicMetaSubst.mli index 1d7b6729e..4cce96095 100644 --- a/helm/software/components/ng_refiner/nCicMetaSubst.mli +++ b/helm/software/components/ng_refiner/nCicMetaSubst.mli @@ -14,22 +14,12 @@ exception MetaSubstFailure of string Lazy.t exception Uncertain of string Lazy.t -(* -exception AssertFailure of string Lazy.t -exception DeliftingARelWouldCaptureAFreeVariable;; -val apply_subst : Cic.substitution -> Cic.term -> Cic.term -val apply_subst_context : Cic.substitution -> Cic.context -> Cic.context -val apply_subst_metasenv: Cic.substitution -> Cic.metasenv -> Cic.metasenv - -(*** delifting ***) - -val restrict : - Cic.substitution -> (int * int) list -> Cic.metasenv -> - Cic.metasenv * Cic.substitution -*) +(* the index of the last created meta *) +val maxmeta: unit -> int (* the delift function takes in input a metavariable index, a local_context - * and a term t, and substitutes every Rel in t with its position in + * and a term t, and substitutes every subterm t' of t with its position + * (searched up-to unification) in * the local_context (which is the Rel moved to the canonical context). * Typically, the list of optional terms is the explicit * substitution that is applied to a metavariable occurrence and the result of @@ -43,6 +33,8 @@ val restrict : * in the term (for occur check). *) val delift : + unify:(NCic.metasenv -> NCic.substitution -> NCic.context -> + NCic.term -> NCic.term -> (NCic.metasenv * NCic.substitution) option) -> NCic.metasenv -> NCic.substitution -> NCic.context -> int -> NCic.local_context -> NCic.term -> (NCic.metasenv * NCic.substitution) * NCic.term @@ -54,10 +46,10 @@ val restrict: (* bool = true if the type of the new meta is closed *) val mk_meta: - ?name:string -> + ?attrs:NCic.meta_attrs -> NCic.metasenv -> NCic.context -> [ `WithType of NCic.term | `Term | `Type | `Sort ] -> - NCic.metasenv * NCic.term * NCic.term (* menv, instance, type *) + NCic.metasenv * int * NCic.term * NCic.term (* menv,metano,instance,type *) (* returns the resulting type, the metasenv and the arguments *) val saturate: @@ -65,3 +57,5 @@ val saturate: NCic.context -> NCic.term -> int -> NCic.term * NCic.metasenv * NCic.term list +val is_out_scope_tag : NCic.meta_attrs -> bool +val int_of_out_scope_tag : NCic.meta_attrs -> int