Skip to content

Conversation

@kroening
Copy link
Collaborator

This adds support for typecast expressions that cast to the type of the operand to the SMT2 converter.

  • 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).
  • 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 adds support for typecast expressions that cast to the type of the
operand to the SMT2 converter.
@kroening kroening force-pushed the smt2-identity-typecast branch from aaed2bb to a6997dd Compare January 21, 2026 18:16
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine and should be supported for sure, but why are we running into this at all? The simplifier should have gotten rid of this, so I suppose there is code that never sees the simplifier.

@kroening
Copy link
Collaborator Author

Seems fine and should be supported for sure, but why are we running into this at all? The simplifier should have gotten rid of this, so I suppose there is code that never sees the simplifier.

Yes, we never made an effort to ensure that only simplified expressions are given to solvers.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.00%. Comparing base (05c2649) to head (a6997dd).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8828   +/-   ##
========================================
  Coverage    80.00%   80.00%           
========================================
  Files         1700     1700           
  Lines       188332   188335    +3     
  Branches        73       73           
========================================
+ Hits        150679   150685    +6     
+ Misses       37653    37650    -3     

☔ 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

Yes, we never made an effort to ensure that only simplified expressions are given to solvers.

I don't think that should be a requirement either, but it may point to a missed opportunity to use the simplifier.

@kroening kroening merged commit 36570bf into develop Jan 21, 2026
41 of 42 checks passed
@kroening kroening deleted the smt2-identity-typecast branch January 22, 2026 00:27
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