@@ -59,7 +59,7 @@ std::set<irep_idt> get_reaching_functions(
5959std::set<irep_idt> get_functions_reachable_within_n_steps (
6060 const call_grapht::directed_grapht &graph,
6161 const std::set<irep_idt> &start_functions,
62- std::size_t & n);
62+ std::size_t n);
6363
6464// / Get either callers or callees reachable from a given
6565// / list of functions within N steps
@@ -71,6 +71,27 @@ std::set<irep_idt> get_functions_reachable_within_n_steps(
7171std::set<irep_idt> get_functions_reachable_within_n_steps (
7272 const call_grapht::directed_grapht &graph,
7373 const irep_idt &start_function,
74- std::size_t &n);
74+ std::size_t n);
75+
76+ // / Get list of functions on the shortest path between two functions
77+ // / \param graph: call graph
78+ // / \param src: function to start from
79+ // / \param dest: function to reach
80+ // / \return list of functions on shortest path
81+ std::list<irep_idt> get_shortest_function_path (
82+ const call_grapht::directed_grapht &graph,
83+ const irep_idt &src,
84+ const irep_idt &dest);
85+
86+ // / Disconnects all functions in the call graph that are unreachable from
87+ // / a given start function.
88+ // / Removing nodes requires re-indexing, so instead we disconnect them, removing
89+ // / all in and out edges from those nodes.
90+ // / This speeds up backwards reachability.
91+ // / \param graph: call graph
92+ // / \param function: start function
93+ void disconnect_unreachable_functions (
94+ call_grapht::directed_grapht &graph,
95+ const irep_idt &function);
7596
7697#endif
0 commit comments