Skip to content

Introduce value-set supported simplifier for goto-symex #8642

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

tautschnig
Copy link
Collaborator

Move try_evaluate_pointer_comparison to a simplifier that can eventually support more cases than just equalities in GOTO conditions. The initial change does not alter behaviour (except that previously try_evaluate_pointer_comparison was even used when simplification was disabled).

A side-effect is that we can also clean up renamedt.

  • Each commit message has a non-empty body, explaining why the change was made.
  • 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.

Copy link

codecov bot commented May 27, 2025

Codecov Report

Attention: Patch coverage is 97.14286% with 7 lines in your changes missing coverage. Please review.

Project coverage is 80.38%. Comparing base (3c915eb) to head (ac731d4).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/goto-symex/simplify_expr_with_value_set.cpp 97.95% 2 Missing ⚠️
src/goto-symex/symex_clean_expr.cpp 77.77% 2 Missing ⚠️
src/goto-symex/symex_dereference.cpp 75.00% 1 Missing ⚠️
src/goto-symex/symex_other.cpp 66.66% 1 Missing ⚠️
unit/goto-symex/symex_assign.cpp 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8642      +/-   ##
===========================================
+ Coverage    80.37%   80.38%   +0.01%     
===========================================
  Files         1686     1688       +2     
  Lines       206885   206931      +46     
  Branches        73       73              
===========================================
+ Hits        166276   166334      +58     
+ Misses       40609    40597      -12     

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

Move `try_evaluate_pointer_comparison` to a simplifier that can
eventually support more cases than just equalities in GOTO conditions.
The initial change does not alter behaviour (except that previously
`try_evaluate_pointer_comparison` was even used when simplification was
disabled).

A side-effect is that we can also clean up renamedt.
value-set based simplifications may be helpful well outside just GOTO
conditions.
When all candidates in the value set have the same offset we can replace
a pointer_offset expression by the offset value found in the value set.
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.

1 participant