Module Generator.Make

Make(Machine) lifts the generator interface into the Machine monad.

Parameters

Signature

val next : t -> int Machine.t

next iter switches the internal state of iter to the next state and returns the current value

val word : t -> int -> Bap.Std.word Machine.t

word iter bitwidth constructs a word of the given bitwidth, from words obtained from consequitive calls to next.

The generator is called ceil (bitwidth / width) times and the generated words are concatenated in the order of the increasing significance with any excessive most significant bits truncated.