package bap-std

  1. Overview
  2. Docs
The Binary Analysis Platform Standard Library

Install

Dune Dependency

Authors

Maintainers

Sources

v2.1.0.tar.gz
sha256=631fc58628418e4856709a0cfc923a65e00c9494fbd28d444c633d11194831de
md5=3db9deac8d429b9b8a8ec9aec54987b1

doc/bap/Bap/Std/Project/Pass/index.html

Module Project.Pass

A program analysis pass.

Pass is essentially a function that takes a project data structures, and returns a new project, possibly modified.

Passes may depend on other passes, and have a few properties, associated with them.

type t = pass
type error =
  1. | Unsat_dep of pass * string
  2. | Runtime_error of pass * exn

An error that can occur when loading or running pass.

  • Not_loaded name pass with a given name wasn't loaded for some reason. This is a very unlikely error, indicating either a logic error in the plugin system implementation or something very weird, that we didn't expect.
  • Not_loaded name when we tried to load plugin with a given name we failed to find it in our search paths.
  • Runtime_error (name,exn) when plugin with a given name was run it raised an exn.
val sexp_of_error : error -> Ppx_sexp_conv_lib.Sexp.t
exception Failed of error

run_pass project pass applies pass to a project.

If a pass has dependencies, then they will be run before the pass in some topological order.

val run_exn : t -> project -> project

run_pass_exn proj is the same as run_pass, but raises an exception on error. Useful to provide custom error handling/printing.

  • raises Pass_failed

    if failed to load, or if plugin failed at runtime.

val name : t -> string

name pass is a pass name

val autorun : t -> bool

autorun pass is true if a pass was created with autorun option

OCaml

Innovation. Community. Security.