Module Env.Make

Env = Make(Machine)

Parameters

Signature

get var returns a value associated with the variable.

val set : Bap.Std.var -> value -> unit Machine.t

set var value binds a variable var to the given value.

val add : Bap.Std.var -> Generator.t -> unit Machine.t

add var generator adds the variable var to the environment. If the variable is read before it was bound with the set operation, then a value produces by the generator will be automatically bound with the variable and returned.

val del : Bap.Std.var -> unit Machine.t

del v unsets the variable v.

The variable v is no longer bound to a value.

val has : Bap.Std.var -> bool Machine.t

has v evaluates to true if v is bound.

  • since 2.1.0
val is_set : Bap.Std.var -> bool Machine.t

is_set v evaluates to true if v is bound to a value.

  • since 2.2.0

all is a sequence of all variables defined in the environment. Note, the word _defined_ doesn't mean initialized.