cprover
call_graph_helpers.h File Reference

Function Call Graph Helpers. More...

#include "call_graph.h"
Include dependency graph for call_graph_helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::set< irep_idtget_callees (const call_grapht::directed_grapht &graph, const irep_idt &function)
 Get functions directly callable from a given function. More...
 
std::set< irep_idtget_callers (const call_grapht::directed_grapht &graph, const irep_idt &function)
 Get functions that call a given function. More...
 
std::set< irep_idtget_reachable_functions (const call_grapht::directed_grapht &graph, const irep_idt &function)
 Get functions reachable from a given function. More...
 
std::set< irep_idtget_reaching_functions (const call_grapht::directed_grapht &graph, const irep_idt &function)
 Get functions that can reach a given function. More...
 

Detailed Description

Function Call Graph Helpers.

Definition in file call_graph_helpers.h.

Function Documentation

◆ get_callees()

std::set<irep_idt> get_callees ( const call_grapht::directed_grapht graph,
const irep_idt function 
)

Get functions directly callable from a given function.

Parameters
graphcall graph
functionfunction to query
Returns
set of called functions

Definition at line 31 of file call_graph_helpers.cpp.

References get_neighbours().

◆ get_callers()

std::set<irep_idt> get_callers ( const call_grapht::directed_grapht graph,
const irep_idt function 
)

Get functions that call a given function.

Parameters
graphcall graph
functionfunction to query
Returns
set of caller functions

Definition at line 37 of file call_graph_helpers.cpp.

References get_neighbours().

◆ get_reachable_functions()

std::set<irep_idt> get_reachable_functions ( const call_grapht::directed_grapht graph,
const irep_idt function 
)

Get functions reachable from a given function.

Parameters
graphcall graph
functionfunction to query
Returns
set of reachable functions, including function

Definition at line 62 of file call_graph_helpers.cpp.

References get_connected_functions().

◆ get_reaching_functions()

std::set<irep_idt> get_reaching_functions ( const call_grapht::directed_grapht graph,
const irep_idt function 
)

Get functions that can reach a given function.

Parameters
graphcall graph
functionfunction to query
Returns
set of functions that can reach the target, including function

Definition at line 68 of file call_graph_helpers.cpp.

References get_connected_functions().