package bap-std
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=9c126781385d2fa9b8edab22e62b25c70bf2f99f6ec78abb7e5e36d63cfa4174
    
    
  md5=5abd9b3628b43f797326034f31ca574f
    
    
  doc/bap/Bap/Std/Bil/Result/index.html
Module Bil.Result
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 t = resulttype 'a r = (result, 'a) Monads.Std.Monad.State.tState monad that evaluates to result
type 'a u = (unit, 'a) Monads.Std.Monad.State.tState monad that evaluates to unit
storage s id creates a result with the given id and storage s as a value
module Id : sig ... endResult identifier. Result is totally ordered regular value.
module Value : Regular.Std.Printable.S with type t = valueinclude Regular.Std.Printable.S with type t := t
val to_string : t -> stringto_string x returns a human-readable representation of x
val str : unit -> t -> stringstr () t is formatted output function that matches "%a" conversion format specifier in functions, that prints to string, e.g., sprintf, failwithf, errorf and, surprisingly all Lwt printing function, including Lwt_io.printf and logging (or any other function with type ('a,unit,string,...) formatN`. Example:
Or_error.errorf "type %a is not valid for %a"
    Type.str ty Exp.str expval pps : unit -> t -> stringsynonym for str
val ppo : Core_kernel.Out_channel.t -> t -> unitwill print to a standard output_channel, useful for using in printf, fprintf, etc.
val pp_seq : Format.formatter -> t Core_kernel.Sequence.t -> unitprints a sequence of values of type t
this will include pp function from Core that has type t printer, and can be used in Format.printf family of functions
include Core_kernel.Pretty_printer.S with type t := t
val pp : Base__.Formatter.t -> t -> unit