| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
open Names |
| 14 |
|
| 15 |
|
| 16 |
module InfvInst : |
| 17 |
sig |
| 18 |
type t |
| 19 |
val compare : t -> t -> int |
| 20 |
val equal : t -> t -> bool |
| 21 |
|
| 22 |
val empty : t |
| 23 |
|
| 24 |
|
| 25 |
val generate : UVars.AbstractContext.t -> t list |
| 26 |
|
| 27 |
|
| 28 |
val default : UVars.AbstractContext.t -> t |
| 29 |
|
| 30 |
|
| 31 |
val ground : UVars.Instance.t -> t |
| 32 |
|
| 33 |
|
| 34 |
val instantiate : UVars.AbstractContext.t -> t -> UVars.Instance.t |
| 35 |
|
| 36 |
|
| 37 |
val encode : t -> string option |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
end |
| 42 |
|
| 43 |
type global = { glob : GlobRef.t; inst : InfvInst.t } |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
type kill_reason = |
| 56 |
| Ktype |
| 57 |
| Kprop |
| 58 |
| Kimplicit of global * int |
| 59 |
|
| 60 |
type sign = Keep | Kill of kill_reason |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
type signature = sign list |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
type ml_type = |
| 70 |
| Tarr of ml_type * ml_type |
| 71 |
| Tglob of global * ml_type list |
| 72 |
| Tvar of int |
| 73 |
| Tvar' of int |
| 74 |
| Tmeta of ml_meta |
| 75 |
| Tdummy of kill_reason |
| 76 |
| Tunknown |
| 77 |
| Taxiom |
| 78 |
|
| 79 |
and ml_meta = { id : int; mutable contents : ml_type option } |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
type ml_schema = int * ml_type |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
type inductive_kind = |
| 89 |
| Singleton |
| 90 |
| Coinductive |
| 91 |
| Standard |
| 92 |
| Record of global option list |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
type ml_ind_packet = { |
| 103 |
ip_typename : Id.t; |
| 104 |
ip_typename_ref : global; |
| 105 |
ip_consnames : Id.t array; |
| 106 |
ip_consnames_ref : global array; |
| 107 |
ip_logical : bool; |
| 108 |
ip_sign : signature; |
| 109 |
ip_vars : Id.t list; |
| 110 |
ip_types : (ml_type list) array |
| 111 |
} |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
type equiv = |
| 116 |
| NoEquiv |
| 117 |
| Equiv of KerName.t |
| 118 |
| RenEquiv of string |
| 119 |
|
| 120 |
type ml_ind = { |
| 121 |
ind_kind : inductive_kind; |
| 122 |
ind_nparams : int; |
| 123 |
ind_packets : ml_ind_packet array; |
| 124 |
ind_equiv : equiv |
| 125 |
} |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
type ml_ident = |
| 130 |
| Dummy |
| 131 |
| Id of Id.t |
| 132 |
| Tmp of Id.t |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
type ml_branch = ml_ident list * ml_pattern * ml_ast |
| 146 |
|
| 147 |
and ml_ast = |
| 148 |
| MLrel of int |
| 149 |
| MLapp of ml_ast * ml_ast list |
| 150 |
| MLlam of ml_ident * ml_ast |
| 151 |
| MLletin of ml_ident * ml_ast * ml_ast |
| 152 |
| MLglob of global |
| 153 |
| MLcons of ml_type * global * ml_ast list |
| 154 |
| MLtuple of ml_ast list |
| 155 |
| MLcase of ml_type * ml_ast * ml_branch array |
| 156 |
| MLfix of int * Id.t array * ml_ast array |
| 157 |
| MLexn of string |
| 158 |
| MLdummy of kill_reason |
| 159 |
| MLaxiom of string |
| 160 |
| MLmagic of ml_ast |
| 161 |
| MLuint of Uint63.t |
| 162 |
| MLfloat of Float64.t |
| 163 |
| MLstring of Pstring.t |
| 164 |
| MLparray of ml_ast array * ml_ast |
| 165 |
|
| 166 |
and ml_pattern = |
| 167 |
| Pcons of global * ml_pattern list |
| 168 |
| Ptuple of ml_pattern list |
| 169 |
| Prel of int |
| 170 |
| Pwild |
| 171 |
| Pusual of global |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
type ml_decl = |
| 176 |
| Dind of ml_ind |
| 177 |
| Dtype of global * Id.t list * ml_type |
| 178 |
| Dterm of global * ml_ast * ml_type |
| 179 |
| Dfix of global array * ml_ast array * ml_type array |
| 180 |
|
| 181 |
type ml_spec = |
| 182 |
| Sind of ml_ind |
| 183 |
| Stype of global * Id.t list * ml_type option |
| 184 |
| Sval of global * ml_type |
| 185 |
|
| 186 |
type ml_specif = |
| 187 |
| Spec of ml_spec |
| 188 |
| Smodule of ml_module_type |
| 189 |
| Smodtype of ml_module_type |
| 190 |
|
| 191 |
and ml_module_type = |
| 192 |
| MTident of ModPath.t |
| 193 |
| MTfunsig of MBId.t * ml_module_type * ml_module_type |
| 194 |
| MTsig of ModPath.t * ml_module_sig |
| 195 |
| MTwith of ml_module_type * ml_with_declaration |
| 196 |
|
| 197 |
and ml_with_declaration = |
| 198 |
| ML_With_type of InfvInst.t * Id.t list * Id.t list * ml_type |
| 199 |
| ML_With_module of Id.t list * ModPath.t |
| 200 |
|
| 201 |
and ml_module_sig = (Id.t * ml_specif) list |
| 202 |
|
| 203 |
type ml_structure_elem = |
| 204 |
| SEdecl of ml_decl |
| 205 |
| SEmodule of ml_module |
| 206 |
| SEmodtype of ml_module_type |
| 207 |
|
| 208 |
and ml_module_expr = |
| 209 |
| MEident of ModPath.t |
| 210 |
| MEfunctor of MBId.t * ml_module_type * ml_module_expr |
| 211 |
| MEstruct of ModPath.t * ml_module_structure |
| 212 |
| MEapply of ml_module_expr * ml_module_expr |
| 213 |
|
| 214 |
and ml_module_structure = (Id.t * ml_structure_elem) list |
| 215 |
|
| 216 |
and ml_module = |
| 217 |
{ ml_mod_expr : ml_module_expr; |
| 218 |
ml_mod_type : ml_module_type } |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
type ml_structure = (ModPath.t * ml_module_structure) list |
| 224 |
|
| 225 |
type ml_signature = (ModPath.t * ml_module_sig) list |
| 226 |
|
| 227 |
type unsafe_needs = { |
| 228 |
mldummy : bool; |
| 229 |
tdummy : bool; |
| 230 |
tunknown : bool; |
| 231 |
magic : bool |
| 232 |
} |
| 233 |
|
| 234 |
type 's language_descr = { |
| 235 |
keywords : Id.Set.t; |
| 236 |
|
| 237 |
|
| 238 |
file_suffix : string; |
| 239 |
file_naming : 's -> DirPath.t -> string; |
| 240 |
|
| 241 |
preamble : |
| 242 |
's -> Id.t -> Pp.t option -> DirPath.Set.t -> unsafe_needs -> |
| 243 |
Pp.t; |
| 244 |
pp_struct : 's -> ml_structure -> Pp.t; |
| 245 |
|
| 246 |
|
| 247 |
sig_suffix : string option; |
| 248 |
|
| 249 |
sig_preamble : |
| 250 |
's -> Id.t -> Pp.t option -> DirPath.Set.t -> unsafe_needs -> |
| 251 |
Pp.t; |
| 252 |
pp_sig : 's -> ml_signature -> Pp.t; |
| 253 |
|
| 254 |
|
| 255 |
pp_decl : 's -> ml_decl -> Pp.t; |
| 256 |
|
| 257 |
} |