Arg.Arena
An ordered collection of locations.
Arena is an expendable collection of data locations (usually registers) that are used to pass arguments. Passing an argument via an arena location consumes it so it is no longer available in the same computation.
If a computation that used an arena location is later rejected then the register is available again (the same as with any other side-effects of a rejected compuation).
The order of locations in arena, as well as their numbering according to that order, usually matters. Many targets have registers with the alphabetic orders of registers matching their arena orders (with notable exception of x86) that enables the direct usage of the Theory.Target.regs
function to create arenas.
val create : _ Bap_core_theory.Theory.Var.t list -> arena t
create regs
creates an arena from the ordered list of registers.
All registers must have the same size and the list could be empty. The registers will be used in the order of their appereance in the regs
list.
val of_exps : Bap.Std.exp list -> arena t
of_exps xs
creates an arena from the ordered list of expressions.
The expressions must have the same type and the list could be empty. The locations will be used in the order in which they were specified.
val of_roles :
Bap_core_theory.Theory.role list ->
Bap_core_theory.Theory.Target.t ->
arena t
of_roles t roles
creates an arena from registers of the specified roles.
The registers are ordered in the alphabetic order. The returned arena might be empty.
val iargs : Bap_core_theory.Theory.Target.t -> arena t
iargs t
the integer argument arena.
An alias to of_roles [function_argument; integer]
val irets : Bap_core_theory.Theory.Target.t -> arena t
irets t
the integer return values arena.
An alias to of_roles [function_return; integer]
val fargs : Bap_core_theory.Theory.Target.t -> arena t
fargs t
the floating-point argument arena.
An alias to of_roles [function_argument; floating]
val frets : Bap_core_theory.Theory.Target.t -> arena t
frets t
the floating-point return values arena.
An alias to of_roles [function_return; floatin]