X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_refiner%2FnCicMetaSubst.mli;h=1c96577a74121d90639bbc6905dd7345bd5d647a;hb=186638106f23401e88e512a4a6dfd07d73d8be04;hp=3223304888fcef0b87302147a62210e5234eb032;hpb=27bce1d83422883b6415862ec92e75baf4f87186;p=helm.git diff --git a/helm/software/components/ng_refiner/nCicMetaSubst.mli b/helm/software/components/ng_refiner/nCicMetaSubst.mli index 322330488..1c96577a7 100644 --- a/helm/software/components/ng_refiner/nCicMetaSubst.mli +++ b/helm/software/components/ng_refiner/nCicMetaSubst.mli @@ -14,22 +14,14 @@ 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 debug: bool ref -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,7 +35,41 @@ 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 -> - Cic.metasenv * Cic.substitution * Cic.term - + (NCic.metasenv * NCic.substitution) * NCic.term + +(* restrict metasenv subst n l + returns metasenv, subst, created meta and l' where l' is the list of + additional (i.e. l' does not intersects l) positions whose restriction was + forced because of type dependencies *) +val restrict: + NCic.metasenv -> + NCic.substitution -> + int -> int list -> + NCic.metasenv * NCic.substitution * int * int list + +(* bool = true if the type of the new meta is closed *) +val mk_meta: + ?attrs:NCic.meta_attrs -> + NCic.metasenv -> NCic.context -> + ?with_type:NCic.term -> NCicUntrusted.meta_kind -> + NCic.metasenv * int * NCic.term * NCic.term (* menv,metano,instance,type *) + +(* extend_meta m n: n must be in m *) +val extend_meta: NCic.metasenv -> int -> NCic.metasenv * NCic.term + +(* returns the resulting type, the metasenv and the arguments *) +val saturate: + ?delta:int -> NCic.metasenv -> NCic.substitution -> + NCic.context -> NCic.term -> int -> + NCic.term * NCic.metasenv * NCic.term list + +val pack_lc : int * NCic.lc_kind -> int * NCic.lc_kind + +val is_out_scope_tag : NCic.meta_attrs -> bool +val int_of_out_scope_tag : NCic.meta_attrs -> int + +val is_flexible : NCic.context -> subst:NCic.substitution -> NCic.term -> bool