X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnCicEnvironment.mli;h=5128831bea9ed279a6097203e99e253578294e6c;hb=2da35c1dc1aff5f852886ac64d641774f2f187cf;hp=a9feb4d20f22007b8e2798cc1c6f9586d94d455b;hpb=bd1e80fb01cfb419e256d5899ac5bf8818f11e64;p=helm.git diff --git a/helm/software/components/ng_kernel/nCicEnvironment.mli b/helm/software/components/ng_kernel/nCicEnvironment.mli index a9feb4d20..5128831be 100644 --- a/helm/software/components/ng_kernel/nCicEnvironment.mli +++ b/helm/software/components/ng_kernel/nCicEnvironment.mli @@ -14,7 +14,7 @@ exception CircularDependency of string Lazy.t;; exception ObjectNotFound of string Lazy.t;; exception BadDependency of string Lazy.t * exn;; -exception BadConstraint of string Lazy.t;; +exception AlreadyDefined of string Lazy.t;; val set_get_obj: (NUri.uri -> NCic.obj) -> unit @@ -24,19 +24,6 @@ val check_and_add_obj: NCic.obj -> unit val get_relevance: NReference.reference -> bool list -val type0: NCic.universe -val max: NCic.universe -> NCic.universe -> NCic.universe -(* universe_* raise BadConstraints if the second arg. is an inferred universe *) -val universe_eq: NCic.universe -> NCic.universe -> bool -val universe_leq: NCic.universe -> NCic.universe -> bool -(* add_constraint raise BadConstraint in case of universe inconsistency - or if the second argument is an inferred universe - true -> strict check (<); false -> loose check (<=) -*) -val add_constraint: bool -> NCic.universe -> NCic.universe -> unit -val sup : NCic.universe -> NCic.universe option -val pp_constraints: unit -> string - val get_checked_def: NReference.reference -> NCic.relevance * string * NCic.term * NCic.term * NCic.c_attr * int @@ -51,10 +38,48 @@ val get_checked_fixes_or_cofixes: NCic.inductiveFun list * NCic.f_attr * int (* invalidate the object and all those that entered the environment after it *) -val invalidate_obj: NUri.uri -> unit +val invalidate_item: + [ `Obj of NUri.uri * NCic.obj + | `Constr of NCic.universe * NCic.universe ] -> unit val invalidate: unit -> unit val set_typecheck_obj: (NCic.obj -> unit) -> unit +(* =========== universes ============= *) + +(* utils *) +val ppsort : Format.formatter -> NCic.sort -> unit +val pp_constraints: unit -> string +val get_universes: unit -> NCic.universe list + +(* use to type products *) +val max: NCic.universe -> NCic.universe -> NCic.universe + +(* raise BadConstraints if the second arg. is an inferred universe or + * if the added constraint gives circularity *) +exception BadConstraint of string Lazy.t;; +val add_lt_constraint: NCic.universe -> NCic.universe -> unit +val universe_eq: NCic.universe -> NCic.universe -> bool +val universe_leq: NCic.universe -> NCic.universe -> bool +val universe_lt: NCic.universe -> NCic.universe -> bool + +(* checks if s1 <= s2 *) +val are_sorts_convertible: test_eq_only:bool -> NCic.sort -> NCic.sort -> bool + +(* to type a Match *) +val allowed_sort_elimination: NCic.sort -> NCic.sort -> [ `Yes | `UnitOnly ] + +(* algebraic successor function *) +exception UntypableSort of string Lazy.t +exception AssertFailure of string Lazy.t +val typeof_sort: NCic.sort -> NCic.sort + +(* looks for a declared universe that is the least one above the input *) +val sup : NCic.universe -> NCic.universe option +val inf : strict:bool -> NCic.universe -> NCic.universe option +val family_of : NCic.universe -> [ `CProp | `Type ] + +(* =========== /universes ============= *) + (* EOF *)