Skip to content

Remove ID_C_bounds_check special-case in goto_check_ct #6684

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

Conversation

tautschnig
Copy link
Collaborator

This is never used in the Java front-end, and the C front-end can safely
use the pragma-based approach that is more general.

  • 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.

@kroening kroening removed their assignment Feb 19, 2022
@codecov
Copy link

codecov bot commented Feb 19, 2022

Codecov Report

Merging #6684 (e730633) into develop (1154f13) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

❗ Current head e730633 differs from pull request most recent head 4d4f9e7. Consider uploading reports for the commit 4d4f9e7 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6684      +/-   ##
===========================================
- Coverage    76.92%   76.82%   -0.11%     
===========================================
  Files         1583     1582       -1     
  Lines       183314   182760     -554     
===========================================
- Hits        141018   140407     -611     
- Misses       42296    42353      +57     
Impacted Files Coverage Δ
jbmc/src/java_bytecode/goto_check_java.cpp 32.40% <ø> (+0.14%) ⬆️
src/analyses/goto_check_c.cpp 90.78% <ø> (-0.83%) ⬇️
src/goto-programs/string_abstraction.cpp 92.45% <ø> (-0.01%) ⬇️
src/ansi-c/ansi_c_entry_point.cpp 89.02% <100.00%> (ø)
src/solvers/smt2_incremental/smt_sorts.def 50.00% <0.00%> (-50.00%) ⬇️
...c/solvers/smt2_incremental/convert_expr_to_smt.cpp 52.67% <0.00%> (-12.69%) ⬇️
src/solvers/flattening/boolbv_constant.cpp 32.85% <0.00%> (-3.81%) ⬇️
jbmc/src/jbmc/jbmc_parse_options.cpp 72.46% <0.00%> (-3.57%) ⬇️
unit/testing-utils/get_goto_model_from_c.cpp 87.17% <0.00%> (-2.30%) ⬇️
src/util/pointer_expr.h 78.77% <0.00%> (-1.75%) ⬇️
... and 35 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 2aa8eaf...4d4f9e7. Read the comment docs.

@tautschnig tautschnig force-pushed the cleanup/pragma-instead-of-C_bounds_check branch from e730633 to a49b771 Compare February 28, 2022 10:03
The C front-end can safely use the pragma-based approach that is more
general.
@tautschnig tautschnig force-pushed the cleanup/pragma-instead-of-C_bounds_check branch from a49b771 to 4d4f9e7 Compare February 28, 2022 10:06
@tautschnig tautschnig changed the title Remove ID_C_bounds_check special-case in goto_check_{c,java}t Remove ID_C_bounds_check special-case in goto_check_ct Feb 28, 2022
@tautschnig tautschnig merged commit 412d040 into diffblue:develop Feb 28, 2022
@tautschnig tautschnig deleted the cleanup/pragma-instead-of-C_bounds_check branch February 28, 2022 11:10
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Mar 4, 2022
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 added a commit to tautschnig/cbmc that referenced this pull request Mar 8, 2022
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.
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.

4 participants