package bap-std

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

Result of computation.

Result of an expression evaluation depends on a context. Thus, each result has a unique identifier, associated with it, that is usually provided by a context. The result is a concrete value, that is created whenever an expression is evaluated under a given context. Since, context is changed during the evaluation (at least because a new result is allocated), two consecutive evaluations of the same expression will give different results. (This property is preserved by Expi.context class, that provides methods for creating values of type result).

Since Result.Id is a regular type, it is possible to associate arbitrary information (like taint information, formulae, etc) with each result, using associative data structures, like maps and hash tables.

type id

result identifier

type t = result
type 'a r = (result, 'a) Monads.Std.Monad.State.t

State monad that evaluates to result

type 'a u = (unit, 'a) Monads.Std.Monad.State.t

State monad that evaluates to unit

val undefined : id -> t

undefined id creates a result with the given id and undefined value

val storage : storage -> id -> t

storage s id creates a result with the given id and storage s as a value

val word : word -> id -> t

word w id creates a result with the given id and word w as a value

val id : t -> id

returns result's identifier

val value : t -> value

returns result's value

module Id : sig ... end

Result identifier. Result is totally ordered regular value.

module Value : Regular.Std.Printable.S with type t = value
include Regular.Std.Printable.S with type t := t
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq : Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.