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.
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_______________________________________________________________ *)
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;;
20 [ `Obj of NUri.uri * NCic.obj
21 | `Constr of NCic.universe * NCic.universe ]
25 [ `WellTyped of NCic.obj
36 class virtual status : string option ->
40 method set_env_db : db -> 'self
41 method set_env_status : #g_status -> 'self
44 val set_get_obj : (status -> NUri.uri -> NCic.obj) -> unit
45 val set_typecheck_obj : (status -> NCic.obj -> unit) -> unit
47 val get_checked_obj: #status -> NUri.uri -> NCic.obj
49 val check_and_add_obj: #status -> NCic.obj -> unit
51 val get_relevance: #status -> NReference.reference -> bool list
54 #status -> NReference.reference ->
55 NCic.relevance * string * NCic.term * NCic.term * NCic.c_attr * int
57 (* the last integer is the index of the inductive type in the reference *)
58 val get_checked_indtys:
59 #status -> NReference.reference ->
60 bool * int * NCic.inductiveType list * NCic.i_attr * int
62 val get_checked_fixes_or_cofixes:
63 #status -> NReference.reference ->
64 NCic.inductiveFun list * NCic.f_attr * int
68 [ `Obj of NUri.uri * NCic.obj
69 | `Constr of NCic.universe * NCic.universe ] -> unit
71 val invalidate: #status -> unit
73 (* =========== universes ============= *)
76 val ppsort : Format.formatter -> NCic.sort -> unit
77 val pp_constraints: #status -> string
78 val get_universes: #status -> NCic.universe list
80 (* use to type products *)
81 val max: NCic.universe -> NCic.universe -> NCic.universe
83 (* raise BadConstraints if the second arg. is an inferred universe or
84 * if the added constraint gives circularity *)
85 exception BadConstraint of string Lazy.t;;
86 val add_lt_constraint: #status -> NCic.universe -> NCic.universe -> unit
87 val universe_eq: NCic.universe -> NCic.universe -> bool
88 val universe_leq: #status -> NCic.universe -> NCic.universe -> bool
89 val universe_lt: #status -> NCic.universe -> NCic.universe -> bool
91 (* checks if s1 <= s2 *)
92 val are_sorts_convertible: #status -> test_eq_only:bool -> NCic.sort -> NCic.sort -> bool
95 val allowed_sort_elimination: NCic.sort -> NCic.sort -> [ `Yes | `UnitOnly ]
97 (* algebraic successor function *)
98 exception UntypableSort of string Lazy.t
99 exception AssertFailure of string Lazy.t
100 val typeof_sort: #status -> NCic.sort -> NCic.sort
102 (* looks for a declared universe that is the least one above the input *)
103 val sup : #status -> NCic.universe -> NCic.universe option
104 val inf : #status -> strict:bool -> NCic.universe -> NCic.universe option
105 val family_of : NCic.universe -> [ `CProp | `Type ]
107 (* =========== /universes ============= *)