3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-16 02:00:00 +00:00
Commit graph

21923 commits

Author SHA1 Message Date
Lev Nachmanson
b8d6952e9e Enable som (sum of monomials) in optimizer simplification
The optimizer's simplification pass did not expand products of sums
into sum-of-monomials form. This caused mathematically equivalent
expressions like (5-x)^2 vs (x-5)^2 to simplify into different
internal forms, where the former produced nested multiplies
(+ 5.0 (* -1.0 x)) that led to harder purification constraints
and solver timeouts.

Enabling som=true in the first simplification tactic normalizes
polynomial objectives into canonical monomial form, making the
optimizer robust to operand ordering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-11 18:28:40 -10:00
Lev Nachmanson
ce7c7f458e Add max_rev test: BNH with reversed argument order in f1/f2
Same as test_bnh_optimize but constructs f1 and f2 with reversed
parameter order in mk_add, mk_mul, mk_sub calls. Exposes optimizer
sensitivity to expression structure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-11 18:15:57 -10:00
Lev Nachmanson
274d64299e Address PR review: add ENSURE checks, fix duplicate test, fix comment
- Add ENSURE(result == Z3_L_TRUE) for each BNH optimization call and
  ENSURE(num_sat == 7) at the end so CI catches regressions.
- Remove test_bnh_optimize() from tst_api() to avoid duplicate
  execution under /a; keep standalone tst_bnh_opt() entry point.
- Fix Test 2 comment: it tests same-size backup, not backup-longer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-10 16:58:24 -10:00
Lev Nachmanson
6d890fb026 Fix NLA optimization regression and relax restore_x
- Relax restore_x() to handle backup/current size mismatches: when
  backup is shorter (new columns added), call
  move_non_basic_columns_to_bounds() to find a feasible solution.
- Fix 100x performance regression in nonlinear optimization: save LP
  optimum before check_nla and return it as bound regardless of NLA
  result, so opt_solver::check_bound() can validate via full re-solve
  with accumulated NLA lemmas.
- Refactor theory_lra::maximize() into three helpers: max_with_lp(),
  max_with_nl(), and max_result().
- Add mk_gt(theory_var, impq const&) overload for building blockers
  from saved LP optimum values.
- Add BNH multi-objective optimization test (7/7 sat in <1s vs 1/7
  in 30s before fix).
- Add restore_x test for backup size mismatch handling.

