Skip to content

Conversation

@kroening
Copy link
Collaborator

@kroening kroening commented Dec 1, 2025

This converts unary bitand, bitor, bitxor bit-vector expressions as the identity in the SMT2 backend.

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

This converts unary bitand, bitor, bitxor bit-vector expressions as the
identity in the SMT2 backend.
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.94%. Comparing base (56d8598) to head (fafc39c).
⚠️ Report is 15 commits behind head on develop.

Files with missing lines Patch % Lines
src/solvers/smt2/smt2_conv.cpp 80.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8794      +/-   ##
===========================================
+ Coverage    79.93%   79.94%   +0.01%     
===========================================
  Files         1698     1699       +1     
  Lines       187698   187785      +87     
  Branches        73       73              
===========================================
+ Hits        150037   150133      +96     
+ Misses       37661    37652       -9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tautschnig
Copy link
Collaborator

Why do we even produce such expressions? I acknowledge that the propositional back-end support this, but shouldn't we instead change the code that attempts to produce those single-operand expressions?

@kroening
Copy link
Collaborator Author

kroening commented Dec 2, 2025

Why do we even produce such expressions? I acknowledge that the propositional back-end support this, but shouldn't we instead change the code that attempts to produce those single-operand expressions?

I considered it -- and went for supporting the unary ones. The idea is that you'd need to handle special cases in a lot of cases where these are produced, as opposed to fairly easy handling in few the places where they are consumed.

@kroening kroening merged commit 74d15ae into develop Dec 3, 2025
42 checks passed
@kroening kroening deleted the smt2-unary-bitwise branch December 3, 2025 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants