-
Notifications
You must be signed in to change notification settings - Fork 277
Fix havocing of arrays when enforcing invariants #6026
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
Fix havocing of arrays when enforcing invariants #6026
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6026 +/- ##
===========================================
+ Coverage 74.11% 74.12% +0.01%
===========================================
Files 1444 1444
Lines 157389 157401 +12
===========================================
+ Hits 116646 116676 +30
+ Misses 40743 40725 -18
Continue to review full report at Codecov.
|
@SaswatPadhi Please update |
regression/contracts/invar_havoc_dynamic_multi-dim_array_partial_const_idx/test.desc
Show resolved
Hide resolved
2a67069
to
b5ad550
Compare
As reported in diffblue#6020, only the first element of an array was being havoced earlier. In this change, we fix this behavior using `havoc_object`.
These regression tests currently fail due to imprecision in alias analysis (see: diffblue#6021). In future, we could either improve the alias analysis, or add manual assigns clause annotations on these loops and make sure that the arrays are correctly havoced.
b5ad550
to
9c7f6f7
Compare
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, and happy for it to go in - just a minor query about naming, which you can feel free to ignore if it gets too complicated.
Fixes #6020.
As reported in #6020, only the first element of an array was being havoced earlier. In this change, we fix this behavior using
havoc_object
.The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/My commit message includes data points confirming performance improvements (if claimed).White-space or formatting changes outside the feature-related changed lines are in commits of their own.