3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-19 23:14:40 +00:00
Commit graph

20202 commits

Author SHA1 Message Date
dependabot[bot]
59a347dee1 Bump actions/download-artifact from 4 to 6 (#8032)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 20:55:57 -08:00
dependabot[bot]
4bd61d3ed9 Bump actions/setup-python from 5 to 6 (#8033)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 20:55:57 -08:00
dependabot[bot]
835b89ba9c Bump actions/upload-artifact from 4 to 5 (#8034)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 20:55:57 -08:00
Copilot
cc913af282 Fix NuGet package missing Microsoft.Z3.dll due to inverted replace() logic (#8029)
* Initial plan

* Fix NuGet packaging and add GitHub Actions workflow

- Fixed critical bug in mk_nuget_task.py replace() function
- Created comprehensive GitHub Actions workflow for building NuGet packages

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Add documentation and improve code comments

- Added comprehensive README for NuGet build workflow
- Added detailed comments explaining the replace() function fix
- Verified all Python syntax is correct

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-18 20:55:57 -08:00
Nikolaj Bjorner
0d11ec4d51 fix #8024
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:57 -08:00
Nikolaj Bjorner
f26b408cec strengthen filter for unknown by checking relevancy of parents #8022
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:57 -08:00
Nikolaj Bjorner
5e3b63d751 update package lock
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:57 -08:00
Nikolaj Bjorner
b443e90e24 add back statistics to smt-parallel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:57 -08:00
Josh Berdine
2a785bf291 Make rcf is_rational and is_rational_function operations handle zero (#8025)
The representation of the zero rcf numeral is nullptr, and the is_rational
and is_rational_function operations are not expecting to be called with
nullptr. But there isn't a way to test for that in the API, other than
checking if Z3_rcf_num_to_string returns "0".

This patch adds a couple conditions so that is_rational and
is_rational_function operations handle zero. Maybe this isn't the desired
change. For instance, the is_zero operation could instead be exposed in the
API and preconditions added to the relevant operations.

Signed-off-by: Josh Berdine <josh@berdine.net>
2026-02-18 20:55:56 -08:00
Josh Berdine
8c0af7eb37 Add Z3_fpa_is_numeral to the API (#8026)
This is analogous to Z3_fpa_is_numeral_nan, Z3_fpa_is_numeral_inf, etc. and
can be needed to check that inputs are valid before calling those functions.

Signed-off-by: Josh Berdine <josh@berdine.net>
2026-02-18 20:55:56 -08:00
Josh Berdine
a74121a905 Add check that argument of Z3_is_algebraic_number is_expr (#8027)
To make sure that the `to_expr` cast is safe.

Signed-off-by: Josh Berdine <josh@berdine.net>
2026-02-18 20:55:56 -08:00
Nikolaj Bjorner
01362bf055 fix infinite loop in update function
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:56 -08:00
Nikolaj Bjorner
eecfb47330 comment out parameter check
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:56 -08:00
Nikolaj Bjorner
385dcb6de0 check propagate ineqs setting before applying simplifier 2026-02-18 20:55:56 -08:00
Copilot
0f12eb1ab3 Add missing string replace operations to Java API (#8011)
* Initial plan

* Add C API and Java bindings for str.replace_all, str.replace_re, str.replace_all_re

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Add test for new Java string replace operations

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Remove author field from test file header

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Delete examples/java/StringReplaceTest.java

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:56 -08:00
Lev Nachmanson
1bd95a3453 add tests showing shortcomings of factorization
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-02-18 20:55:55 -08:00
Lev Nachmanson
07501f7c1f change logic NRA->ALL in log_lemma
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2026-02-18 20:55:55 -08:00
Nikolaj Bjorner
7eebf35939 disable nuget
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:55 -08:00
Nikolaj Bjorner
17aae99931 update centos version
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:50 -08:00
Nikolaj Bjorner
e38869e776 Revert "Add finite_set_value_factory for creating finite set values in model …" (#7985)
This reverts commit 05ffc0a77b.
2026-02-18 20:55:23 -08:00
Copilot
ef5dced019 Add finite_set_value_factory for creating finite set values in model generation (#7981)
* Initial plan

* Add finite_set_value_factory implementation

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Remove unused dl_decl_plugin variable and include

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Update copyright and add TODOs in finite_set_value_factory

Updated copyright information and added TODO comments for handling in finite_set_value_factory methods.

* Update copyright information in finite_set_value_factory.h

Updated copyright year from 2006 to 2025.

* Implement finite_set_value_factory using array_util to create singleton sets

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Simplify empty set creation in finite_set_value_factory

Refactor finite_set_value_factory to simplify empty set handling and remove array-specific logic.

* Change family ID for finite_set_value_factory

* Fix build error by restoring array_decl_plugin include and implementation

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Update finite_set_value_factory.h

* Add SASSERT for finite set check in factory

Added assertion to check if the sort is a finite set.

* Rename member variable from m_util to u

* Refactor finite_set_value_factory for value handling

* Use register_value instead of direct set insertion

Replaced direct insertion into set with register_value calls.

* Update finite_set_value_factory.cpp

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:53:44 -08:00
Nikolaj Bjorner
d070296ae5 nits
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-01-21 11:44:18 -08:00
Copilot
2f8342a1b3
Add smt.finite_set.lattice_refutation parameter to control lattice refutation code path (#8247)
* Initial plan

* Add finite_set.lattice_refutation parameter to smt_params_helper.pyg

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Add finite_set.lattice_refutation parameter implementation

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-01-20 17:20:52 -08:00
Nikolaj Bjorner
40efe27066 add formatting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-01-18 17:48:20 -08:00
lorenzwinkler1
31cbb4b144
Lattice based refutation (#8211)
* add examples

* add lattice refutation solver class

* store partial order in vector

* capture partial order relations

* begin with the incremental reachability data structure

* implement data structure for incremental reachability

* fix bug in subset propagation

* add trace

* only propagate if new value was added

* begin implementing bitvector variant of reachability matrix

* fix path creation and cycle detection

* fix bug

* make conflict triggering more conservative

* check if theory vars are in bounds

* add cycle detection (including equality propagation)

* add examples

* remove example

* remove traces

* remove sln file
2026-01-18 17:42:40 -08:00
Nikolaj Bjorner
ec3aafd51e fixup parameter to enable pretty printing of range sort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-12-29 18:09:13 -08:00
Nikolaj Bjorner
ba13460511 add functions that create unique sets for model construction based on solving cardinality constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-12-29 11:57:48 -08:00
Nikolaj Bjorner
1d3f6a7c70 remove incorrect assertion, make sat case for range + size conservative
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-12-06 13:07:14 -08:00
Alexander Stromberger
e90512388c
simplify expressions before range local check (#8061)
Co-authored-by: Alexander Stromberger <alexander.stromberger@alturos.com>
2025-12-06 11:37:47 -08:00
Nikolaj Bjorner
7d5d6a2b38 fix crashes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-24 11:32:17 -08:00
Nikolaj Bjorner
7d2c84465c update handling for set membership
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-24 03:57:01 -08:00
Nikolaj Bjorner
7bc592749d fixes to cardinality solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-23 11:55:49 -08:00
Nikolaj Bjorner
896b3ccf69 enable inequalities that are not normal form
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-21 21:02:44 -08:00
Nikolaj Bjorner
8c224ccf03 fix crashes based on z3test\regressions\finite-sets\ in the finite-sets branch
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-21 20:31:44 -08:00
Nikolaj Bjorner
04cb59fd74 include FS logic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-21 13:14:53 -08:00
Copilot
df816cab07
Add finite set API support for C# and Java bindings (#8003)
* Initial plan

* Add finite set API support for Java and C#

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Add documentation and examples for finite set APIs

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Delete FINITE_SET_API_EXAMPLES.md

* Add FiniteSetSort files to CMakeLists.txt build configurations

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-04 15:57:55 -08:00
Nikolaj Bjorner
5b92f8fb80 remove empty line
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-31 00:09:20 -07:00
Nikolaj Bjorner
e958654946 fix merge conflict
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 08:30:14 -07:00
Copilot
98090fbf50
Add finite_set API bindings for ML, TypeScript, and Julia (#8005)
* Initial plan

* Add finite_set API functions to Julia bindings

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2025-10-30 03:15:01 -07:00
Nikolaj Bjorner
6fa12312b3 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:58:16 -07:00
Nikolaj Bjorner
a4d73e3c03 bump version for release
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:54 -07:00
Nikolaj Bjorner
884fe69f89 update release notes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:53 -07:00
Nikolaj Bjorner
47190ae7e5 fix C++ example and add polymorphic interface for C++
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:53 -07:00
Nikolaj Bjorner
aa74dc6679 renemable Centos AMD nightly
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:53 -07:00
Nikolaj Bjorner
b42734479e fix build break introduced when adding support for polymorphic datatypes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:53 -07:00
dependabot[bot]
fd9bb2ec5b Bump actions/upload-artifact from 4 to 5 (#7998)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-30 02:57:53 -07:00
dependabot[bot]
543ee38682 Bump actions/download-artifact from 5 to 6 (#7999)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-30 02:57:52 -07:00
Copilot
a692994434 Add missing mkLastIndexOf method and CharSort case to Java API (#8002)
* Initial plan

* Add mkLastIndexOf method and CharSort support to Java API

- Added mkLastIndexOf method to Context.java for extracting last index of sub-string
- Added Z3_CHAR_SORT case to Sort.java's create() method switch statement
- Added test file to verify both fixes work correctly

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Fix author field in test file

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Delete examples/java/TestJavaAPICompleteness.java

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:52 -07:00
Nikolaj Bjorner
61e3e98e2e disable centos build until resolved
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-30 02:57:15 -07:00
Nikolaj Bjorner
454a8c3406 Revert "Add finite_set_value_factory for creating finite set values in model …" (#7985)
This reverts commit 05ffc0a77b.
2025-10-30 02:57:11 -07:00