Conversation
|
Can you run a quick experiment to quantify the improvement? Please take this version and one that doesn't add the |
| @@ -1,14 +1,8 @@ | |||
| Failed Checks: arithmetic overflow on signed addition | |||
| Failed Checks: arithmetic overflow on signed subtraction | |||
| Failed Checks: arithmetic overflow on signed multiplication | |||
| Failed Checks: division by zero | |||
There was a problem hiding this comment.
This is pointed out in the call-outs: specifying any additional checks to the CBMC command (e.g. --signed-overflow-check) may become a no-op since the slicer potentially removes code checked by that particular check.
Ran some experiments, and the improvement is mostly marginal:
|
|
Attempted to re-do the std library linking experiment using the following steps:
but ran into a bunch of issue:
|
adpaco-aws
left a comment
There was a problem hiding this comment.
I'm fine with moving the arguments to goto-instrument, which appears to be something we should've done anyway. Considering these result, do you still want to keep the slicing step?
| // CBMC's slicer errors out if the program is empty: | ||
| // https://github.com/diffblue/cbmc/issues/6882 | ||
| // so for now, ignore the exit status from the command | ||
| let _ = self.slice(output); |
There was a problem hiding this comment.
Why not exit gracefully if it errors out?
|
As discussed above, we did not find a compelling case for enabling CBMC's |
Description of changes:
Enable CBMC's slicer (
--reachability-slice) to remove code that does not impact any of the checks from the goto binary. This change required moving all the check options (e.g.--bounds-check,--pointer-check, etc.) from thecbmcstep togoto-instrumentto make sure they're injected into the goto binary before the slicer is applied (see discussion here).Resolved issues:
Resolves #683
Should help with standard library linking (e.g. #576)
Call-outs:
This change breaks Kani's
--cbmc-argsoption even further: specifying any check options, e.g.--signed-overflow-checkmay not have an impact since they will be applied after the possible removal of code relevant to those checks by the slicer.Testing:
How is this change tested? Current regressions
Is this a refactor change? No
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.