Module Pulselib.PulseSpecializedCallGraph

type location
type callee = {
  1. call_location : location;
  2. callee : int;
}
type name
type node = {
  1. name : name;
  2. context : int;
}
type specialization = string
type edge = {
  1. caller : node;
  2. callees : callee list;
}
type call_graph = {
  1. edges : edge list;
  2. contexts : specialization list;
}

Readable version of the call graph explored by Pulse during analysis. The graph is context-sensitive because of specialization: the same procedure can be analyzed in different contexts and may not have the same callees depending on its context. The meaning of context i can be found in the i-th element of the contexts field. Context 0 is the default (no specialization). Each element of edges pairs a caller node with its list of callees. The callee field in each callee record is an index into edges identifying the callee target.

module JsonBuilder : sig ... end
val to_json : call_graph -> string

Serialize a call graph to a JSON string.

val get_missed_captures : get_summary:(IR.Procname.t -> PulseSummary.t option) -> IR.SpecializedProcname.t list -> IR.SpecializedProcname.Set.t IR.Typ.Name.Map.t

Traverse Pulse summaries reachable from the given entry points and return a map from missed capture types to the set of specialized procnames that reference them.