]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/nCicTypeChecker.mli
a0c9272845e9fbd29d58d29e5104a8db5796a556
[helm.git] / helm / software / components / ng_kernel / nCicTypeChecker.mli
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id$ *)
13
14 (* These are the only exceptions that will be raised *)
15 exception TypeCheckerFailure of string Lazy.t
16 exception AssertFailure of string Lazy.t
17
18 val set_logger: 
19   ([ `Start_type_checking of NUri.uri 
20    | `Type_checking_completed of NUri.uri
21    | `Type_checking_interrupted of NUri.uri
22    | `Type_checking_failed of NUri.uri
23    | `Trust_obj of NUri.uri
24    ] -> unit) -> unit
25
26 val set_trust : (NCic.obj -> bool) -> unit
27
28 val typeof: 
29   subst:NCic.substitution -> metasenv:NCic.metasenv -> 
30   NCic.context -> NCic.term -> 
31     NCic.term
32
33 val height_of_obj_kind: NUri.uri -> subst:NCic.substitution -> NCic.obj_kind -> int
34
35 val get_relevance : 
36   metasenv:NCic.metasenv -> subst:NCic.substitution ->
37   NCic.context -> NCic.term -> NCic.term list -> bool list
38
39 (* type_of_branch subst context leftno outtype 
40  *   (constr @ lefts) (ty_constr @ lefts)  *)
41 val type_of_branch : 
42   subst:NCic.substitution ->
43     NCic.context -> int -> NCic.term -> NCic.term -> NCic.term -> 
44      NCic.term
45
46 (* ind = indtype @ lefts
47  * arity1 = constructor type @ lefts
48  * arity2 = outtype *)
49 val check_allowed_sort_elimination : 
50   subst:NCic.substitution ->
51   metasenv:NCic.metasenv ->
52   NReference.reference -> NCic.context -> 
53     NCic.term -> NCic.term -> NCic.term -> unit
54
55 (* Functions to be used by the refiner *)
56 val debruijn:
57  NUri.uri -> int -> subst:NCic.substitution -> NCic.context -> NCic.term ->
58   NCic.term
59 val are_all_occurrences_positive: 
60  subst:NCic.substitution ->
61   NCic.context -> NUri.uri -> int -> int -> int -> int -> NCic.term -> bool
62
63 val does_not_occur :
64     subst:NCic.substitution -> NCic.context -> int -> int -> NCic.term -> bool