Skip to content

Simplify byte extract: support signed and unsigned offsets #7705

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

Conversation

tautschnig
Copy link
Collaborator

The minimized example from #7357 resulted in an invariant failure in solvers/flattening/boolbv_add_sub.cpp, reporting "add/sub with mixed types." This was caused by simplifying nested byte-extract operations where one used unsigned offsets and the other one signed. Since we do not required a particular type for byte-extract offsets we must cope with different offset types when folding nested byte-extract operations into a single one.

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

The minimized example from diffblue#7357 resulted in an invariant failure in
`solvers/flattening/boolbv_add_sub.cpp`, reporting "add/sub with mixed
types." This was caused by simplifying nested byte-extract operations
where one used unsigned offsets and the other one signed. Since we do
not required a particular type for byte-extract offsets we must cope
with different offset types when folding nested byte-extract operations
into a single one.
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.17 🎉

Comparison is base (e7787ad) 78.33% compared to head (9df171e) 78.50%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7705      +/-   ##
===========================================
+ Coverage    78.33%   78.50%   +0.17%     
===========================================
  Files         1674     1674              
  Lines       191956   191958       +2     
===========================================
+ Hits        150360   150702     +342     
+ Misses       41596    41256     -340     
Impacted Files Coverage Δ
src/util/simplify_expr.cpp 85.51% <100.00%> (+0.01%) ⬆️

... and 24 files with indirect coverage changes

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

@feliperodri feliperodri added the aws Bugs or features of importance to AWS CBMC users label May 12, 2023
@tautschnig tautschnig merged commit 7ac1554 into diffblue:develop May 19, 2023
@tautschnig tautschnig deleted the bugfixes/byte-extract-typing branch May 19, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants