@@ -40,13 +40,26 @@ std::set<irep_idt> get_callers(
40
40
// / \param function: function to query
41
41
// / \return set of reachable functions, including `function`
42
42
std::set<irep_idt> get_reachable_functions (
43
- const call_grapht::directed_grapht &graph, const irep_idt &function);
43
+ const call_grapht::directed_grapht &graph,
44
+ const irep_idt &function);
44
45
45
- // / Get functions that can reach a given function
46
46
// / \param graph: call graph
47
47
// / \param function: function to query
48
48
// / \return set of functions that can reach the target, including `function`
49
49
std::set<irep_idt> get_reaching_functions (
50
- const call_grapht::directed_grapht &graph, const irep_idt &function);
50
+ const call_grapht::directed_grapht &graph,
51
+ const irep_idt &function);
52
+
53
+ // / Get either callers or callees reachable from a given
54
+ // / start function within N steps
55
+ // / \param graph: call graph
56
+ // / \param start_function: single start function
57
+ // / \param n: number of steps to consider
58
+ // / \return set of functions that can be reached from the start function
59
+ // / including the start function
60
+ std::set<irep_idt> get_functions_reachable_within_n_steps (
61
+ const call_grapht::directed_grapht &graph,
62
+ const irep_idt &start_function,
63
+ std::size_t n);
51
64
52
65
#endif
0 commit comments