Skip to content
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

Value sets: handle extractbits out of pointers #7339

Merged
merged 2 commits into from
Nov 19, 2022

Conversation

tautschnig
Copy link
Collaborator

Tracking will not be precise, but we should not lose pointers that are split up via extractbits and later on pieced together.

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

@tautschnig tautschnig added the Kani Bugs or features of importance to Kani Rust Verifier label Nov 13, 2022
@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Base: 78.28% // Head: 78.28% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (3b8fa07) compared to base (d7dd40a).
Patch coverage: 89.28% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7339   +/-   ##
========================================
  Coverage    78.28%   78.28%           
========================================
  Files         1642     1642           
  Lines       189995   190038   +43     
========================================
+ Hits        148737   148778   +41     
- Misses       41258    41260    +2     
Impacted Files Coverage Δ
src/solvers/flattening/boolbv_byte_extract.cpp 69.73% <ø> (ø)
src/solvers/flattening/boolbv_byte_update.cpp 100.00% <ø> (ø)
src/solvers/flattening/boolbv_equality.cpp 63.63% <ø> (ø)
src/solvers/flattening/boolbv_index.cpp 72.91% <ø> (ø)
...ncremental/smt2_incremental_decision_procedure.cpp 96.81% <ø> (ø)
src/util/byte_operators.h 92.72% <ø> (ø)
src/cprover/propagate.cpp 65.85% <16.66%> (-8.44%) ⬇️
src/pointer-analysis/value_set.cpp 82.50% <68.42%> (-0.39%) ⬇️
src/util/lower_byte_operators.cpp 92.70% <95.50%> (ø)
src/solvers/smt2/smt2_conv.cpp 66.79% <100.00%> (+0.40%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kroening
Copy link
Member

Does it make sense to try to make this the default for any expression?

Tracking will not be precise, but we should not lose pointers that are
split up via extractbits. Piecing together via concatenation will be
handled in a separate commit.
We must not lose information when seeing expressions we don't have a
specific case for. An example of such an expression is concatenation.
@tautschnig
Copy link
Collaborator Author

Does it make sense to try to make this the default for any expression?

Good call, I have now implemented this.

@kroening
Copy link
Member

Good call, I have now implemented this.

Can you now drop the code for extractbits?

@tautschnig
Copy link
Collaborator Author

Good call, I have now implemented this.

Can you now drop the code for extractbits?

I thought we might want to avoid the integer bounds to be treated as (possible pointers), but maybe we want to get more lenient here? (And if so, we'll probably want to get rid of several of the existing cases.)

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.

This is one of those "glad I didn't have to do it" PRs. Thanks. Would you be willing to add a test case because if this breaks I would like to find out on commit rather than trying to debug it.

@tautschnig
Copy link
Collaborator Author

This is one of those "glad I didn't have to do it" PRs. Thanks. Would you be willing to add a test case because if this breaks I would like to find out on commit rather than trying to debug it.

There will be ample testing once #7340 is in place.

@tautschnig tautschnig merged commit 1cb7776 into diffblue:develop Nov 19, 2022
@tautschnig tautschnig deleted the feature/value-set-extractbits branch November 19, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Kani Bugs or features of importance to Kani Rust Verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants