-
Notifications
You must be signed in to change notification settings - Fork 356
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
Boolean variables aliased to data-flow facts in type refinement #406
Comments
If this sort of data flow analysis is within the scope of this project, then shouldn't this be high priority? I get a lot of warnings in my project that can be boiled down to this issue. However, I don't know where to draw a line. The "halting problem" limits the amount of analysis that can be done at compile time. But atleast those code paths that don't involve a loop, goto or a recursive function call should be analysable, in theory. |
This enhancement request is definitely within scope. I don't see control flow as a challenge here; the dataflow analysis handles control flow well. I think this issue could be solved by enriching the abstract domains. Currently the dataflow analysis computes and propagates information about which expressions are null. It would need to be enhanced to also compute and propagate information about the relationship between the values of Boolean expressions and the nullness of expressions. That way, it would be able to refine the nullness of expressions such as I don't think this is conceptually difficult, but it isn't trivial either, and we are currently busy with a few other features. If you were willing to help out with this extension to the dataflow analysis, we would gratefully accept that. Thanks! |
… `AnnotatedTypes.adaptParameters` (typetools#406) Co-authored-by: Werner Dietl <[email protected]>
Above I suggested tracking the relationship between the values of Boolean expressions and the inferred/refined qualifiers on expressions. A simpler approach would be to track, for each boolean variable, an expression that it is equivalent to. Then, at an |
Original issue reported on code.google.com by
[email protected]
on 5 Mar 2015 at 3:44See more test cases in #6296.
The text was updated successfully, but these errors were encountered: