Page
Library
Module
Module type
Parameter
Class
Class type
Source
Boltzgen.RuntimeSourceBoltzgen runtime library entry point
Main generation function
compute_boltzman fd z Evaluates the Boltzmann generating function for function signature fd using Boltzmann parameter z
Generates the to_string function for a type
val gen_from_compo :
Random.State.t ->
int ->
Type.compo_type ->
float ->
Type.hidden_type * intGenerates a value for a type
Prints a value given its type
Parsing and type generation
Builds the type and adds it to the type library
eval_typedef s parses and evaluates an OCaml type definition
val gen_random_fun_def :
Format.formatter ->
Type.def_type list ->
random_fun_table ->
Type.func ->
unitGenerates and prints random functions with memoization
Initializes a random generator state
val call_random :
?tsrange:(int * int) ->
?max_iter:int ->
random_fun_table ->
Random.State.t ->
int ->
float ->
Type.func ->
stringGenerates and prints a call for a function
HIGHLY UNSAFE: Given a type description and a value, prints it on the formatter. Undefined behavior if types do not match. See print_from_compo for a safe version
rand_value ~seed ~size type returns a value of type type. seed is a seed for the random generator; if omitted, Random.bits is used. size controls the size of the value, overriding set_boltzmann_size. See gen_from_compo for a safer version
rand_fun ~size ~silent type arg is a pure generic function; it generates a value of type type. arg is a parameter for the value, similar to rand_value but makes the type checker happy
rand_fun_alea ~seed ~size ~silent type arg is a pure generic function; it generates a value of type type. seed and arg are parameters for the value, similar to rand_value but makes the type checker happy
val assert_equal :
?throw:bool ->
?err:bool ->
('a -> string) ->
('b -> string) ->
string ->
(unit -> 'a) ->
(unit -> 'b) ->
unitval assert_equal_arg :
?throw:bool ->
?err:bool ->
('a -> string) ->
('b -> string) ->
('c -> string) ->
('c -> 'a) ->
('c -> 'b) ->
'c ->
unit