Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/04321ea7-2a53-4ed5-9f43-816dc6f7476b Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
4 KiB
nseq Solver Issues — Ostrich Benchmark Analysis
This directory contains GitHub issue drafts for the nseq solver based on analysis of
the Ostrich benchmark suite run on the c3 branch (Z3 v4.17.0, commit 8ef491e).
Source: https://github.com/Z3Prover/z3/discussions/9071
Branch: c3
Benchmark set: Ostrich (349 files), 5s timeout
Date: 2026-03-21
Summary of Results
| Solver | sat | unsat | unknown | timeout | bug/crash |
|---|---|---|---|---|---|
| seq | 242 | 75 | 28 | 0 | 4 |
| nseq | 245 | 66 | 11 | 0 | 27 |
- 22 soundness disagreements between seq and nseq (nseq returns sat where seq returns unsat in 11 cases)
- 27 nseq crashes (vs 4 for seq, all on the same 4 parse-ecma files)
- 5+ performance regressions (nseq timeout where seq solves in <30ms)
Issue Files
Soundness Bugs (Highest Priority)
-
01-soundness-replace-empty-string.md
str.replacewith empty input returns sat instead of unsat.
Affects:replace-special.smt2,replace-special-4.smt2,replace-special-5.smt2,simple-replace-4b.smt2 -
02-soundness-contains-monotonicity.md
str.containsnot preserved through concatenation (y ++ y).
Affects:contains-4.smt2 -
03-soundness-indexof-regex.md
str.indexofunsound when combined with regex membership constraints.
Affects:indexof_const_index_unsat.smt2,indexof_var_unsat.smt2 -
04-soundness-prefix-suffix.md
str.prefixof/str.suffixofinteraction not fully axiomatized.
Affects:prefix-suffix.smt2,failedProp.smt2,failedProp2.smt2 -
05-soundness-conflicting-regex.md
Conflicting regex memberships not detected (disjoint character sets).
Affects:norn-benchmark-9f.smt2
Crashes (Medium Priority)
-
06-crash-non-greedy-quantifiers.md
Non-greedy regex quantifiers (re.+?,re.*?) cause crash.
Affects:non-greedy-quantifiers.smt2 -
07-crash-str-lt-le-axioms.md
str.<andstr.<=axiom handling failures.
Affects:str-leq11.smt2,str-leq12.smt2,str-leq13.smt2,str-lt.smt2,str-lt2.smt2 -
08-crash-str-at-substr-from-to-int.md
Crashes onstr.at,str.substr,str.from_int,str.to_intin complex formulas.
Affects:str.at.smt2,str.at-2.smt2,str.from_int_6.smt2,str.to_int_5.smt2,str.to_int_6.smt2,substring.smt2,substring2.smt2,substring2b.smt2,is-digit-2.smt2 -
09-crash-word-equation-regex.md
Various crashes on word equation + regex benchmarks.
Affects:concat-001.smt2,contains-1.smt2,contains-7.smt2,nonlinear-2.smt2,noodles-unsat8.smt2,noodles-unsat10.smt2,norn-benchmark-9i.smt2,pcp-1.smt2
Performance Regressions (Lower Priority)
- 10-performance-regression-regex-word-equation.md
nseq times out on regex + word equation benchmarks where seq is fast.
Affects:concat-regex.smt2,concat-regex3.smt2,loop.smt2,simple-concat-4.smt2,all-quantifiers.smt2
Quick-Win Fixes
The following issues have clear, localized fixes:
-
Non-greedy quantifiers (issue 06): Add rewrite rules to normalize
re.+?→re.+,re.*?→re.*inseq_rewriter.cpp. -
Boolean-equality pattern for contains (issue 09,
contains-1.smt2): Inassign_eh, handle the pattern(= (str.contains ...) true/false)by extracting the inner predicate. -
Conflicting regex character sets (issue 05): Improve the Parikh pre-check or add a character-set intersection check for multiple membership constraints on the same variable.