]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/cic_proof_checking/cicTypeChecker.mli
ocaml 3.09 transition
[helm.git] / helm / ocaml / cic_proof_checking / cicTypeChecker.mli
1 (* Copyright (C) 2000, HELM Team.
2  * 
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.
6  * 
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.
11  * 
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.
16  *
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,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://cs.unibo.it/helm/.
24  *)
25
26 (* These are the only exceptions that will be raised *)
27 exception TypeCheckerFailure of string Lazy.t
28 exception AssertFailure of string Lazy.t
29
30 val debrujin_constructor : UriManager.uri -> int -> Cic.term -> Cic.term
31
32 val typecheck : UriManager.uri -> Cic.obj * CicUniv.universe_graph
33
34 (* FUNCTIONS USED ONLY IN THE TOPLEVEL *)
35
36 (* type_of_aux' metasenv context term *)
37 val type_of_aux':
38   ?subst:Cic.substitution -> Cic.metasenv -> Cic.context -> 
39   Cic.term -> CicUniv.universe_graph -> 
40   Cic.term * CicUniv.universe_graph
41
42 (* typechecks the obj and puts it in the environment *)
43 val typecheck_obj : UriManager.uri -> Cic.obj -> unit
44
45 (* check_allowed_sort_elimination uri i s1 s2
46    This function is used outside the kernel to determine in advance whether
47    a MutCase will be allowed or not.
48    [uri,i] is the type of the term to match
49    [s1] is the sort of the term to eliminate (i.e. the head of the arity
50         of the inductive type [uri,i])
51    [s2] is the sort of the goal (i.e. the head of the type of the outtype
52         of the MutCase) *)
53 val check_allowed_sort_elimination:
54  UriManager.uri -> int -> Cic.sort -> Cic.sort -> bool