package bap-std

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

BAP Common Graphs.

This module contains several graph structures, that are used across BAP.

The idiomatic use case is to bind the chosen graph to a shorter name and use it as a first class module with different functions in graphlib library, e.g.,

module G = Graphs.Cfg

let insns cfg =
  Graphlib.reverse_postorder_traverse (module G) cfg |>
  Seq.map ~f:Block.insns |>
  Seq.concat_map ~f:Seq.of_list
module Cfg : Graphlib.Std.Graph with type t = cfg and type node = block and type Edge.label = edge

Control Flow Graph with a machine basic block as a node.

module Callgraph : Graphlib.Std.Graph with type node = tid and type Node.label = tid and type Edge.label = jmp term list

A call graph representation. In this representations, nodes are identifiers of subroutine terms, and edges, representing calls, are marked with a list of callsites, where callsite is denoted by a jump term.

module Ir : sig ... end

Graph view over IR.

module Tid : sig ... end

Graph of Term identifiers.