reachability
Determines if a function transitively calls another, returning the shortest call chain with file:line locations for each hop.
Instructions
Does FROM transitively call TO — and through which call chain?
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 | json | |
| max_depth | No | ||
| to_symbol | Yes | ||
| from_symbol | Yes | ||
| project_root | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |