Skip to content

Restore conditional bounds-checking of count_{leading,trailing}_zeros #6708

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

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

tautschnig
Copy link
Collaborator

The cleanup of 4d4f9e7 (PR #6684) made bounds checking of these bit
count expressions unconditional. This did not affect any input coming
from the C front-end, but became apparent with the Rust front-end as
documented in model-checking/kani#886.

This commit restores conditional bounds checking, but now actually uses
the proper expression API rather than the low-level hack.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #6708 (9ec216c) into develop (6594cbb) will decrease coverage by 0.35%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6708      +/-   ##
===========================================
- Coverage    77.15%   76.79%   -0.36%     
===========================================
  Files         1582     1589       +7     
  Lines       182628   183488     +860     
===========================================
+ Hits        140900   140909       +9     
- Misses       41728    42579     +851     
Impacted Files Coverage Δ
jbmc/src/janalyzer/janalyzer_parse_options.cpp 48.74% <ø> (ø)
jbmc/src/jbmc/jbmc_parse_options.cpp 75.97% <ø> (ø)
jbmc/src/jdiff/jdiff_parse_options.cpp 67.34% <ø> (ø)
src/goto-diff/goto_diff_parse_options.h 100.00% <ø> (ø)
.../goto-instrument/goto_instrument_parse_options.cpp 69.39% <ø> (ø)
...rc/goto-instrument/goto_instrument_parse_options.h 100.00% <ø> (ø)
src/goto-programs/goto_check.cpp 81.39% <ø> (ø)
src/goto-programs/process_goto_program.cpp 100.00% <ø> (ø)
src/ansi-c/goto_check_c.cpp 91.61% <100.00%> (ø)
src/goto-checker/properties.cpp 80.53% <100.00%> (+0.35%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a31976...9ec216c. Read the comment docs.

The cleanup of 4d4f9e7 (PR diffblue#6684) made bounds checking of these bit
count expressions unconditional. This did not affect any input coming
from the C front-end, but became apparent with the Rust front-end as
documented in model-checking/kani#886.

This commit restores conditional bounds checking, but now actually uses
the proper expression API rather than the low-level hack.
@tautschnig tautschnig force-pushed the bugfixes/cltz-bounds-check branch from e334f8b to 9ec216c Compare March 8, 2022 12:00
@tautschnig tautschnig merged commit 0054d51 into diffblue:develop Mar 8, 2022
@tautschnig tautschnig deleted the bugfixes/cltz-bounds-check branch March 8, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants