Skip to content

Add abortUnless analysis#875

Merged
michael-schwarz merged 9 commits intomasterfrom
issue_873
Nov 3, 2022
Merged

Add abortUnless analysis#875
michael-schwarz merged 9 commits intomasterfrom
issue_873

Conversation

@michael-schwarz
Copy link
Copy Markdown
Member

@michael-schwarz michael-schwarz commented Oct 31, 2022

Adds an analysis that detects if control flow only returns if the argument is non-zero, and issues a corresponding assert event.

TODO:

  • Exploit in more analyses
  • Test

Closes #873

@michael-schwarz
Copy link
Copy Markdown
Member Author

There are no other analysis where adding it would make sense (except maybe vareq, but that doesn't even exploit branch at all currently).
Adding this analysis to the set of default analyses does not cause any regressions.

@michael-schwarz
Copy link
Copy Markdown
Member Author

Unless anyone opposes, I would propose we do a joint sv-comp run of this & #869 to reduce the number of needed runs, as we currently have a lot of things we would need server time for.

Comment thread src/analyses/apron/apronAnalysis.apron.ml Outdated
Comment thread src/analyses/base.ml Outdated
Comment thread src/analyses/abortUnless.ml Outdated
Comment thread src/analyses/abortUnless.ml
Comment thread src/analyses/abortUnless.ml
@michael-schwarz
Copy link
Copy Markdown
Member Author

For sv-comp this analysis currently does not seem to pay off, so I would not include it in the config this year (unless I can come up with a more powerful analysis where we would benefit).
I would still propose to merge it, it does not add much code and might be handy.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for void assume_abort_if_not(int cond) { if(!cond) {abort();} }

2 participants