Module Tgenr_base


module Tgenr_base: sig .. end


type module_name = string 
type randomize = bool 
type max_length = int 
type nesting_depth = int 
type seed = int 
type num_tests = int 


val is_known_and_listary : Parsetree.generator -> 'a list -> bool

Decides if a generator (with the arguments it should be applied to) is known and listary.

is_known_and_listary g args returns true when


val is_known_and_listary_name : string -> 'a list -> bool
Same as above, indicating the generator name instead of the generator
val mk_equality : Code.exp -> Code.exp -> Code.exp
Creates an expression representing the application of the equality operator
val mk_int : int -> Code.exp
Creates a value representing an integer.
val mk_char : char -> Code.exp
Creates a value representing a character.
val mk_string : string -> Code.exp
Creates a value representing a string.
val mk_float : float -> Code.exp
Creates a value representing a float.
val mk_int32 : int32 -> Code.exp
Creates a value representing an int32.
val mk_int64 : int64 -> Code.exp
Creates a value representing an int 64.
val mk_nativeint : nativeint -> Code.exp
Creates a value representing an native integer.
val mk_tuple : Code.exp list -> Code.exp
Creates a value representing a tuple with the specified expressions.
val mk_list : Code.exp list -> Code.exp
Creates a value representing a list with the specified expressions.
val mk_generator : string -> Location.t -> Parsetree.generator
Creates a generator with the given name and location
val mk_construction : string -> Code.exp list -> Code.exp
Creates an expression in Code.exp representing a generator with the specified name and arguments.
val mk_non_listary_construction : string -> Code.exp list -> Code.exp
Creates an expression in Code.exp representing a generator with the specified name and arguments.

Treats the generator as non listary, even if it has a single list argument.

val genr_ints : randomize -> max_length -> Code.exp list
Creates the max_length specified number of distinct integer expressions. If the boolean argument is true, then exressions must be generated randomly, otherwise they are generated sequentially.
val genr_chars : randomize -> max_length -> Code.exp list
Same as above for characters.
val genr_strings : randomize -> max_length -> Code.exp list
Same as above for strings.
val genr_floats : randomize -> max_length -> Code.exp list
Same as above for floats.
val genr_int32s : randomize -> max_length -> Code.exp list
Same as above for int32.
val genr_int64s : randomize -> max_length -> Code.exp list
Same as above for int64.
val genr_nativeints : randomize -> max_length -> Code.exp list
Same as above for nativeint.
val genr_units : randomize -> max_length -> Code.exp list
Creates at most the specified number of distinct unit expressions, i.e., zero or one.