package bap-std

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

Event subsystem.

The event subsystem is a way of communicating between different subsystems of BAP.

type t = ..
type event = t = ..

global stream of events

val send : t -> unit

send event to the stream

val register_printer : (t -> string option) -> unit

register_printer f when event e is printed, f e must be None if f is not a subset of events, that is intended to be printed by an f. If it is Some str, then str is printed out.

If more than one printer returns Some thing for the same event, then the last registered has the precedence.

module Log : sig ... end

Logging event.

include Regular.Std.Printable.S with type t := t
val to_string : t -> string

to_string x returns a human-readable representation of x

val str : unit -> t -> string

str () 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 exp
val pps : unit -> t -> string

synonym for str

val ppo : Core_kernel.Out_channel.t -> t -> unit

will print to a standard output_channel, useful for using in printf, fprintf, etc.

val pp_seq : Stdlib.Format.formatter -> t Core_kernel.Sequence.t -> unit

prints 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
OCaml

Innovation. Community. Security.