module Statement:sig
..end
typeid =
ID.t
typeloc =
Location.t
type'a
var ='a Var.t
type'a
printer =Format.formatter -> 'a -> unit
type 'ty
defined = {
|
defined_head : |
|
defined_ty : |
type ('t, 'ty)
equations =
| |
Eqn_nested of |
| |
Eqn_single of |
| |
Eqn_app of |
type ('t, 'ty)
rec_def = {
|
rec_defined : |
|
rec_ty_vars : |
|
rec_eqns : |
type('t, 'ty)
rec_defs =('t, 'ty) rec_def list
type ('t, 'ty)
spec_defs = {
|
spec_ty_vars : |
|
spec_defined : |
|
spec_axioms : |
type 'ty
ty_constructor = {
|
cstor_name : |
(* |
Name
| *) |
|
cstor_args : |
(* |
type arguments
| *) |
|
cstor_type : |
(* |
type of the constructor (shortcut)
| *) |
type 'ty
tydef = {
|
ty_id : |
|||
|
ty_vars : |
|||
|
ty_type : |
(* |
shortcut for
type -> type -> ... -> type | *) |
|
ty_cstors : |
ty_vars
occur freely in
the constructors' types.type'ty
mutual_types ='ty tydef list
type ('t, 'ty)
axiom =
| |
Axiom_std of |
(* |
Axiom list that can influence consistency (no assumptions)
| *) |
| |
Axiom_spec of |
(* |
Axioms can be safely ignored, they are consistent
| *) |
| |
Axiom_rec of |
(* |
Axioms are part of an admissible (partial) definition
| *) |
type ('t, 'ty)
pred_clause = {
|
clause_vars : |
|
clause_guard : |
|
clause_concl : |
type ('t, 'ty)
pred_def = {
|
pred_defined : |
|
pred_tyvars : |
|
pred_clauses : |
type 't
copy_wrt =
| |
Wrt_nothing |
| |
Wrt_subset of |
| |
Wrt_quotient of |
type ('t, 'ty)
copy = {
|
copy_id : |
|
copy_vars : |
|
copy_ty : |
|
copy_of : |
|
copy_to : |
|
copy_wrt : |
|
copy_abstract : |
|
copy_abstract_ty : |
|
copy_concrete : |
|
copy_concrete_ty : |
type
decl_attr =
| |
Attr_card_max of |
(* |
maximal cardinality of type
| *) |
| |
Attr_card_min of |
(* |
minimal cardinality of type
| *) |
| |
Attr_card_hint of |
(* |
hint on the card of a type
| *) |
| |
Attr_incomplete |
(* |
encoding of some type with some values removed
| *) |
| |
Attr_abstract |
(* |
encoding of some type where some values are conflated
| *) |
| |
Attr_infinite |
(* |
infinite uninterpreted type
| *) |
| |
Attr_finite_approx of |
(* |
finite approximation of an infinite type
| *) |
| |
Attr_infinite_upcast |
(* |
cast finite approx to infinite type
| *) |
| |
Attr_pseudo_prop |
(* |
encoding of
prop | *) |
| |
Attr_pseudo_true |
(* |
encoding of
true_ : pseudo_prop | *) |
| |
Attr_exn of |
(* |
open case
| *) |
type ('term, 'ty)
view =
| |
Decl of |
| |
Axiom of |
| |
TyDef of |
| |
Pred of |
| |
Copy of |
| |
Goal of |
type
info = {
|
loc : |
|
name : |
type ('term, 'ty)
t = private {
|
view : |
|
info : |
type('t, 'ty)
statement =('t, 'ty) t
val mk_defined : ID.t -> 'ty -> 'ty defined
val tydef_vars : 'ty tydef -> 'ty Var.t list
val tydef_id : 'a tydef -> id
val tydef_type : 'ty tydef -> 'ty
val tydef_cstors : 'ty tydef -> 'ty ty_constructor ID.Map.t
val info_default : info
val info_of_loc : Location.t option -> info
val view : ('term, 'ty) t -> ('term, 'ty) view
val loc : ('a, 'b) t -> loc option
val name : ('a, 'b) t -> string option
val info : ('a, 'b) t -> info
val mk_axiom : info:info -> ('a, 'ty) axiom -> ('a, 'ty) t
val mk_ty_def : info:info ->
[ `Codata | `Data ] -> 'ty mutual_types -> ('a, 'ty) t
val decl : info:info ->
attrs:decl_attr list -> id -> 'a -> ('b, 'a) t
val axiom : info:info -> 'a list -> ('a, 'b) t
val axiom1 : info:info -> 'a -> ('a, 'b) t
val axiom_spec : info:info -> ('a, 'ty) spec_defs -> ('a, 'ty) t
val axiom_rec : info:info -> ('a, 'ty) rec_defs -> ('a, 'ty) t
val data : info:info -> 'ty mutual_types -> ('a, 'ty) t
val codata : info:info -> 'ty mutual_types -> ('a, 'ty) t
val pred : info:info ->
wf:[ `Not_wf | `Wf ] ->
('t, 'ty) pred_def list -> ('t, 'ty) t
val copred : info:info ->
wf:[ `Not_wf | `Wf ] ->
('t, 'ty) pred_def list -> ('t, 'ty) t
val mk_pred : info:info ->
wf:[ `Not_wf | `Wf ] ->
[ `Copred | `Pred ] ->
('t, 'ty) pred_def list -> ('t, 'ty) t
val copy : info:info -> ('t, 'ty) copy -> ('t, 'ty) t
val goal : info:info -> 'a -> ('a, 'b) t
val mk_mutual_ty : ID.t ->
ty_vars:'ty Var.t list ->
cstors:(ID.t * 'ty list * 'ty) list -> ty:'ty -> 'ty tydef
Statement.tydef
val mk_copy : wrt:'t copy_wrt ->
of_:'ty ->
to_:'ty ->
ty:'ty ->
abstract:ID.t * 'ty ->
concrete:ID.t * 'ty ->
vars:'ty Var.t list -> ID.t -> ('t, 'ty) copy
to_ = app id vars
snd abstract = of_ -> to_
snd concrete = to_ -> of_
val find_rec_def : defs:('a, 'b) rec_def list ->
ID.t -> ('a, 'b) rec_def option
val find_tydef : defs:'a tydef list -> ID.t -> 'a tydef option
val find_pred : defs:('a, 'b) pred_def list ->
ID.t -> ('a, 'b) pred_def option
val map_defined : f:('ty -> 'ty2) -> 'ty defined -> 'ty2 defined
val map_eqns : term:('t -> 't2) ->
ty:('ty -> 'ty2) ->
('t, 'ty) equations -> ('t2, 'ty2) equations
val map_eqns_bind : bind:('acc -> 'ty Var.t -> 'acc * 'ty1 Var.t) ->
term:('acc -> 'term -> 'term1) ->
'acc ->
('term, 'ty) equations -> ('term1, 'ty1) equations
val map_clause : term:('t -> 't2) ->
ty:('ty -> 'ty2) ->
('t, 'ty) pred_clause -> ('t2, 'ty2) pred_clause
val map_clause_bind : bind:('acc -> 'ty Var.t -> 'acc * 'ty1 Var.t) ->
term:('acc -> 'term -> 'term1) ->
'acc ->
('term, 'ty) pred_clause -> ('term1, 'ty1) pred_clause
val map_rec_def : term:('t -> 't2) ->
ty:('ty -> 'ty2) ->
('t, 'ty) rec_def -> ('t2, 'ty2) rec_def
val map_rec_def_bind : bind:('a -> 'b Var.t -> 'a * 'c Var.t) ->
term:('a -> 'd -> 'e) ->
ty:('a -> 'b -> 'c) ->
'a -> ('d, 'b) rec_def -> ('e, 'c) rec_def
val map_rec_defs : term:('t -> 't2) ->
ty:('ty -> 'ty2) ->
('t, 'ty) rec_defs -> ('t2, 'ty2) rec_defs
val map_ty_def : ty:('ty -> 'ty2) -> 'ty tydef -> 'ty2 tydef
val map_ty_defs : ty:('ty -> 'ty2) -> 'ty mutual_types -> 'ty2 mutual_types
val map_spec_defs : term:('t -> 't2) ->
ty:('ty -> 'ty2) ->
('t, 'ty) spec_defs -> ('t2, 'ty2) spec_defs
val map_spec_defs_bind : bind:('b_acc -> 'ty Var.t -> 'b_acc * 'ty2 Var.t) ->
term:('b_acc -> 't -> 't2) ->
ty:('b_acc -> 'ty -> 'ty2) ->
'b_acc -> ('t, 'ty) spec_defs -> ('t2, 'ty2) spec_defs
val map_pred : term:('a -> 'a1) ->
ty:('b -> 'b1) ->
('a, 'b) pred_def -> ('a1, 'b1) pred_def
val map_pred_bind : bind:('acc -> 'ty Var.t -> 'acc * 'ty2 Var.t) ->
term:('acc -> 'term -> 'term2) ->
ty:('acc -> 'ty -> 'ty2) ->
'acc -> ('term, 'ty) pred_def -> ('term2, 'ty2) pred_def
val map_preds : term:('a -> 'a1) ->
ty:('b -> 'b1) ->
('a, 'b) pred_def list -> ('a1, 'b1) pred_def list
val map_copy_wrt : ('a -> 'b) -> 'a copy_wrt -> 'b copy_wrt
val map_copy_bind : bind:('a -> 'b var -> 'a * 'c var) ->
term:('a -> 'd -> 'e) ->
ty:('a -> 'b -> 'c) ->
'a -> ('d, 'b) copy -> ('e, 'c) copy
val map_copy : term:('t1 -> 't2) ->
ty:('ty1 -> 'ty2) -> ('t1, 'ty1) copy -> ('t2, 'ty2) copy
val map : term:('t -> 't2) ->
ty:('ty -> 'ty2) -> ('t, 'ty) t -> ('t2, 'ty2) t
val map_bind : bind:('b_acc -> 'ty Var.t -> 'b_acc * 'ty2 Var.t) ->
term:('b_acc -> 't -> 't2) ->
ty:('b_acc -> 'ty -> 'ty2) ->
'b_acc -> ('t, 'ty) t -> ('t2, 'ty2) t
val fold_bind : bind:('b_acc -> 'ty Var.t -> 'b_acc) ->
term:('b_acc -> 'a -> 't -> 'a) ->
ty:('b_acc -> 'a -> 'ty -> 'a) -> 'b_acc -> 'a -> ('t, 'ty) t -> 'a
val fold : term:('a -> 't -> 'a) ->
ty:('a -> 'ty -> 'a) -> 'a -> ('t, 'ty) t -> 'a
val iter : term:('t -> unit) -> ty:('ty -> unit) -> ('t, 'ty) t -> unit
val id_of_defined : 'a defined -> ID.t
val ty_of_defined : 'ty defined -> 'ty
val defined_of_rec : ('a, 'ty) rec_def -> 'ty defined
val defined_of_recs : ('a, 'ty) rec_defs -> 'ty defined Sequence.t
val defined_of_spec : ('a, 'ty) spec_defs -> 'ty defined Sequence.t
val defined_of_pred : ('a, 'ty) pred_def -> 'ty defined
val defined_of_preds : ('a, 'ty) pred_def list -> 'ty defined Sequence.t
val defined_of_cstor : 'ty ty_constructor -> 'ty defined
val defined_of_data : 'ty tydef -> 'ty defined Sequence.t
val defined_of_datas : 'ty mutual_types -> 'ty defined Sequence.t
val defined_of_copy : ('a, 'ty) copy -> 'ty defined Sequence.t
val ids_of_copy : ('a, 'b) copy -> ID.t Sequence.t
val print_attr : decl_attr printer
val print_attrs : decl_attr list printer
module Print(
Pt
:
TermInner.PRINT
)
(
Pty
:
TermInner.PRINT
)
:sig
..end