package bap-std

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

Expression interpreter

constraint 'a = Expi.context

Interaction with environment

method empty : Bil.storage

creates an empty storage. If you want to provide your own implementation of storage, then it is definitely the right place.

method lookup : var -> 'a Bil.Result.r

a variable is looked up in a context

method update : var -> Bil.result -> 'a Bil.Result.u

a variable is bind to a value.

method load : Bil.storage -> addr -> 'a Bil.Result.r

a byte is loaded from a given address

method store : Bil.storage -> addr -> word -> 'a Bil.Result.r

a byte is stored to a a given address

Error conditions

method type_error : type_error -> 'a Bil.Result.r

a given typing error has occured

method division_by_zero : unit -> 'a Bil.Result.r

we can't do this!

method undefined_addr : addr -> 'a Bil.Result.r

called when storage doesn't contain the addr

method undefined_var : var -> 'a Bil.Result.r

called when context doesn't know the variable

Evaluation methods

method eval_exp : exp -> 'a Bil.Result.r
method eval_var : var -> 'a Bil.Result.r
method eval_int : word -> 'a Bil.Result.r
method eval_load : mem:exp -> addr:exp -> endian -> size -> 'a Bil.Result.r
method eval_store : mem:exp -> addr:exp -> exp -> endian -> size -> 'a Bil.Result.r
method eval_binop : binop -> exp -> exp -> 'a Bil.Result.r
method eval_unop : unop -> exp -> 'a Bil.Result.r
method eval_cast : cast -> int -> exp -> 'a Bil.Result.r
method eval_let : var -> exp -> exp -> 'a Bil.Result.r
method eval_ite : cond:exp -> yes:exp -> no:exp -> 'a Bil.Result.r
method eval_concat : exp -> exp -> 'a Bil.Result.r
method eval_extract : int -> int -> exp -> 'a Bil.Result.r
method eval_unknown : string -> typ -> 'a Bil.Result.r
OCaml

Innovation. Community. Security.