3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-15 11:35:42 +00:00
z3/src/muz
Copilot 4862a10ffd
Spacer QE: avoid assertion on extended arithmetic model values and add #3845 regression (#10096)
Spacer crashed in quantifier-elimination projection on certain HORN
inputs when model evaluation produced arithmetic expressions that were
not plain numerals. The failure was an assertion in
`spacer_qe_project.cpp` during sign/offset computation for projected
literals.

- **Projection robustness in Spacer arithmetic QE**
- Updated numeral extraction in `src/muz/spacer/spacer_qe_project.cpp`
from `is_numeral` to `is_extended_numeral` at all model-evaluation sites
used by projection.
- This covers evaluated arithmetic forms (e.g., normalized arithmetic
expressions) that are semantically numeric but not syntactic numerals,
preventing assertion failures in disequality/equality handling and bound
selection.

- **Regression coverage for the crashing HORN shape**
- Added a focused regression in `src/test/api_datalog.cpp` that
evaluates the reported Spacer/HORN input pattern through
`Z3_eval_smtlib2_string`.
- The test exercises the exact QE/projection path that previously
triggered the assertion.

```cpp
// Before
VERIFY(a.is_numeral(val, r));

// After
VERIFY(a.is_extended_numeral(val, r));
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-07-12 18:52:44 -07:00
..
base Fix segfault in horn on formulas with unused quantified variables (#6… (#10091) 2026-07-11 19:17:18 -07:00
bmc Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
clp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
dataflow Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
ddnf Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
fp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
rel Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
spacer Spacer QE: avoid assertion on extended arithmetic model values and add #3845 regression (#10096) 2026-07-12 18:52:44 -07:00
tab Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
transforms Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
README Setting up the lackr branch. 2015-12-16 20:10:14 +00:00

muZ: routines related to solving satisfiability of Horn clauses and 
solving Datalog programs.

- base - contains base routines and the main context for
         maintaining fixedpoint solvers
- transforms - common rule transformations
- rel - relational algebra based Datalog engine
- pdr - PDR based Horn clause solver
- clp - Dart/Symbolic execution-based solver
- tab - Tabulation based solver
- bmc - Bounded model checking based solver
- fp  - main exported routines