1 (* Copyright (C) 2000, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
26 (* These are the only exceptions that will be raised *)
27 exception TypeCheckerFailure of string Lazy.t
28 exception AssertFailure of string Lazy.t
30 (* this function is exported to be used also by the refiner;
31 the callback function (defaul value: ignore) is invoked on each
32 processed subterm; its first argument is the undebrujined term (the
33 input); its second argument the corresponding debrujined term (the
34 output). The callback is used to relocalize the error messages *)
35 val debrujin_constructor :
36 ?cb:(Cic.term -> Cic.term -> unit) ->
37 ?check_exp_named_subst: bool ->
38 UriManager.uri -> int -> Cic.context -> Cic.term -> Cic.term
40 (* defaults to true *)
42 ?trust:bool -> UriManager.uri -> Cic.obj * CicUniv.universe_graph
44 (* FUNCTIONS USED ONLY IN THE TOPLEVEL *)
46 (* type_of_aux' metasenv context term *)
48 ?subst:Cic.substitution -> Cic.metasenv -> Cic.context ->
49 Cic.term -> CicUniv.universe_graph ->
50 Cic.term * CicUniv.universe_graph
52 (* typechecks the obj and puts it in the environment
53 * empty universes are filed with the given uri, thus you should
54 * get the object again after calling this *)
55 val typecheck_obj : UriManager.uri -> Cic.obj -> unit
57 (* check_allowed_sort_elimination uri i s1 s2
58 This function is used outside the kernel to determine in advance whether
59 a MutCase will be allowed or not.
60 [uri,i] is the type of the term to match
61 [s1] is the sort of the term to eliminate (i.e. the head of the arity
62 of the inductive type [uri,i])
63 [s2] is the sort of the goal (i.e. the head of the type of the outtype
65 val check_allowed_sort_elimination:
66 UriManager.uri -> int -> Cic.sort -> Cic.sort -> bool
68 (* does_not_occur ~subst context n nn t
69 checks if the semi-open interval of Rels (n,nn] occurs in t *)
71 ?subst:Cic.substitution -> Cic.context -> int -> int -> Cic.term -> bool