-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make code generation more compliant with Frama-C. #3
Make code generation more compliant with Frama-C. #3
Conversation
lambdaxdotx
commented
Nov 20, 2020
- Use Frama-C project to enable analysis chaining.
- Register globals in Frama-C tables.
- Compute CFG for the generated function.
- Use pointer arithmetic for array in loop since type is TPtr.
- Use Frama-C project to enable analysis chaining. - Register globals in Frama-C tables. - Compute CFG for the generated function. - Use pointer arithmetic for array in loop since type is TPtr.
I admit this is a more controversial PR than the previous ones. Indeed, you may not want to ensure Frama-C compliance wrt the generated AST since This PR makes the AST more correct in that sense, and allows analysis chaining w/o apparent problems. Well, to be fair, computing the CFG for the generated function makes appear an undesired/useless statement of the form In the case you are interested in this PR in general, but are annoyed by the problems it raises, I could try to make the changes needed more by Frama-C than Let me know if you need more details about the code changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'm happy to have better compatibility with Frama-C.
It looks like the spurious break labels are introduced by CFG.prepareCFG
. In my opinion it would be better if these weren't generated for loops that have no break
s, but I don't really mind.
I agree, having such spurious labels is not perfect. For sure, they are introduced by Anyway, I could open an issue to record such problem for the future once this PR gets merged. |
I think the core issue is in
Please do. |