cprover
|
Directed graph representation of this call graph. More...
#include <call_graph.h>
Public Types | |
typedef std::unordered_map< irep_idt, node_indext > | nodes_by_namet |
Type of the node name -> node index map. More... | |
![]() | |
typedef function_nodet | nodet |
typedef nodet::edgest | edgest |
typedef std::vector< nodet > | nodest |
typedef nodet::edget | edget |
typedef nodet::node_indext | node_indext |
typedef std::list< node_indext > | patht |
Public Member Functions | |
optionalt< node_indext > | get_node_index (const irep_idt &function) const |
Find the graph node by function name. More... | |
const nodes_by_namet & | get_nodes_by_name () const |
Get the node name -> node index map. More... | |
![]() | |
node_indext | add_node () |
void | swap (grapht &other) |
bool | has_edge (node_indext i, node_indext j) const |
const nodet & | operator[] (node_indext n) const |
nodet & | operator[] (node_indext n) |
void | resize (node_indext s) |
std::size_t | size () const |
bool | empty () const |
const edgest & | in (node_indext n) const |
const edgest & | out (node_indext n) const |
void | add_edge (node_indext a, node_indext b) |
void | remove_edge (node_indext a, node_indext b) |
edget & | edge (node_indext a, node_indext b) |
void | add_undirected_edge (node_indext a, node_indext b) |
void | remove_undirected_edge (node_indext a, node_indext b) |
void | remove_in_edges (node_indext n) |
void | remove_out_edges (node_indext n) |
void | remove_edges (node_indext n) |
void | clear () |
void | shortest_path (node_indext src, node_indext dest, patht &path) const |
void | shortest_loop (node_indext node, patht &path) const |
void | visit_reachable (node_indext src) |
std::vector< node_indext > | get_reachable (node_indext src, bool forwards) const |
Run depth-first search on the graph, starting from a single source node. More... | |
std::vector< node_indext > | get_reachable (const std::vector< node_indext > &src, bool forwards) const |
Run depth-first search on the graph, starting from multiple source nodes. More... | |
void | make_chordal () |
std::size_t | connected_subgraphs (std::vector< node_indext > &subgraph_nr) |
std::size_t | SCCs (std::vector< node_indext > &subgraph_nr) const |
Computes strongly-connected components of a graph and yields a vector expressing a mapping from nodes to components indices. More... | |
bool | is_dag () const |
std::list< node_indext > | topsort () const |
Find a topological order of the nodes if graph is DAG, return empty list for non-DAG or empty graph. More... | |
std::vector< node_indext > | get_successors (const node_indext &n) const |
void | output_dot (std::ostream &out) const |
void | for_each_successor (const node_indext &n, std::function< void(const node_indext &)> f) const |
Private Attributes | |
std::unordered_map< irep_idt, node_indext > | nodes_by_name |
Maps function names onto node indices. More... | |
Friends | |
class | call_grapht |
Additional Inherited Members | |
![]() | |
void | shortest_path (node_indext src, node_indext dest, patht &path, bool non_trivial) const |
void | tarjan (class tarjant &t, node_indext v) const |
![]() | |
nodest | nodes |
Directed graph representation of this call graph.
Definition at line 117 of file call_graph.h.
typedef std::unordered_map<irep_idt, node_indext> call_grapht::directed_grapht::nodes_by_namet |
Type of the node name -> node index map.
Definition at line 131 of file call_graph.h.
optionalt< std::size_t > call_grapht::directed_grapht::get_node_index | ( | const irep_idt & | function | ) | const |
Find the graph node by function name.
function | function to find |
Definition at line 293 of file call_graph.cpp.
References nodes_by_name.
Referenced by get_connected_functions(), and get_neighbours().
|
inline |
Get the node name -> node index map.
Definition at line 135 of file call_graph.h.
References nodes_by_name.
|
friend |
Definition at line 119 of file call_graph.h.
|
private |
Maps function names onto node indices.
Definition at line 122 of file call_graph.h.
Referenced by call_grapht::get_directed_graph(), get_node_index(), and get_nodes_by_name().