Call-path reachability
reachabilityDetermine whether one function can transitively call another and find the shortest call chain with file:line call sites, using BFS over the caller graph.
Instructions
Call path / call chain: does FROM transitively call TO, and through which functions?
Use this instead of chaining find_callers rounds when the question is "can this function end up in that one?". BFS over the caller graph returns the SHORTEST chain, each hop with the call site's file:line. JSON results: {path_found, hops, depth, nodes_explored}; hops run from from_symbol to to_symbol. Static analysis cannot follow function pointers (ops structs, callbacks).
Args: from_symbol: The caller end ("can this reach ..."). to_symbol: The callee end ("... this function?"). max_depth: Longest chain to consider, in calls (1-12, default 8).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | text | |
| max_depth | No | ||
| to_symbol | Yes | ||
| from_symbol | Yes | ||
| project_root | No |