package boltzgen

  1. Overview
  2. Docs
val verbose : int ref
type compo_type =
  1. | Name of string * compo_type list
  2. | Abstract of string
  3. | Fun of compo_type list * compo_type
  4. | Prod of compo_type list

A type for ocaml type

type func = {
  1. name : string;
  2. intypes : compo_type list;
  3. outtype : compo_type;
}

A type for named function

val flatten_prod : compo_type list -> compo_type list
val ano_func : func -> compo_type
val deano_func : string -> compo_type -> func
type sum_type_def = (string * compo_type option * float option) list
type sum_type = (string * string list) * sum_type_def
type hidden_type
val hide : 'a -> compo_type -> hidden_type
val reveal : hidden_type -> compo_type -> 'a
type gen_function = float -> float * float
type recdefprint = (compo_type * string) list
type poly = ((compo_type list * int) * float) list
type poly_assoc = (compo_type * poly) list
type named_type = {
  1. identifier : string;
  2. boltz_identifier : string;
  3. is_simple : bool;
  4. arguments : int;
  5. get_equ : (compo_type -> poly_assoc -> poly_assoc) -> poly_assoc -> compo_type -> poly_assoc;
  6. gen_fun : Random.State.t -> int -> (Random.State.t -> int -> compo_type -> float -> hidden_type * int) -> (compo_type -> gen_function) -> compo_type -> float -> hidden_type * int;
  7. print : (compo_type -> Format.formatter -> hidden_type -> unit) -> compo_type -> Format.formatter -> hidden_type -> unit;
  8. string_of_named : recdefprint -> (recdefprint -> compo_type -> string) -> compo_type -> string;
  9. boltzman_fun : (compo_type -> gen_function) -> compo_type -> gen_function;
}
val find_type : string -> named_type
val rewrite : compo_type -> compo_type
val add_type_to_lib : ?rename:string -> named_type -> unit
val pp_compo : ?use_boltz_id:bool -> Format.formatter -> compo_type -> unit
val pp_func : ?use_boltz_id:bool -> Format.formatter -> func -> unit
val pp_sum : Format.formatter -> sum_type -> unit
val print_prod_aux : ('a -> string) -> int -> 'a list -> string * string
val instantiate : string -> compo_type -> compo_type -> compo_type
OCaml

Innovation. Community. Security.