Skip to content

Value sets: handle extractbits out of pointers - #7339

Merged
tautschnig merged 2 commits into
diffblue:developfrom
tautschnig:feature/value-set-extractbits
Nov 19, 2022
Merged

tautschnig merged 2 commits into
diffblue:developfrom
tautschnig:feature/value-set-extractbits

Conversation

@tautschnig

Copy link
Copy Markdown
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

codecov Bot commented Nov 14, 2022 •

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

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
tautschnig force-pushed the feature/value-set-extractbits branch from 726ff62 to 3b8fa07 Compare November 14, 2022 09:33
@tautschnig

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Good call, I have now implemented this.

Can you now drop the code for extractbits?

@tautschnig

Copy link
Copy Markdown
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.)

@martin-cs martin-cs left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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