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

Pointer Analysis Types #43

Open
mayanez opened this issue Apr 12, 2018 · 7 comments
Open

Pointer Analysis Types #43

mayanez opened this issue Apr 12, 2018 · 7 comments

Comments

@mayanez
Copy link

mayanez commented Apr 12, 2018

Hi,

Firstly, Awesome project! Reading through the source code I had a question about this enum:

A number of analysis I'm interested are listed. However, it seems like these are yet to be implemented? Or is there source code available somewhere else that hasn't been merged?

@yuleisui
Copy link
Collaborator

Hi Miguel,

The demand-driven analysis (SUPA) is yet to be merged to SVF. We hope we can finish merging in the next few months.

For all other analyses, either they are in the repo, or not implemented.

Thanks,
Yulei

@mayanez
Copy link
Author

mayanez commented Apr 12, 2018

Thanks for your quick response!

While it is being merged, is the version found here https://github.com/yuleisui/yuleisui.github.io/blob/master/supa/supa.zip working?

@yuleisui
Copy link
Collaborator

Yes, it works on an older version of SVF (i.e., LLVM-4.0.0).

@mayanez
Copy link
Author

mayanez commented Apr 16, 2018

Hi Yulei,

I've been experimenting with SVF and had a few questions.

I'm trying to compare the SVFG graphs between Context-sensitive DDA (ie. ./build/bin/dvf -cxt -dump-svfg cs0.ll) & the flow-sensitive WPA (ie. ./build/bin/wpa -ander -dump-svfg cs0.ll). The MUSTALIAS & NOALIAS asserts are correct as expected. However, I am not seeing any difference in the graph's with the exception of the yellow FormalIn nodes.

I would have expected these two graphs to be different. Am I missing something?

@yuleisui
Copy link
Collaborator

Hi Miguel,

The two analyses should produce the same SVFG. DDA (SUPA) decides whether a value-flow (an SVFG edge) is infeasible or not via on-demand graph traversal.

Note that DDA (SUPA) only refines the value-flows rather than deleting SVFG's edges to compute precise points-to results. This is a design choice to make SVFG consistent, but the analysis to will be gradually refined.

@mayanez
Copy link
Author

mayanez commented Apr 18, 2018

Thank you for the clarification. In the case of DDA (SUPA) is it possible to output the SVFG it computes at the end of its refinement stage? I want to be able to query the graph to diff against a less sensitive points-to analysis.

@yuleisui
Copy link
Collaborator

Miguel,

Good question. Unfortunately, for a query-based context-sensitive demand-driven analysis, this does not make too much sense.

For example, if we want to remove a value-flow permanently from SVFG, this value-flow has to be spurious under every calling context. Otherwise, simply removing it will cause unsound results.
However, validating a particular value-flow under all context is almost impossible for a demand-driven analysis since most of the time we just issue some but not exhaustively all queries for all pointers in a program.

Ideally, every value-flow should have a label recording, under which contexts, the value-flow is legitimate or spurious. Again, this is impractical as mentioned as we can't enumerate all possible queries of every pointer.

You may wish to just query a pointer's value to get the precise points-to results for answering a particular query. We believe our current way is a nice solution without constantly updating or invalidating SVFG.

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

No branches or pull requests

2 participants