Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The whole thing maybe.

But often I'm in a function and I'd like to know "who calls this", or "what does this call". So being able to get a graph limited to the current function (node) and a couple of levels out on either end could be very helpful. Or maybe being able to mark two functions and see the ways they are connected (if at all).

I guess there might be some tools that do this though, haven't looked.



Sourcetrail is one such app. It recently went open source. I’ve been trying on spare time to contribute to it, it currently supports C++, Java and Python.

I’m looking at ways to improve the analysis to get more detail from apps, but it’s tricky. As far as I know, nobody’s made an ontology of computer science or source code patterns yet.

Creating the graph is easy compared to how much you might want to do to interpret it. Then we’ve data flow graphs to consider, and UI component graphs, dependency graphs, supported platform annotations, and ideally, telemetry from code execution in tests and production, and each can supplement or annotate control flow graphs and source code.

It’s a problem we’ll solve as a community but it’ll take a number of years before it’s general purpose enough that step one is load a program and step two is read and modify it... with everything you need neatly linked and annotated...

https://www.sourcetrail.com/

https://github.com/CoatiSoftware/Sourcetrail

https://www.patreon.com/sourcetrail/posts

For more on my thoughts of “understanding code automatically,” see https://github.com/CoatiSoftware/Sourcetrail/issues/750#issu... as an example.

My preference would be just as books, programmers and IDEs build mental models from source code, that eventually we could generically go from a collection of source files to identifying languages, build commands, and app starting points to multiple layers of graphs: control flow, data flow, cross-project references, and eventually — help programmers like an IDE would, but smarter, more like documentation written by a human with annotated examples from test cases and live code, etc.


Visual studio can show a call-graph, containing both callers and callees to/from a function. "Who calls this" is standard feature of any IDE worth it's name, it's usually called find usages or find references.


Please someone do a PyCharm plugin for this!




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: