Skip to content

bv_pointerst: make all members return (optional) bvt #5831

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
Feb 16, 2021

Conversation

tautschnig
Copy link
Collaborator

Instead of having in-out non-const bvt references, return bvt by value
and rely on copy elision for performance. This simplifies the code in
that it avoids creating (and sometimes unnecessarily resizing) objects
that are then to be populated by a function.

For convert_address_of_rec use optionalt to remove the true/false
error reporting.

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

Instead of having in-out non-const bvt references, return bvt by value
and rely on copy elision for performance. This simplifies the code in
that it avoids creating (and sometimes unnecessarily resizing) objects
that are then to be populated by a function.

For convert_address_of_rec use optionalt<bvt> to remove the true/false
error reporting.
@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #5831 (2d88418) into develop (09251eb) will decrease coverage by 0.00%.
The diff coverage is 73.93%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5831      +/-   ##
===========================================
- Coverage    72.85%   72.84%   -0.01%     
===========================================
  Files         1423     1421       -2     
  Lines       154072   154138      +66     
===========================================
+ Hits        112244   112289      +45     
- Misses       41828    41849      +21     
Impacted Files Coverage Δ
src/solvers/flattening/boolbv_union.cpp 57.14% <0.00%> (ø)
src/solvers/flattening/boolbv_with.cpp 65.30% <0.00%> (ø)
src/solvers/flattening/boolbv.h 69.56% <50.00%> (-4.12%) ⬇️
src/solvers/flattening/bv_pointers.cpp 80.89% <73.94%> (-1.53%) ⬇️
src/solvers/flattening/boolbv_byte_extract.cpp 70.00% <100.00%> (ø)
src/solvers/flattening/boolbv_byte_update.cpp 100.00% <100.00%> (ø)
src/solvers/flattening/boolbv_width.cpp 76.69% <100.00%> (-0.23%) ⬇️
src/solvers/flattening/boolbv_width.h 100.00% <100.00%> (ø)
src/solvers/flattening/bv_pointers.h 100.00% <100.00%> (ø)
src/util/endianness_map.h 100.00% <0.00%> (ø)

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 2006bef...2d88418. Read the comment docs.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

Seems reasonable, although I wonder if we should go further and do this throughout the solver. I suspect doing so will break patches against it though.

@tautschnig tautschnig merged commit 27072c6 into diffblue:develop Feb 16, 2021
@tautschnig tautschnig deleted the bv_pointers-cleanup branch February 16, 2021 21:38
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.

2 participants