3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-23 00:50:29 +00:00
Commit graph

22322 commits

Author SHA1 Message Date
Ilana Shapiro
c798213d87 restore invalid atom case: Path atoms now get rejected in the retry loop and removed from the candidate pool, same as global backbone/negation rejections. 2026-06-20 22:08:58 -07:00
Ilana Shapiro
868b5eeaa7 some bugfixes: Avoid updating max_conflicts through params in the parallel tactic path. Expose direct conflict-limit setters on solver wrappers and use them for SMT and incremental SAT solvers. Also restore single-candidate non-lookahead cube selection to match the parallel split heuristic, specifically do the filtering for invalid atoms during split atom selection. this requires new params so we have a separate get_split_atoms function for now. 2026-06-20 22:06:00 -07:00
Ilana Shapiro
37f02a28f3 fix param copy bug when setting conflicts, fix exception handling in the tactic, and fix some bugs with how we're chooseing split atoms in the cube function 2026-06-20 18:28:12 -07:00
Ilana Shapiro
f86feab060 attempt to fix lease cancel/reslimit race condition in worker 2026-06-20 16:58:11 -07:00
Nikolaj Bjorner
41471bbc3e add comment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-17 17:45:02 -06:00
Ilana Shapiro
b5a3d4fcb0 clean up but dangerous race condition is still present in the worker. an example:
1. Manager decides worker’s lease is stale.
  2. It records/sends lease cancel.
  3. Worker finishes naturally before observing
  4. Worker releases/discards old lease.
  5. The lease-cancel counter is still sitting on the worker limit.
  6. Later, a naked m.inc() check sees that stale cancel and treats it as global cancellation.
