Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relationship between CFG and call graph #127

Open
ShayYaari opened this issue Jun 10, 2024 · 3 comments
Open

Relationship between CFG and call graph #127

ShayYaari opened this issue Jun 10, 2024 · 3 comments

Comments

@ShayYaari
Copy link

Hello,

First I want to thank you so much for your hard and amazing work in this project!
As I'm new to static analysis and a beginner in using this project, I have 2 questions:

  1. I'm trying to use both the CFG and the call graph analyses together and I'm wondering if there is an easy way to go from one to another. For example, given a ast.Call statement in one of the CFG blocks statements, to find its node in the call graph. In the other way, given a node in the call graph, find its block and ast.Call in the CFG.

  2. I'm trying to work on an application to analyze and evaluate arguments in a specific function call in my program. Given a function in the call graph,I want to try and analyze the paths to its call and heuristically evaluate the arguments it is called with. It seems as I can find some data in the SSA, CFG and call graph that help to create some sort of an algorithm to find the paths and evaluate. However I'm not sure if there is better known approach to do so or some already implemented algorithms / research on this. Do you have some suggestions for me where can I find more information, or your recommendation?

Thanks!

@Jarvx
Copy link
Collaborator

Jarvx commented Jun 10, 2024

Hi Shay Yaari,

Thank you for the help.

  1. This is an initial plan, to develop a bundled call graph for the CFG module. however, the development is rather behind this plan.
  2. This is not difficult to implement. One example should be Exploring Hyperparameter Usage and Tuning in Machine Learning Research, the author used the SSA module to collect values for ML API calls.

Please email me if you still have any questions or feel free to make PRs.

best regards

@ShayYaari
Copy link
Author

ShayYaari commented Jun 10, 2024

Thanks @Jarvx for you quick response!

Regarding 2, are the examples you are referring to (as the one you mentioned) are always based on ML? Or are there examples of algorithms that take these graphs and SSA and on top of it in a deterministic / iterative way analyzes calls arguments?

@Jarvx
Copy link
Collaborator

Jarvx commented Jun 10, 2024

I am not sure because I did not look into their code implementation, nor am I on the paper author list. but according to the paper, they used the SSA module as part of their artifact.

The paper seems to only handle ML APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants