-
Notifications
You must be signed in to change notification settings - Fork 264
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
Built-in checks can optionally be fatal #8242
Built-in checks can optionally be fatal #8242
Conversation
With a new option --assert-then-assume each built-in check (assertion) is followed by an assumption. For Kani, this will enable more consistent behaviour, and it may give us an additional way to produce "fatal assertions" as proposed in diffblue#8226.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8242 +/- ##
========================================
Coverage 79.66% 79.66%
========================================
Files 1682 1682
Lines 195544 195547 +3
========================================
+ Hits 155771 155776 +5
+ Misses 39773 39771 -2 ☔ View full report in Codecov by Sentry. |
I strongly advise against this. As mentioned in the comments to #8226, this is a significant soundness risk, and I'd much rather like to work towards soundness. |
What if this option flips all passing assertions to undetermined? One of the reasons we decided to follow this design opposed to what is proposed in #8226 in Kani is to reduce the amount of noise that a failing assertion can cause. The idea is to fail fast to help the user to debug their code. |
If the goal is to reduce noise from downstream assertions that are failing, I'd recommend making those "undetermined" via the mechanism in #8226. The reason why I didn't is subtle, and as follows. You can have two assertions that are downstream of each other. The problem is then that it's arbitrary which one you mark as failing, and which one you mark as undetermined. |
BTW, I was wrong, we haven't actually implemented this yet in Kani, and only in a few cases, but not UB, we modify the status of a passing assertion. So this issue was a good reminder for us to do that. :)
Totally. In that case you would have to inspect the trace to know which one failed first. |
I am considering this. |
On this PR self: please also remember that the assertions that we generate can't be assumed; they use nondeterminism. As a consequence, you may still receive counterexamples that are spurious. |
Closing given points raised in the discussion in here. |
With a new option --assert-then-assume each built-in check (assertion) is followed by an assumption. For Kani, this will enable more consistent behaviour, and it may give us an additional way to produce "fatal assertions" as proposed in #8226.