package binsec

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dba.LValueSource

Sourcetype t = private
  1. | Var of Var.t
  2. | Restrict of Var.t * int Binsec_base.Interval.t
  3. | Store of size * endianness * Expr.t * string option
include Binsec_base.Sigs.EQ with type t := t
Sourceval equal : t -> t -> bool
Sourceval size_of : t -> int

size_of lv yields the size of lv in bits *

Sourceval var : ?tag:Var.Tag.t -> bitsize:Binsec_base.Size.Bit.t -> string -> t

var tag name ~size creates a DBA lvalue for a variable

Sourceval v : Var.t -> t
Sourceval flag : ?bitsize:Binsec_base.Size.Bit.t -> string -> t

flag ~size fname creates a flag variable.

  • size defaults to 1
Sourceval temporary : string -> Binsec_base.Size.Bit.t -> t
Sourceval _restrict : string -> Binsec_base.Size.Bit.t -> int -> int -> t
Sourceval _bit_restrict : string -> Binsec_base.Size.Bit.t -> int -> t

_restrict and _bit_restrict are deprecated. Use the other forms ** below.

Sourceval restrict : Var.t -> int -> int -> t
Sourceval bit_restrict : Var.t -> int -> t
Sourceval store : ?array:string -> Binsec_base.Size.Byte.t -> endianness -> Expr.t -> t

temp n creates a lvalue representing a temporary of size n with name Format.sprintf "temp%d" n.

Sourceval is_expr_translatable : Expr.t -> bool

is_expr_translatable e returns true is the expression can have a valid lvalue translation

Sourceval of_expr : Expr.t -> t

of_expr e translates an expression to its lvalue equivalent if possible.

Use is_expr_translatable e to check the feasability of this translation.

  • raises Failure

    "LValue.of_expr ..." if it is not possible.

Sourceval to_expr : t -> Expr.t

to_expr e translates an lvalue to its equivalent rvalue.

bitsize lv returns the size in bits of lv.

Sourceval resize : Binsec_base.Size.Bit.t -> t -> t

resize bitsize lv patches the lvalue lv and gives it a size of bitsize.