News for hackers. Stuff that matters.
Re:Discontinue Sourcetrail by potatochup on Thursday September 23, 2021 @09:59PM (#28637843)
Hmm. Hard to monetize I guess. Does anyone know of any code analysis software that looks at dataflow? Specifically for embedded contexts, a lot of code is written in a very non-functional style, where the output of one module is a series of global variables. That variable is then picked up by other modules as an input, and used to calculate that modules output, etc etc. I'd pay big $$$ for any software that would tell me "modifying variable X will affect downstream Y which will affect Z"
Re:Discontinue Sourcetrail by habitue on Friday September 24, 2021 @12:18AM (#28638579)
Will Crichton just open sourced flowistry for Rust:

https://github.com/willcrichton/flowistry

It's a vscode plugin that analyzes the data flow graph, and lets you do things like highlight statements that depend on the current one, etc.

Re:Discontinue Sourcetrail by jschwartzi on Thursday September 23, 2021 @11:48PM (#28638420)
That’s effectively what Sourcetrail/Coati does in C/C++. Coati was super-helpful for me many years ago when I had to dissect and analyze some crappy vendor code. It also helped me get up to speed on a bunch of C++ spaghetti code on the same project. They hit the nail on the head with their tool and I’ve been using it off and on ever since. I’m actually wondering now if it could be used to analyze Yocto project dependencies and build steps.
Re:Discontinue Sourcetrail by nyanpasu64 on Friday September 24, 2021 @12:34AM (#28638670)
I was using Sourcetrail in the past, and I thought it was only an interactive code field/method browser, and didn't have any way to trace causality... unless I missed some functionality.
Re:Discontinue Sourcetrail by jschwartzi on Saturday September 25, 2021 @11:10AM (#28653744)
I was able to use it to trace causality because the code base I used it for was simple enough that given the relationships between each variable and function call I was able to construct the call graph for a particular set of inputs myself.
Re:Discontinue Sourcetrail by nyanpasu64 on Saturday September 25, 2021 @03:19PM (#28655526)
Is Sourcetrail and a document for taking notes measurably better than having an IDE with 2 panes, "go to definition" and "find all references", and a document for taking notes? In my experience it's not really, and it was tricky to setup Sourcetrail for a given project.

I saw in another comment saying Sourcetrail supplies "who-implements-who". CLion gives you this, Qt Creator doesn't really (outside of Find References), and I'm not sure about VS Code Clangd or Microsoft C++.

Re:Discontinue Sourcetrail by jschwartzi on Saturday October 02, 2021 @11:14PM (#28734237)
Well it’s a matter of friction. Clion gives you the same information but for each item in the chain you have to click on it bunches. In Sourcetrail you mouse over the symbol and click once. And it exposes the dependencies graphically so you can see who uses it. I hardly use that function in Clion but I use it all the time in Sourcetrail because the way it’s presented is easier for me to read and understand.
Re:Discontinue Sourcetrail by pabs3 on Thursday September 23, 2021 @11:27PM (#28638310)
Sounds like a task for symbolic execution engines?

https://en.wikipedia.org/wiki/Symbolic_execution

Re:Discontinue Sourcetrail by tn1 on Friday September 24, 2021 @12:03AM (#28638485)
I read a paper a while back that does almost the inverse of what you're asking (given Z, how could I get a Y and an X). I tried the code and it almost worked, but gave up and had to move on unfortunately. Still, you might find it useful.

https://dl.acm.org/doi/10.1145/3052973.3053038

Re:Discontinue Sourcetrail by kgilpin on Monday September 27, 2021 @09:23AM (#28670339)
AppMap (https://appland.com/products/appmap) takes the approach of recording code execution flows and presenting them visually. There are also some tools to diff and compare AppMaps. These more advanced tools aren’t on the website because they are in development but I’d be happy to share with you, or do a demo. In this way you can get a clear view of the difference in code paths and dependencies, based on different parameters.

@kegilpin

Re:Discontinue Sourcetrail by eugene0 on Friday September 24, 2021 @03:51AM (#28639686)
We do dependency visualization (it's correlates with dataflow) at viezly. You can check it out here: https://viezly.com/change_requests/3986
Re:Discontinue Sourcetrail by bleuchase on Friday September 24, 2021 @03:24AM (#28639535)
Re:Discontinue Sourcetrail by fiddlerwoaroof on Friday September 24, 2021 @12:30AM (#28638644)
IntelliJ has some tools for this for Java.