-
Notifications
You must be signed in to change notification settings - Fork 142
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
IDE Solver Strategy #669
base: development
Are you sure you want to change the base?
IDE Solver Strategy #669
Conversation
Hi @fabianbs96, I have an issue with the PropagateOnto strategy. The analyzed code is
The IR file is
The dumped results of using PropagateOver strategy is
Everything is OK up to now.
As shown above, the last two instructions after calling the function have no dataflow facts. |
Hi @yuffon, I have debugged your issue. There was indeed a bug in the PropagateOntoStrategy implementation. Can you check, whether the current version works?
Besides that, it is not a good idea to skip fact-mapping in the call-flow-function and in the ret-flow-function. This way you will not get context-sensitive results at the end |
It works on my problem now.
Great.
Thanks.
At 2023-12-14 02:34:19, "Fabian Schiebel" ***@***.***> wrote:
Hi @yuffon,
I have debugged your issue. There was indeed a bug in the PropagateOntoStrategy implementation. Can you check, whether the current version works?
In fact, I use identity flow function for all return edges.
Besides that, it is not a good idea to skip fact-mapping in the call-flow-function and in the ret-flow-function. This way wou will not get context-sensitive results at the end
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi Fabian, My backward dataflow analysis is a specialized typestate analysis. Flow functions are as follows. call-to-return: killall function The program structure is like the following.
I have checked the dataflow results. At |
Currently, the IDESolver propagates data-flow information to the successor instruction of the current instruction.
While this makes the implementation easier, for users this is sometimes unintuitive, mostly because the Dragonbook defines data-flow propagations differently: The effects of an instruction to the data flows should be visible at that same instruction already.
In addition, some information at branching statements may have already been merged with the current approach; therefore, it may not always be possible to determine the origin basicblock of a particular data-flow fact (see LLVM's
invoke
instruction).This PR addresses above issues by adding the following contributions:
IDESolver
that propagates onto the current statement instead of propagating to the successors.SolverStrategy
that allows to switch between both IDE solver versions via tag-dispatch.IDESolverImpl