Skip to content

Add invariant that multiplication uses operands of the same size #8241

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
Apr 20, 2024

Conversation

tautschnig
Copy link
Collaborator

Our implementations swap operands, and determine the size of the result from the size of the operand(s). Make sure we produce consistent-width results.

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

Our implementations swap operands, and determine the size of the result
from the size of the operand(s). Make sure we produce consistent-width
results.
@kroening
Copy link
Member

That precondition is already in bv_utilst::unsigned_multiplier_no_overflow; I suppose we could add it to the other entry points to get an early error.

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.67%. Comparing base (a8861ed) to head (f0b0aa2).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8241      +/-   ##
===========================================
- Coverage    79.67%   79.67%   -0.01%     
===========================================
  Files         1682     1682              
  Lines       195490   195491       +1     
===========================================
- Hits        155765   155750      -15     
- Misses       39725    39741      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kroening kroening merged commit e8ebba3 into diffblue:develop Apr 20, 2024
@tautschnig tautschnig deleted the cleanup/multiplier-invariant branch April 22, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants