graph4code icon indicating copy to clipboard operation
graph4code copied to clipboard

Relational dependancies not being tracked?

Open Mbladra opened this issue 2 years ago • 4 comments

It doesn't seem like there's any way to run static analysis to track relational dependancies? Even if you run analysis over a package, building the call graph only seems to look at one module at a time.

Mbladra avatar Mar 09 '23 22:03 Mbladra

Yes, the current way this is created it has no notion of project scope because we applied it to millions of scripts drawn from GitHub (Google's BigQuery dataset). We can however add the notion of project scope and build the call graph across scripts within a project. It is a new feature though, so will leave this open for @juliandolby to comment.

ksrinivs64 avatar Mar 10 '23 14:03 ksrinivs64

Hi @ksrinivs64, I was wondering if you could give some update here? The fact that the GraphGen4Code is not able to map the relationships between the methods called in other methods and their respective definition location kinda beats the purpose of the framework? As basically the information I am getting in the json output of processed code is no more than I am getting from recursively traversing the AST of a Python file.

Hence, wondering how is developing the functionality to track the cross-file dependencies going

RokPopov avatar Feb 26 '24 12:02 RokPopov

ASTs are not going to be able to give you data flow across procedures or method calls. As for the larger scope - meaning across files is an issue that we have not yet had time to address (each of us is busy with other work). Will update here soon as we can do it.

ksrinivs64 avatar Feb 27 '24 14:02 ksrinivs64

I understand that this is the case with static analysis, so I implemented a solution that combines language servers which do runtime analysis. I guess this would be incredibly hard with only using static analysis by parsing the AST

RokPopov avatar Mar 07 '24 12:03 RokPopov