module Env:sig
..end
Maps (co)inductive types to their definition, functions
to their specifications/axioms/recursive specifications,
constructors to their types, and any symbol to its type
typeid =
ID.t
typeloc =
Location.t
type'a
printer =Format.formatter -> 'a -> unit
type ('t, 'ty)
def =
| |
Fun_def of |
(* |
ID is a defined fun/predicate.
| *) |
| |
Fun_spec of |
|||
| |
Data of |
(* |
ID is a (co)data
| *) |
| |
Cstor of |
(* |
ID is a constructor (of the given type)
| *) |
| |
Pred of |
|||
| |
Copy_ty of |
(* |
ID is the copy type
| *) |
| |
Copy_abstract of |
(* |
ID is the abstraction function
| *) |
| |
Copy_concrete of |
(* |
ID is the concretization function
| *) |
| |
NoDef |
(* |
Undefined symbol
| *) |
type ('t, 'ty)
info = {
|
ty : |
(* |
type of symbol
| *) |
|
decl_attrs : |
|||
|
loc : |
|||
|
def : |
type ('t, 'ty)
t = private {
|
infos : |
exception InvalidDef of id * string
val pp_invalid_def_ : exn printer
val create : ?size:int -> unit -> ('a, 'b) t
val loc : ('a, 'b) info -> loc option
val def : ('t, 'ty) info -> ('t, 'ty) def
val ty : ('a, 'ty) info -> 'ty
val is_fun : ('a, 'b) info -> bool
val is_rec : ('a, 'b) info -> bool
val is_data : ('a, 'b) info -> bool
val is_cstor : ('a, 'b) info -> bool
val is_not_def : ('a, 'b) info -> bool
val is_incomplete : ('a, 'b) info -> bool
val is_abstract : ('a, 'b) info -> bool
val declare : ?loc:loc ->
attrs:Statement.decl_attr list ->
env:('t, 'ty) t -> id -> 'ty -> ('t, 'ty) t
val rec_funs : ?loc:loc ->
env:('t, 'ty) t -> ('t, 'ty) Statement.rec_defs -> ('t, 'ty) t
val declare_rec_funs : ?loc:loc ->
env:('t, 'ty) t -> ('t, 'ty) Statement.rec_defs -> ('t, 'ty) t
Env.rec_funs
, but only declares the functions, without adding
their definitionval spec_funs : ?loc:loc ->
env:('t, 'ty) t -> ('t, 'ty) Statement.spec_defs -> ('t, 'ty) t
val def_data : ?loc:loc ->
env:('t, 'ty) t ->
kind:[ `Codata | `Data ] -> 'ty Statement.mutual_types -> ('t, 'ty) t
InvalidDef
if some type/constructor already defined/declaredval def_preds : ?loc:loc ->
env:('t, 'ty) t ->
wf:[ `Not_wf | `Wf ] ->
kind:[ `Copred | `Pred ] ->
('t, 'ty) Statement.pred_def list -> ('t, 'ty) t
val add_copy : ?loc:loc ->
env:('t, 'ty) t -> ('t, 'ty) Statement.copy -> ('t, 'ty) t
val add_statement : env:('t, 'ty) t -> ('t, 'ty) Statement.t -> ('t, 'ty) t
val add_statement_l : env:('t, 'ty) t -> ('t, 'ty) Statement.t list -> ('t, 'ty) t
val find : env:('t, 'ty) t -> id -> ('t, 'ty) info option
exception UndefinedID of ID.t
val find_exn : env:('t, 'ty) t -> id -> ('t, 'ty) info
UndefinedID
if ID not definedval find_ty_exn : env:('t, 'ty) t -> id -> 'ty
UndefinedID
if the symbol is not declaredval find_ty : env:('t, 'ty) t -> id -> 'ty option
Env.find_ty_exn
module Util(
T
:
TermInner.S
)
:sig
..end
val mem : env:('a, 'b) t -> id:id -> bool
module Print(
Pt
:
TermInner.PRINT
)
(
Pty
:
TermInner.PRINT
)
:sig
..end