Mavryk_benchmark_001_PtAtLas.Michelson_mcmc_samplers
MCMC-based Michelson data and code samplers.
MCMC samplers can either produce data or code. Note that the samplers natively produce data and code in Micheline (ie untyped) form.
type michelson_code = {
term : Mavryk_protocol_001_PtAtLas.Protocol.Script_repr.expr;
term
is a typeable Michelson program in Micheline form.
bef : Mavryk_protocol_001_PtAtLas.Protocol.Script_repr.expr list;
bef
is an input stack type for which term
is a well-typed script.
aft : Mavryk_protocol_001_PtAtLas.Protocol.Script_repr.expr list;
aft
is the stack type corresponding to the execution of term
on a stack of type bef
.
}
type michelson_data = {
term : Mavryk_protocol_001_PtAtLas.Protocol.Script_repr.expr;
term
is a typeable Michelson data in Micheline form.
typ : Mavryk_protocol_001_PtAtLas.Protocol.Script_repr.expr;
typ
is the type of term
.
}
A michelson_sample
is either a code sample or a data sample.
val michelson_sample_list_encoding : michelson_sample list Data_encoding.t
Encoding used for saving or loading data.
val save : filename:string -> terms:michelson_sample list -> unit
Saving a list of samples to a file. Exits with code 1 if an error arises during encoding or file manipulation.
val load : filename:string -> michelson_sample list
Loading a list of samples from a file. Exits with code 1 if an error arises during decoding or file manipulation.
module Make_code_sampler
(Michelson_base : Michelson_samplers_base.S)
(Crypto_samplers : Mavryk_benchmark.Crypto_samplers.Finite_key_pool_S)
(X : sig ... end) :
sig ... end
Make_code_sampler
produces a sampler for well-typed Michelson code. The parameters of the functor are:
module Make_data_sampler
(Michelson_base : Michelson_samplers_base.S)
(Crypto_samplers : Mavryk_benchmark.Crypto_samplers.Finite_key_pool_S)
(X : sig ... end) :
sig ... end
See documentation for Make_code_sampler