Module Middle.Program

Defines the core of the MIR

type fun_arg_decl = (UnsizedType.autodifftype * string * UnsizedType.t) list
val map_fun_arg_decl : 'a -> 'a
val fun_arg_decl_of_sexp : Sexplib0.Sexp.t -> fun_arg_decl
val sexp_of_fun_arg_decl : fun_arg_decl -> Sexplib0.Sexp.t
val hash_fold_fun_arg_decl : Ppx_hash_lib.Std.Hash.state -> fun_arg_decl -> Ppx_hash_lib.Std.Hash.state
val hash_fun_arg_decl : fun_arg_decl -> Ppx_hash_lib.Std.Hash.hash_value
type 'a fun_def = {
  1. fdrt : UnsizedType.returntype;
  2. fdname : string;
  3. fdsuffix : unit Fun_kind.suffix;
  4. fdargs : (UnsizedType.autodifftype * string * UnsizedType.t) list;
  5. fdbody : 'a option;
  6. fdloc : Location_span.t;
}
val map_fun_def : ('a -> 'b) -> 'a fun_def -> 'b fun_def
val fold_fun_def : ('a -> 'b -> 'a) -> 'a -> 'b fun_def -> 'a
val compare_fun_def : 'a. ('a -> 'a -> Core__.Import.int) -> 'a fun_def -> 'a fun_def -> Core__.Import.int
val hash_fold_fun_def : 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> Ppx_hash_lib.Std.Hash.state -> 'a fun_def -> Ppx_hash_lib.Std.Hash.state
val fun_def_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a fun_def
val sexp_of_fun_def : 'a. ('a -> Sexplib0.Sexp.t) -> 'a fun_def -> Sexplib0.Sexp.t
type io_block =
  1. | Parameters
  2. | TransformedParameters
  3. | GeneratedQuantities
val io_block_of_sexp : Sexplib0.Sexp.t -> io_block
val sexp_of_io_block : io_block -> Sexplib0.Sexp.t
val hash_fold_io_block : Ppx_hash_lib.Std.Hash.state -> io_block -> Ppx_hash_lib.Std.Hash.state
val hash_io_block : io_block -> Ppx_hash_lib.Std.Hash.hash_value
type 'e outvar = {
  1. out_unconstrained_st : 'e SizedType.t;
  2. out_constrained_st : 'e SizedType.t;
  3. out_block : io_block;
  4. out_trans : 'e Transformation.t;
}
val map_outvar : ('e -> 'a) -> 'e outvar -> 'a outvar
val fold_outvar : ('a -> 'b -> 'a) -> 'a -> 'b outvar -> 'a
val outvar_of_sexp : 'e. (Sexplib0.Sexp.t -> 'e) -> Sexplib0.Sexp.t -> 'e outvar
val sexp_of_outvar : 'e. ('e -> Sexplib0.Sexp.t) -> 'e outvar -> Sexplib0.Sexp.t
val hash_fold_outvar : 'e. (Ppx_hash_lib.Std.Hash.state -> 'e -> Ppx_hash_lib.Std.Hash.state) -> Ppx_hash_lib.Std.Hash.state -> 'e outvar -> Ppx_hash_lib.Std.Hash.state
type ('a, 'b, 'm) t = {
  1. functions_block : 'b fun_def list;
  2. input_vars : (string * 'm * 'a SizedType.t) list;
  3. prepare_data : 'b list;
  4. log_prob : 'b list;
  5. reverse_mode_log_prob : 'b list;
  6. generate_quantities : 'b list;
  7. transform_inits : 'b list;
  8. unconstrain_array : 'b list;
  9. output_vars : (string * 'm * 'a outvar) list;
  10. prog_name : string;
  11. prog_path : string;
}
val map : ('a -> 'c) -> ('b -> 'd) -> ('m -> 'e) -> ('a, 'b, 'm) t -> ('c, 'd, 'e) t
val fold : ('a -> 'b -> 'a) -> ('a -> 'c -> 'a) -> ('a -> 'd -> 'a) -> 'a -> ('b, 'c, 'd) t -> 'a
val t_of_sexp : 'a 'b 'm. (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> (Sexplib0.Sexp.t -> 'm) -> Sexplib0.Sexp.t -> ('a, 'b, 'm) t
val sexp_of_t : 'a 'b 'm. ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('m -> Sexplib0.Sexp.t) -> ('a, 'b, 'm) t -> Sexplib0.Sexp.t
val pp_fun_arg_decl : Stdlib.Format.formatter -> (UnsizedType.autodifftype * string * UnsizedType.t) -> unit
val pp_fun_def : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a fun_def -> unit
val pp_io_block : Stdlib.Format.formatter -> io_block -> unit
val pp_block : string -> 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_functions_block : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_prepare_data : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_log_prob : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_reverse_mode_log_prob : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_generate_quantities : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_transform_inits : 'a Fmt.t -> Stdlib.Format.formatter -> 'a list -> unit
val pp_output_var : 'a Fmt.t -> Stdlib.Format.formatter -> (string * 'b * 'a outvar) -> unit
val pp_input_var : 'a Fmt.t -> Stdlib.Format.formatter -> (string * 'b * 'a SizedType.t) -> unit
val pp_input_vars : 'a Fmt.t -> Stdlib.Format.formatter -> (string * 'b * 'a SizedType.t) list -> unit
val pp_output_vars : 'a Fmt.t -> Stdlib.Format.formatter -> (string * 'b * 'a outvar) list -> unit
val pp : 'a Fmt.t -> 'b Fmt.t -> Stdlib.Format.formatter -> ('a, 'b, 'c) t -> unit
module Typed : sig ... end

Programs with typed expressions and locations

module Numbered : sig ... end