Module Primus.Env

The evaluation environment.

The environment binds variables to values and value generators.

A variable is bound if it was either bound to a value with set or to a value generator with add. A variable is unset if it is bound but not bound to a value.

A variable is undefined if it is not bound. Accessing an undefined variable raises the Undefined_var exception. Accessing an unset variable triggers the generated observation and the variable becomes bound to the generated value.

type exn +=
  1. | Undefined_var of Bap.Std.var

A variable is undefined, if it was never added to the environment.

val generated : (Bap.Std.var * value) observation

occurs when an unset variable is read. The generated value is bound to the variable.

module Make (Machine : Machine.S) : sig ... end

Env = Make(Machine)