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

Add function parameters to data flow analysis. #121

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cgyurgyik
Copy link
Contributor

Addresses #120 .

@sampsyo
Copy link
Owner

sampsyo commented Jan 13, 2021

Seems possibly reasonable to literally generate "fake" code for the hallucinated block… but it could be even simpler, I imagine to instead do it as part of the algorithm? The tricky thing, I think, is that it might require a new "hook" into the DF framework, i.e., different analyses may want to treat argument differently. For example, an interval analysis will want to treat the parameters as unknown values. I'll stare at it sometime too!

@cgyurgyik
Copy link
Contributor Author

cgyurgyik commented Jan 13, 2021

Seems possibly reasonable to literally generate "fake" code for the hallucinated block… but it could be even simpler, I imagine to instead do it as part of the algorithm? The tricky thing, I think, is that it might require a new "hook" into the DF framework, i.e., different analyses may want to treat argument differently. For example, an interval analysis will want to treat the parameters as unknown values. I'll stare at it sometime too!

Yeah I was a bit narrow-minded when writing this (also, trying to keep the PR as small as possible), thinking only about a few DF algorithms such as reaching definitions and "defined" analysis.

One thing to note is that the analysis's init value is determined with no consideration for the bril program, which isn't always the case? For example, how would one cleanly implement alias analysis with the current framework, where we want to have mapping from each variable to the empty set for init. Perhaps there's something I'm missing here.

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

Successfully merging this pull request may close these issues.

2 participants