2026-06-16 21:50:52 -07:00
Ilana Shapiro
e88cac2fe1 restore smt_parallel to old/original version so we have a consistent baseline (even though it still includes newer bugs we've identified) 2026-06-16 21:37:11 -07:00
Ilana Shapiro
5c8cbaea3a Handle cancellation for parallel leases 2026-06-16 20:15:10 -07:00
Ilana Shapiro
c10e7c2a6f attempt at lease policy patch 2026-06-16 20:13:33 -07:00
Nikolaj Bjorner
fc5e4d7557 check for lease expiration before checking for m.inc()
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-15 16:00:26 -06:00
Nikolaj Bjorner
48ae786c4c catch exceptions from cube and backbone calls. They can throw
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-15 14:02:43 -06:00
Nikolaj Bjorner
2b9b9a9623 log exceptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-15 10:28:52 -07:00
Nikolaj Bjorner
4237f9d86b log exceptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-15 10:03:46 -07:00
Nikolaj Bjorner
4dbd592137 guard cancelation behind !m.inc()
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 23:56:48 -07:00
Ilana Shapiro
778760ec98 Merge branch 'solver_parallel' of github.com:Z3Prover/z3 into solver_parallel 2026-06-14 23:32:32 -07:00
Ilana Shapiro
be1b2f6e15 normalize parallel params 2026-06-14 23:31:47 -07:00
Nikolaj Bjorner
dba826039d avoid spurious cancel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 23:31:37 -07:00
Nikolaj Bjorner
e95f9757c9 lipstick
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 22:38:40 -07:00
Nikolaj Bjorner
26f7ce23b6 lipstick
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 22:29:33 -07:00
Nikolaj Bjorner
38a8644ae3 avoid double cancel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 22:24:21 -07:00
Ilana Shapiro
5b307545e6 change scheduling in old smt_parallel code to keep it updated 2026-06-14 22:02:00 -07:00
Ilana Shapiro
fc3892486c fix cancel bugs and remove smt_parallel_params 2026-06-14 19:55:28 -07:00
Nikolaj Bjorner
84a3c8789f fix scoping for functions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 14:06:48 -07:00
Nikolaj Bjorner
96092b196c add exception handling in case run method throws
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-14 13:46:29 -07:00
Nikolaj Bjorner
f2270d4654 make sure split atoms are not already used on the path
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-13 17:01:09 -07:00
Nikolaj Bjorner
f2d5d6fecf add set_canceled to smt_parallel to avoid deadlock
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-13 16:13:47 -07:00
Nikolaj Bjorner
491d990ed1 use structured parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-13 08:38:58 -07:00
Nikolaj Bjorner
bcbfeec6c0 address deadlock in cancellation path
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-13 08:32:34 -07:00
Nikolaj Bjorner
864c6a3f34 remove get/set max conflicts from solver, handle it using updt_params and get_params.
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-12 18:34:08 -07:00
Nikolaj Bjorner
81af0cc230 remove atom
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-12 10:58:11 -07:00
Nikolaj Bjorner
7f1e74c0da remove atom
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-06-12 10:49:05 -07:00
copilot-swe-agent[bot]
502309f246
Sort cube candidates by activity with tie shuffling 2026-06-12 17:26:55 +00:00
copilot-swe-agent[bot]
af5bbb4566
Restore atom2bool_var.cpp to fix CI build break 2026-06-12 06:37:48 +00:00
copilot-swe-agent[bot]
4b7e4cf08a
Remove const_cast from smt_solver context access 2026-06-12 06:15:29 +00:00
Nikolaj Bjorner
a3f07ba9ab
Update atom2bool_var.cpp 2026-06-11 22:47:32 -07:00
Nikolaj Bjorner
96ac8bfd77 redo priority selection 2026-06-11 16:49:36 -07:00
Nikolaj Bjorner
9485e96416 signatrue update 2026-06-11 15:59:08 -07:00
Nikolaj Bjorner
6b91b5a1dd Merge branch 'solver_parallel' of https://github.com/z3prover/z3 into solver_parallel 2026-06-11 15:54:04 -07:00
Nikolaj Bjorner
deb9fe4240 use bool_var instead of unsigned 2026-06-11 15:53:44 -07:00
Nikolaj Bjorner
49d725f477 refactor 2026-06-11 15:40:38 -07:00
Nikolaj Bjorner
de028f33a2
Update inc_sat_solver.cpp 2026-06-11 15:40:11 -07:00
Nikolaj Bjorner
5aa06b6333 refactor phase update 2026-06-11 15:28:48 -07:00
Nikolaj Bjorner
e06ca1489e remove parallal_stats 2026-06-11 14:51:28 -07:00
Nikolaj Bjorner
6ef8660adb
Parallel tactic (#9824)
Co-authored-by: Ilana Shapiro <ilanashapiro@Ilanas-MacBook-Pro.local>
Co-authored-by: Ilana Shapiro <ilanashapiro@Ilanas-MBP.localdomain>
2026-06-11 09:14:00 -07:00
Eric Astor
677abb589e
Add rlimit support in fixedpoint parameters (#9798)
The C++ implementation of the fixedpoint engine (in
z3/src/api/api_datalog.cpp) already attempts to read `rlimit` from its
local parameters:

```c++
unsigned rlimit = to_fixedpoint(d)->m_params.get_uint("rlimit", mk_c(c)->get_rlimit());
```

However, because `rlimit` was not registered in the public fp parameter
schema (`fp_params.pyg`), any attempt by clients to set it locally via
`Z3_fixedpoint_set_params` was rejected by the Z3 parameter validator
with an "unknown parameter" error.
2026-06-10 15:13:05 -07:00
Nikolaj Bjorner
384414b10c
Update seq_regex_bisim.h 2026-06-10 15:06:12 -07:00
Nikolaj Bjorner
44a561ec46
Update seq_regex_bisim.cpp 2026-06-10 15:04:24 -07:00
Nikolaj Bjorner
207e6b439a
Update seq_regex_bisim.cpp 2026-06-10 15:03:46 -07:00
Margus Veanes
513b81253b
Add OP_RE_XOR and union-find bisimulation for ground regex equivalence (#9804)
Implements the algorithm of Eq(p,q) = Empty(p XOR q)' using a union-find
driven bisimulation closure (per the CAV'26 ERE paper).

### What's added

* **New primitive OP_RE_XOR (re.xor)** wired through seq_decl_plugin:
parser signature, info propagation (nullable, min_length), and
pretty-printer.
* **seq_rewriter**: structural XOR rewrites ( XOR r = empty, XOR empty =
r, ull XOR r = comp(r), comp/comp absorption, complement push, AC
normalisation), nullability (Null(p XOR q) = Null(p) != Null(q)),
derivative (D_a(p XOR q) = D_a(p) XOR D_a(q)), reverse, antimirov
derivative, and `check_deriv_normal_form` coverage.
* **New class seq::regex_bisim** in
`src/ast/rewriter/seq_regex_bisim.{h,cpp}` to keep the bisim logic out
of the already-large `seq_rewriter.cpp`. Uses `basic_union_find` from
`util/union_find.h`, an `obj_map` for the node assignment, and a
50000-step bound (returns `l_undef` on overrun).
* **Integration** in `seq_rewriter::reduce_re_eq` (with a re-entry
guard) and in `seq_regex::propagate_eq` / `propagate_ne` for ground
regexes; on `l_undef` we fall back to the existing axiomatisation.
* **`sls_seq_plugin`**: extend `OP_RE_DIFF` switch arms to also cover
`OP_RE_XOR`.

### Validation

* Full release build with MSVC + Ninja.
* `./test-z3 /a` -- 89/89 tests passing.
* `./test-z3 /seq smt2print_parse` -- PASS.
* Smoke tests with `(a|b)*` vs `(a*b*)*` (equal) and `a*` vs `(a|b)*`
(not equal) return the expected `sat`/`unsat` quickly.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-10 14:58:20 -07:00
dependabot[bot]
589bd9e6f5
Bump shell-quote from 1.7.3 to 1.8.4 in /src/api/js (#9803)
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.7.3 to
1.8.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md">shell-quote's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/ljharb/shell-quote/compare/v1.8.3...v1.8.4">v1.8.4</a>
- 2026-05-22</h2>
<h3>Commits</h3>
<ul>
<li>[Fix] <code>quote</code>: validate object-token shapes <a
href="4378a6e613"><code>4378a6e</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code>,
<code>auto-changelog</code>, <code>eslint</code>, <code>npmignore</code>
<a
href="22ebec0434"><code>22ebec0</code></a></li>
<li>[Tests] increase coverage <a
href="9f3caa3190"><code>9f3caa3</code></a></li>
<li>[readme] replace runkit CI badge with shields.io check-runs badge <a
href="3344a047dd"><code>3344a04</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code> <a
href="699c5113d1"><code>699c511</code></a></li>
</ul>
<h2><a
href="https://github.com/ljharb/shell-quote/compare/v1.8.2...v1.8.3">v1.8.3</a>
- 2025-06-01</h2>
<h3>Fixed</h3>
<ul>
<li>[Fix] remove unnecessary backslash escaping in single quotes <a
href="https://redirect.github.com/ljharb/shell-quote/issues/15"><code>[#15](https://github.com/ljharb/shell-quote/issues/15)</code></a></li>
</ul>
<h2><a
href="https://github.com/ljharb/shell-quote/compare/v1.8.1...v1.8.2">v1.8.2</a>
- 2024-11-27</h2>
<h3>Fixed</h3>
<ul>
<li>[Fix] <code>quote</code>: preserve empty strings <a
href="https://redirect.github.com/ljharb/shell-quote/issues/18"><code>[#18](https://github.com/ljharb/shell-quote/issues/18)</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>[meta] fix changelog tags <a
href="0fb9fd8441"><code>0fb9fd8</code></a></li>
<li>[actions] split out node 10-20, and 20+ <a
href="819bd842e0"><code>819bd84</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code>,
<code>auto-changelog</code>, <code>npmignore</code>, <code>tape</code>
<a
href="fc564086c8"><code>fc56408</code></a></li>
<li>[actions] update npm for windows tests <a
href="fdeb0fd102"><code>fdeb0fd</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code>,
<code>aud</code>, <code>tape</code> <a
href="b8a4a3b3f5"><code>b8a4a3b</code></a></li>
<li>[actions] prevent node 14 on ARM mac from failing <a
href="9eecafc048"><code>9eecafc</code></a></li>
<li>[meta] exclude more files from the package <a
href="4044e7fad4"><code>4044e7f</code></a></li>
<li>[Tests] replace <code>aud</code> with <code>npm audit</code> <a
href="8cfdbd8ec3"><code>8cfdbd8</code></a></li>
<li>[meta] add missing <code>engines.node</code> <a
href="843820e1a4"><code>843820e</code></a></li>
<li>[Dev Deps] add missing peer dep <a
href="4c3b88d792"><code>4c3b88d</code></a></li>
<li>[Dev Deps] pin <code>jackspeak</code> since 2.1.2+ depends on npm
aliases, which kill the install process in npm &lt; 6 <a
href="80322ed591"><code>80322ed</code></a></li>
</ul>
<h2><a
href="https://github.com/ljharb/shell-quote/compare/v1.8.0...v1.8.1">v1.8.1</a>
- 2023-04-07</h2>
<h3>Fixed</h3>
<ul>
<li>[Fix] <code>parse</code>: preserve whitespace in comments <a
href="https://redirect.github.com/ljharb/shell-quote/issues/6"><code>[#6](https://github.com/ljharb/shell-quote/issues/6)</code></a></li>
<li>[Fix] properly support the <code>escape</code> option <a
href="https://redirect.github.com/ljharb/shell-quote/issues/5"><code>[#5](https://github.com/ljharb/shell-quote/issues/5)</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>[Refactor] <code>parse</code>: hoist <code>getVar</code> to module
level <a
href="b42ac73e39"><code>b42ac73</code></a></li>
<li>[Refactor] hoist some vars to module level <a
href="8f0c5c3c9d"><code>8f0c5c3</code></a></li>
<li>[Refactor] <code>parse</code>: use <code>slice</code> over
<code>substr</code>, cache some values <a
href="fcb2e1acd5"><code>fcb2e1a</code></a></li>
<li>[Refactor] <code>parse</code>: a bit of cleanup <a
href="6780ec5194"><code>6780ec5</code></a></li>
<li>[Refactor] <code>parse</code>: tweak the regex to not match nothing
<a
href="227d4742a0"><code>227d474</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ff166e2b63"><code>ff166e2</code></a>
v1.8.4</li>
<li><a
href="4378a6e613"><code>4378a6e</code></a>
[Fix] <code>quote</code>: validate object-token shapes</li>
<li><a
href="22ebec0434"><code>22ebec0</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code>,
<code>auto-changelog</code>, <code>eslint</code>, `npmig...</li>
<li><a
href="9f3caa3190"><code>9f3caa3</code></a>
[Tests] increase coverage</li>
<li><a
href="3344a047dd"><code>3344a04</code></a>
[readme] replace runkit CI badge with shields.io check-runs badge</li>
<li><a
href="699c5113d1"><code>699c511</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="487a9b41a7"><code>487a9b4</code></a>
v1.8.3</li>
<li><a
href="01faafff97"><code>01faaff</code></a>
[Fix] remove unnecessary backslash escaping in single quotes</li>
<li><a
href="b19fc77e66"><code>b19fc77</code></a>
v1.8.2</li>
<li><a
href="59d29ea694"><code>59d29ea</code></a>
[Fix] <code>quote</code>: preserve empty strings</li>
<li>Additional commits viewable in <a
href="https://github.com/ljharb/shell-quote/compare/v1.7.3...v1.8.4">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~ljharb">ljharb</a>, a new releaser for
shell-quote since your current version.</p>
</details>
<details>
<summary>Install script changes</summary>
<p>This version adds <code>prepublish</code> script that runs during
installation. Review the package contents before updating.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shell-quote&package-manager=npm_and_yarn&previous-version=1.7.3&new-version=1.8.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/Z3Prover/z3/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-10 08:40:36 -07:00