1#ifndef ROSE_BinaryAnalysis_Partitioner2_FunctionCallGraph_H 
    2#define ROSE_BinaryAnalysis_Partitioner2_FunctionCallGraph_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    5#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h> 
    7#include <Sawyer/Graph.h> 
   11namespace BinaryAnalysis {
 
   12namespace Partitioner2 {
 
   35        size_t count()
 const { 
return count_; }
 
 
   66    boost::iterator_range<Graph::ConstVertexValueIterator> 
functions() {
 
 
  110    Graph::EdgeIterator 
insertCall(
const Graph::VertexIterator &source, 
const Graph::VertexIterator &target,
 
  120    std::vector<FunctionPtr> 
callers(
const Graph::ConstVertexIterator &target) 
const;
 
  129    size_t nCallers(
const Graph::ConstVertexIterator &target) 
const;
 
  139    std::vector<FunctionPtr> 
callees(
const Graph::ConstVertexIterator &source) 
const;
 
  148    size_t nCallees(
const Graph::ConstVertexIterator &source) 
const;
 
  158    size_t nCallsIn(
const Graph::ConstVertexIterator &target) 
const;
 
  168    size_t nCallsOut(
const Graph::ConstVertexIterator &source) 
const;
 
  177    size_t nCalls(
const Graph::ConstVertexIterator &source, 
const Graph::ConstVertexIterator &target) 
const;
 
 
Information about each edge in the call graph.
 
EdgeType type() const
Type of edge.
 
size_t count() const
Number of inter-function control flow edges represented by this edge.
 
Function call information.
 
const Graph & graph() const
Underlying function call graph.
 
Graph::EdgeIterator insertCall(const FunctionPtr &source, const FunctionPtr &target, EdgeType type=E_FUNCTION_CALL, size_t edgeCount=0)
Insert a call edge.
 
Graph::EdgeIterator insertCall(const Graph::VertexIterator &source, const Graph::VertexIterator &target, EdgeType type=E_FUNCTION_CALL, size_t edgeCount=0)
Insert a call edge.
 
size_t nCallers(const Graph::ConstVertexIterator &target) const
Number of functions that call the specified function.
 
size_t nCallsOut(const Graph::ConstVertexIterator &source) const
Total number of calls from a function.
 
std::vector< FunctionPtr > callers(const FunctionPtr &target) const
List of all functions that call the specified function.
 
std::vector< FunctionPtr > callees(const FunctionPtr &source) const
List of all functions called by the specified function.
 
size_t nCalls(const FunctionPtr &source, const FunctionPtr &target) const
Number of calls between two specific functions.
 
size_t nCalls(const Graph::ConstVertexIterator &source, const Graph::ConstVertexIterator &target) const
Number of calls between two specific functions.
 
size_t nCallees(const Graph::ConstVertexIterator &source) const
Number of functions that the specified function calls.
 
size_t nCallsIn(const Graph::ConstVertexIterator &target) const
Total number of calls to a function.
 
boost::iterator_range< Graph::ConstVertexValueIterator > functions()
Return all functions in the call graph.
 
size_t nCallers(const FunctionPtr &target) const
Number of functions that call the specified function.
 
Graph::ConstVertexIterator findFunction(const FunctionPtr &function) const
Find function in call graph.
 
Graph::ConstVertexIterator findFunction(Address entryVa) const
Find function in call graph.
 
size_t nCallsIn(const FunctionPtr &target) const
Total number of calls to a function.
 
size_t nCallsOut(const FunctionPtr &source) const
Total number of calls from a function.
 
std::vector< FunctionPtr > callees(const Graph::ConstVertexIterator &source) const
List of all functions called by the specified function.
 
FunctionCallGraph()
Constructs an empty function call graph.
 
bool exists(Address entryVa) const
Determine if a function exists in the call graph.
 
bool exists(const FunctionPtr &function) const
Determine if a function exists in the call graph.
 
size_t nCallees(const FunctionPtr &source) const
Number of functions that the specified function calls.
 
Graph::VertexIterator insertFunction(const FunctionPtr &function)
Insert a function vertex.
 
std::vector< FunctionPtr > callers(const Graph::ConstVertexIterator &target) const
List of all functions that call the specified function.
 
Sawyer::Container::Graph< FunctionPtr, Edge, VertexKey > Graph
Function call graph.
 
Graph containing user-defined vertices and edges.
 
boost::iterator_range< VertexValueIterator > vertexValues()
Iterators for all vertices.
 
EdgeType
Partitioner control flow edge types.
 
@ E_FUNCTION_CALL
Edge is a function call.
 
std::uint64_t Address
Address.