X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnCicEnvironment.mli;h=5128831bea9ed279a6097203e99e253578294e6c;hb=95adf6dc8e29a71adc34e71eafe3f427990126e0;hp=53e6a6ffe5ecf54d72b62adfea1c2a97b409da9c;hpb=7bf119d0c9d56ca0cb75c448beebf57bba7c8c6e;p=helm.git diff --git a/helm/software/components/ng_kernel/nCicEnvironment.mli b/helm/software/components/ng_kernel/nCicEnvironment.mli index 53e6a6ffe..5128831be 100644 --- a/helm/software/components/ng_kernel/nCicEnvironment.mli +++ b/helm/software/components/ng_kernel/nCicEnvironment.mli @@ -1,33 +1,29 @@ -(* Copyright (C) 2000, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(* NG: minimal wrapper on the old cicEnvironment, should provide only the - * functions strictly necessary to the typechecking algorithm *) +(* + ||M|| This file is part of HELM, an Hypertextual, Electronic + ||A|| Library of Mathematics, developed at the Computer Science + ||T|| Department, University of Bologna, Italy. + ||I|| + ||T|| HELM is free software; you can redistribute it and/or + ||A|| modify it under the terms of the GNU General Public License + \ / version 2 or (at your option) any later version. + \ / This software is distributed as is, NO WARRANTY. + V_______________________________________________________________ *) + +(* $Id$ *) + +exception CircularDependency of string Lazy.t;; +exception ObjectNotFound of string Lazy.t;; +exception BadDependency of string Lazy.t * exn;; +exception AlreadyDefined of string Lazy.t;; + +val set_get_obj: (NUri.uri -> NCic.obj) -> unit val get_checked_obj: NUri.uri -> NCic.obj +val check_and_add_obj: NCic.obj -> unit + +val get_relevance: NReference.reference -> bool list + val get_checked_def: NReference.reference -> NCic.relevance * string * NCic.term * NCic.term * NCic.c_attr * int @@ -37,14 +33,53 @@ val get_checked_indtys: NReference.reference -> bool * int * NCic.inductiveType list * NCic.i_attr * int -val get_checked_fix: +val get_checked_fixes_or_cofixes: NReference.reference -> - NCic.relevance * string * NCic.term * NCic.term * NCic.f_attr * int + NCic.inductiveFun list * NCic.f_attr * int -val get_checked_cofix: - NReference.reference -> - NCic.relevance * string * NCic.term * NCic.term * NCic.f_attr * int +(* invalidate the object and all those that entered the environment after it *) +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 ] -val get_indty_leftno: NReference.reference -> int +(* =========== /universes ============= *) (* EOF *)