Fixes #8890

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-10 16:38:08 -10:00
Nikolaj Bjorner
bb11a56a67
Merge pull request #8918 from Z3Prover/copilot/code-simplification-march-2026
Simplify conditional logic in sls_euf_plugin.cpp and extract sign condition helper in realclosure.cpp
2026-03-10 10:03:22 -07:00
copilot-swe-agent[bot]
42eee12c2f Code simplifications in sls_euf_plugin.cpp and realclosure.cpp
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-10 16:17:24 +00:00
copilot-swe-agent[bot]
54c692622c Initial plan 2026-03-10 16:15:09 +00:00
Nikolaj Bjorner
1009b13acd
Merge pull request #8909 from angelica-moreira/memory-safety-pipeline
fix: pass GH_TOKEN to memory safety report workflow
2026-03-09 18:58:04 -07:00
Nikolaj Bjorner
2a784c6094
Merge pull request #8910 from Z3Prover/dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 4 to 6
2026-03-09 18:57:39 -07:00
Nikolaj Bjorner
0c84384d48
Merge pull request #8911 from Z3Prover/dependabot/github_actions/github/gh-aw-0.57.0
Bump github/gh-aw from 0.45.6 to 0.57.0
2026-03-09 18:57:29 -07:00
Nikolaj Bjorner
14e0492cce
Merge pull request #8912 from Z3Prover/dependabot/github_actions/actions/download-artifact-8
Bump actions/download-artifact from 4 to 8
2026-03-09 18:57:18 -07:00
Nikolaj Bjorner
9d8058be86
Merge pull request #8913 from Z3Prover/dependabot/github_actions/actions/cache-5.0.3
Bump actions/cache from 4.3.0 to 5.0.3
2026-03-09 18:57:05 -07:00
Nikolaj Bjorner
f9100f944e
Merge pull request #8914 from Z3Prover/dependabot/github_actions/actions/upload-artifact-7
Bump actions/upload-artifact from 4 to 7
2026-03-09 18:56:49 -07:00
dependabot[bot]
2f10db79b0
Bump actions/upload-artifact from 4 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:48:37 +00:00
dependabot[bot]
6805d0896d
Bump actions/cache from 4.3.0 to 5.0.3
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v4.3.0...v5.0.3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:48:06 +00:00
dependabot[bot]
d11206d3d4
Bump actions/download-artifact from 4 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:47:37 +00:00
dependabot[bot]
a53d63be85
Bump github/gh-aw from 0.45.6 to 0.57.0
Bumps [github/gh-aw](https://github.com/github/gh-aw) from 0.45.6 to 0.57.0.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Commits](https://github.com/github/gh-aw/compare/v0.45.6...v0.57.0)

---
updated-dependencies:
- dependency-name: github/gh-aw
  dependency-version: 0.57.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:47:13 +00:00
dependabot[bot]
d21231fc22
Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:44:52 +00:00
Angelica Moreira
1cba7cb5ee fix: pass GH_TOKEN to memory safety report workflow
The reporting workflow needs explicit GH_TOKEN env to download
artifacts from the triggering workflow run via gh CLI.
2026-03-09 21:49:22 +00:00
Lev Nachmanson
78fa6d5ee8 allow calling lp().restore_x() only in case the number of column in lp() remained the same: it might grow
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-03-09 10:51:31 -10:00
Nikolaj Bjorner
4e5695eb53
Merge pull request #8896 from Z3Prover/copilot/fix-jni-bindings-architecture
fix: JNI bindings respect target architecture during macOS cross-compilation
2026-03-09 13:44:33 -07:00
Nikolaj Bjorner
4b377ae713
Merge pull request #8898 from Z3Prover/copilot/address-actionable-issues-discussion
Fix actionable null pointer dereferences and uninitialized variables from static analysis
2026-03-09 10:45:47 -07:00
Nikolaj Bjorner
525c9dbb12
Merge pull request #8900 from Z3Prover/copilot/fix-memory-leak-detected
Fix memory leaks in test code detected by ASan/LSan
2026-03-09 10:44:12 -07:00
copilot-swe-agent[bot]
a6c94a1bfc Refactor sls_euf_plugin.cpp validate_model and add SASSERT in udoc_relation.cpp
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:57:59 +00:00
copilot-swe-agent[bot]
391febed3b Fix null pointer dereferences and uninitialized variables from discussion #8891
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:51:12 +00:00
copilot-swe-agent[bot]
7d19851c2f fix: fix memory leaks detected by ASan in test code
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:48:17 +00:00
copilot-swe-agent[bot]
e4b85d234e Initial plan 2026-03-09 16:44:45 +00:00
Nikolaj Bjorner
2e1f79e0d4
Merge pull request #8897 from Z3Prover/copilot/address-open-issues-except-rust
Go: add MkBVRotateLeft, MkBVRotateRight, MkRepeat to bitvec.go
2026-03-09 09:37:01 -07:00
Nikolaj Bjorner
56d15655a7 update report
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-09 09:34:33 -07:00
copilot-swe-agent[bot]
6a1aa797e2 test: add unit tests and CI validation for JNI architecture fix
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:28:12 +00:00
copilot-swe-agent[bot]
47e9c37fbb Go: Add MkBVRotateLeft, MkBVRotateRight, MkRepeat to bitvec.go
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:20:13 +00:00
copilot-swe-agent[bot]
9dcd01c52b Initial plan 2026-03-09 16:18:25 +00:00
copilot-swe-agent[bot]
0af49cdf10 Initial plan 2026-03-09 16:17:19 +00:00
copilot-swe-agent[bot]
ba0f276584 fix: use SLINK_EXTRA_FLAGS for JNI bindings to support macOS cross-compilation
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:15:57 +00:00
copilot-swe-agent[bot]
b90f1e3e28 Initial plan 2026-03-09 16:09:14 +00:00
Lev Nachmanson
8a146a92ec fix: replace UNREACHABLE with VERIFY for non-COI constraint/monic violations in nra_solver
The NRA solver's check() uses cone-of-influence (COI) to select a subset
of constraints for nlsat. When nlsat returns l_true, the model is validated
against all constraints, but non-COI constraints can legitimately be
violated since nlsat only solved over the COI subset.

- Non-COI violations gracefully return l_undef (fallback to other strategies)
- COI violations still trigger an assertion (indicating a real nlsat bug)

Fixes #8883

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 08:54:34 -10:00
Nikolaj Bjorner
84a7566c3a
Merge pull request #8878 from Z3Prover/copilot/rename-qf-s-benchmark
Rename "Qf S Benchmark" to "ZIPT Benchmark"
2026-03-05 16:26:26 -08:00
copilot-swe-agent[bot]
ea4ee11117 Rename Qf S Benchmark to ZIPT Benchmark in workflow files
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-06 00:05:35 +00:00
copilot-swe-agent[bot]
489b34a124 Initial plan 2026-03-06 00:02:10 +00:00
Nikolaj Bjorner
e8bfa10d29 test c3
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-05 16:00:55 -08:00
Nikolaj Bjorner
e9ee188747
Merge pull request #8874 from Z3Prover/copilot/remove-unreachable-return-statement-another-one
Remove unreachable `return false` in `match_ubv2s1`
2026-03-05 10:05:53 -08:00
copilot-swe-agent[bot]
822f19819c Remove unreachable return false in match_ubv2s1
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-05 17:59:50 +00:00
copilot-swe-agent[bot]
d89532a33d Initial plan 2026-03-05 17:58:32 +00:00
Nikolaj Bjorner
e7e116f2b2
Merge pull request #8869 from Z3Prover/copilot/any-branch-fix
Fix contradictory UBSan recovery flags in memory-safety workflow
2026-03-05 08:58:29 -08:00
copilot-swe-agent[bot]
71a4786371 Fix contradictory UBSan recovery flags in memory-safety.yml
Co-authored-by: levnach <5377127+levnach@users.noreply.github.com>
2026-03-05 16:14:27 +00:00
copilot-swe-agent[bot]
90af464af3 Initial plan 2026-03-05 16:10:48 +00:00
Nikolaj Bjorner
51ae6eeccc
Merge pull request #8856 from angelica-moreira/memory-safety-pipeline
Add ASan/UBSan memory safety CI workflow
2026-03-04 13:05:57 -08:00
Angelica Moreira
123bb620d4 Add ASan/UBSan memory safety CI workflow
Adds a workflow that builds and tests Z3 with AddressSanitizer and
UndefinedBehaviorSanitizer on every push to catch runtime memory errors
and undefined behavior. Runs unit tests, SMT-LIB2 benchmarks, and
regression tests under both sanitizers. Includes a Copilot agentic
workflow to generate summary reports as GitHub Discussions.

Triggered on push (path-filtered to src/) and manual dispatch.
2026-03-04 16:31:29 +00:00
Nikolaj Bjorner
d40c4721d8
Merge pull request #8838 from Z3Prover/copilot/fix-no-such-field-error
Fix NoSuchFieldError in Java JNI wrapper for BOOL OUT/INOUT parameters
2026-03-02 19:10:21 -08:00
Nikolaj Bjorner
9031089999 add zipt reviewer to master branch
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-02 16:51:52 -08:00