Working on an old abandoned code base where i can't talk to the authors and it takes hours to figure out some of the bullshit it's pulling off, i can definitely see the appeal for a tool that can quickly read over the code and check my inferences on e.g. memory flow and ownership patterns

Nowadays, people would obviously default to either LLMs for that or for arguing that humans should do it because the other people are saying LLMs and fuck that

But what I'm more interested in: there's plenty of static analysis tools for checking code you wrote. Is there any prior art in deterministic static analysis tools that help _read code_ by other people?

Dataflow and control flow analysis are super commonly used in compiler optimization. Are there any tools out there that do dataflow analysis and then, say, can look at a variable and show all _possible references_ and relevant code?

E.g. this Foo* is passed to foo(), so it can be f there, which might call bar, and ...)

Or "this code allocates Bar, here's the entire possible relevant code for what might happen to that across this 100kloc project, here's every function in every file that might use _that specific value_, and an explanation of how it gets there"