Connect let-bound arrays to originals in array theory#8942
Connect let-bound arrays to originals in array theory#8942tautschnig merged 1 commit intodiffblue:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes missing propagation in the unbounded-array theory when arrays are introduced via let bindings, by explicitly connecting the fresh let-bound array symbol to the original array expression so array constraints (Ackermann + extensional equality) propagate correctly in smt2_solver.
Changes:
- In
boolbvt::convert_let, record and assert an array equality between fresh let-bound symbols and their bound values for unbounded array types. - Add a new
smt2_solverregression test descriptor for let-bound arrays.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/solvers/flattening/boolbv_let.cpp |
Records/asserts array equalities for unbounded array let-bindings to connect union-find classes in array theory. |
regression/smt2_solver/let-array/let-array.desc |
Adds a regression descriptor intended to check the corrected let/array-theory interaction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
771b119 to
7a23bee
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8942 +/- ##
========================================
Coverage 80.47% 80.47%
========================================
Files 1704 1704
Lines 188749 188762 +13
Branches 73 73
========================================
+ Hits 151892 151905 +13
Misses 36857 36857 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
da1e918 to
45b1cb3
Compare
When a let expression binds a variable to an array value, the fresh symbol and the original array are disconnected in the array theory's union-find. This means Ackermann constraints and element-wise equality constraints don't propagate between them, causing spurious counterexamples in smt2_solver. Fix: in convert_let, for array-typed bindings with unbounded array type, create an element-wise equality between the fresh variable and the bound value, and assert it as true. This connects the two representations so the array theory generates proper constraints. Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
45b1cb3 to
14105d5
Compare
When a let expression binds a variable to an array value, the fresh symbol and the original array are disconnected in the array theory's union-find. This means Ackermann constraints and element-wise equality constraints don't propagate between them, causing spurious counterexamples in smt2_solver.
Fix: in convert_let, for array-typed bindings with unbounded array type, call record_array_equality to create an element-wise equality between the fresh variable and the bound value, and assert it as true. This connects the two representations so the array theory generates proper constraints.