Skip to content

bv_pointert cleanup #6830

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 3 commits into from
Apr 26, 2022
Merged

bv_pointert cleanup #6830

merged 3 commits into from
Apr 26, 2022

Conversation

kroening
Copy link
Member

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

This commit moves three methods that have (relatively) large bodies from the
header file into the .cpp file.
There is no need for a pointer-aware bv_width class, as pointers are
bitvector types (including a width) since 2016.
This removes various obvious declarators from method declarations in
bv_pointerst.
@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #6830 (3c74995) into develop (cd4139b) will increase coverage by 0.01%.
The diff coverage is 79.60%.

@@             Coverage Diff             @@
##           develop    #6830      +/-   ##
===========================================
+ Coverage    77.01%   77.02%   +0.01%     
===========================================
  Files         1594     1594              
  Lines       184954   184991      +37     
===========================================
+ Hits        142438   142490      +52     
+ Misses       42516    42501      -15     
Impacted Files Coverage Δ
src/goto-instrument/contracts/contracts.h 100.00% <ø> (ø)
...nstrument/contracts/havoc_assigns_clause_targets.h 100.00% <ø> (ø)
src/solvers/flattening/bv_pointers.h 100.00% <ø> (ø)
src/util/pointer_expr.h 87.83% <ø> (ø)
src/util/replace_symbol.h 100.00% <ø> (ø)
src/goto-instrument/contracts/utils.h 83.92% <70.00%> (+0.90%) ⬆️
src/goto-instrument/horn_encoding.cpp 72.27% <72.22%> (ø)
src/ansi-c/c_typecheck_code.cpp 80.03% <90.90%> (+0.11%) ⬆️
src/util/replace_symbol.cpp 88.29% <91.30%> (ø)
src/solvers/flattening/bv_pointers.cpp 85.25% <93.10%> (+2.15%) ⬆️
... and 23 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 2110147...3c74995. Read the comment docs.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the first and third commit, but the middle one part reverts work that I previously did. Having a clean revert would be more helpful.

@@ -68,58 +68,33 @@ void bv_endianness_mapt::build_big_endian(const typet &src)
endianness_mapt
bv_pointerst::endianness_map(const typet &type, bool little_endian) const
{
return bv_endianness_mapt{type, little_endian, ns, bv_pointers_width};
return bv_endianness_mapt{type, little_endian, ns, bv_width};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That second commit is a part-revert of 5cf2b07. If we go for removing the capability that the commit was trying to add we should ponder a clean revert instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We absolutely want to keep the parts of that commit that pass the pointer type around!

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with the caveat that I may propose to revert the middle commit at a future date.

@tautschnig tautschnig merged commit d7e8c4d into develop Apr 26, 2022
@tautschnig tautschnig deleted the bv_pointert_cleanup branch April 26, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants