]> matita.cs.unibo.it Git - helm.git/blob - matita/components/ng_kernel/nCicEnvironment.mli
As required by M. Maietti,
[helm.git] / matita / components / ng_kernel / nCicEnvironment.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 exception CircularDependency of string Lazy.t;;
15 exception ObjectNotFound of string Lazy.t;;
16 exception BadDependency of string Lazy.t * exn;;
17 exception AlreadyDefined of string Lazy.t;;
18
19 val set_get_obj: (NCic.status -> NUri.uri -> NCic.obj) -> unit
20
21 val get_checked_obj: #NCic.status -> NUri.uri -> NCic.obj
22
23 val check_and_add_obj: #NCic.status -> NCic.obj -> unit
24
25 val get_relevance: #NCic.status -> NReference.reference -> bool list
26
27 val get_checked_decl:
28   #NCic.status -> NReference.reference -> 
29     NCic.relevance * string * NCic.term * NCic.c_attr * int
30
31 val get_checked_def:
32   #NCic.status -> NReference.reference -> 
33     NCic.relevance * string * NCic.term * NCic.term * NCic.c_attr * int
34
35 (* the last integer is the index of the inductive type in the reference *)
36 val get_checked_indtys:
37   #NCic.status -> NReference.reference -> 
38     bool * int * NCic.inductiveType list * NCic.i_attr * int
39
40 val get_checked_fixes_or_cofixes:
41   #NCic.status -> NReference.reference -> 
42    NCic.inductiveFun list * NCic.f_attr * int
43
44 val invalidate_item: 
45       [ `Obj of NUri.uri * NCic.obj 
46       | `Constr of NCic.universe * NCic.universe ] -> unit
47
48 val invalidate: unit -> unit
49
50 val set_typecheck_obj: (NCic.status -> NCic.obj -> unit) -> unit
51
52 (* =========== universes ============= *)
53
54 (* utils *)
55 val ppsort : Format.formatter -> NCic.sort -> unit
56 val pp_constraints: unit -> string
57 val get_universes: unit -> NCic.universe list
58
59 (* use to type products *)
60 val max: NCic.universe -> NCic.universe -> NCic.universe
61
62 (* raise BadConstraints if the second arg. is an inferred universe or
63  * if the added constraint gives circularity *)
64 exception BadConstraint of string Lazy.t;;
65 val add_lt_constraint: acyclic:bool -> NCic.universe -> NCic.universe -> unit
66 val universe_eq: NCic.universe -> NCic.universe -> bool
67 val universe_leq: NCic.universe -> NCic.universe -> bool
68 val universe_lt: NCic.universe -> NCic.universe -> bool
69
70 (* checks if s1 <= s2 *)
71 val are_sorts_convertible: test_eq_only:bool -> NCic.sort -> NCic.sort -> bool
72
73 (* to type a Match *)
74 val allowed_sort_elimination: NCic.sort -> NCic.sort -> [ `Yes | `UnitOnly ]
75
76 (* algebraic successor function *)
77 exception UntypableSort of string Lazy.t
78 exception AssertFailure of string Lazy.t
79 val typeof_sort: NCic.sort -> NCic.sort
80
81 (* looks for a declared universe that is the least one above the input *)
82 val sup : NCic.universe -> NCic.universe option
83 val inf : strict:bool -> NCic.universe -> NCic.universe option
84 val family_of : NCic.universe -> [ `CProp | `Type ]
85
86 (* =========== /universes ============= *)
87
88 (* EOF *)