3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-01 20:17:52 +00:00
Commit graph

89 commits

Author SHA1 Message Date
Ilana Shapiro
e4a285187b
Setting up param tuning infrastructure in C++ (#8006)
* draft attempt at optimizing cube tree with resolvents. have not tested/ran yet

* adding comments

* fix bug about needing to bubble resolvent upwards to highest ancestor

* fix bug where we need to cover the whole resolvent in the path when bubbling up

* clean up comments

* Bump actions/checkout from 4 to 5 (#7954)

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>

* close entire tree when sibling resolvent is empty

* integrate asms directly into cube tree, remove separate tracking

* try to fix bug about redundant resolutions, merging close and try_resolve_upwards into once function

* separate the logic again to avoid mutual recursion

* [WIP] Add a mutex to warning.cpp to ensure that warning messages from different threads don't interfere (#7963)

* Initial plan

* Add mutex to warning.cpp for thread safety

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>

* Remove unused variable 'first' in mpz.cpp

Removed unused variable 'first' from the function.

* fixing the order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* fixing the order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* fix the order of parameter evaluation

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* remove AI slop

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* param order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* param order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* param order evaluation

* parameter eval order

* parameter evaluation order

* param eval

* param eval order

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* parameter eval order

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Bump github/codeql-action from 3 to 4 (#7971)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  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>

* Update Z3_mk_datatype_sort API to accept array of sort parameters and add Z3_mk_polymorphic_datatype (#7966)

* Initial plan

* Update Z3_mk_datatype_sort API to accept array of parameters

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

* Update language bindings for parametric datatype sort API

- Python: Updated DatatypeSort() to accept optional params list
- OCaml: Added mk_sort_ref_p/mk_sort_ref_ps for parametric datatypes
- .NET: Added MkDatatypeSortRef() methods with optional params
- Java: Added mkDatatypeSortRef() methods with optional params
- All changes maintain backward compatibility

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

* Fix .NET build error - rename params to parameters

The 'params' keyword is reserved in C#, causing compilation errors.
Renamed parameter from 'params' to 'parameters' in MkDatatypeSortRef methods.

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

* Add unit test for parametric datatypes

Added test_parametric_datatype.cpp to demonstrate polymorphic datatypes.
The test creates two concrete instantiations of a generic pair concept:
- pair_int_real with fields (first:Int, second:Real)
- pair_real_int with fields (first:Real, second:Int)
Then verifies that accessors work correctly and type checking is enforced.

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

* Implement polymorphic type variables support for parametric datatypes

- Modified datatype_decl_plugin to allow type variables as parameters
- Updated mk_datatype_decl to extract type variables from field sorts
- Type variables are collected in order of first appearance
- Revised unit test to use Z3_mk_type_variable for polymorphic datatypes
- Test creates pair datatype with type variables alpha and beta
- Successfully instantiates with concrete types (pair Int Real) and (pair Real Int)
- Verifies accessor types match and equality terms are well-typed
- All tests pass

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

* Add Z3_mk_polymorphic_datatype API and refactor datatype creation

- Added new API Z3_mk_polymorphic_datatype to z3_api.h
- Renamed static mk_datatype_decl to api_datatype_decl in api_datatype.cpp
- Modified api_datatype_decl to accept explicit type parameters
- Updated all callers to use renamed function
- Added test_polymorphic_datatype_api demonstrating new API usage
- Both tests pass successfully

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

* Remove type variable collection logic from constructors

Removed the logic for collecting type variables from field sorts based on constructors.

* Update comments on parameter handling in api_datatype.cpp

Clarify usage of parameters in API documentation.

* Fix OCaml build error - use list instead of array for mk_datatype_sort

Changed mk_sort_ref to pass empty list [] instead of empty array [||].
Changed mk_sort_ref_p to pass params list directly instead of converting to array.
Z3native.mk_datatype_sort expects a list, not an array.

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

* Add polymorphic datatype example to C++ examples

Added polymorphic_datatype_example() demonstrating:
- Creating type variables alpha and beta with Z3_mk_type_variable
- Defining parametric Pair datatype with fields of type alpha and beta
- Instantiating with concrete types (Pair Int Real) and (Pair Real Int)
- Getting constructors and accessors from instantiated datatypes
- Creating constants and expressions using the polymorphic types
- Verifying type correctness with equality (= (first p1) (second p2))

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>

* trim parametric datatype test

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* restore single cell

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* restore the method behavior

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* setting up python tuning experiment, not done

* 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>

* Revert "Add finite_set_value_factory for creating finite set values in model …" (#7985)

This reverts commit 05ffc0a77b.

* Update arith_rewriter.cpp

fix memory leak introduced by update to ensure determinism

* update pythonnn prototyping experiment, need to add a couple more things

* add explicit constructors for nightly mac build failure

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* build fixes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fixes

* fix some more things but now it hangs

* change multithread to multiprocess seems to have resolved current deadlock

* fix some bugs, it seems to run now

* fix logic about checking clauses individually, and add proof prefix clause selection (naively) via the OnClause hook

* disable manylinux until segfault is resolved

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add the  "noexcept" keyword to value_score=(value_score&&) declaration

* expose a status flag for clauses but every single one is being coded as an assumption...

* Add a fast-path to _coerce_exprs. (#7995)

When the inputs are already the same sort, we can skip most of the
coercion logic and just return.

Currently, `_coerce_exprs` is by far the most expensive part of
building up many common Z3 ASTs, so this fast-path is a substantial
speedup for many use-cases.

* Bump actions/setup-node from 5 to 6 (#7994)

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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>

* Enabling Control Flow Guard (CFG) by default for MSVC on Windows, with options to disable CFG. (#7988)

* Enabling Control Flow Guard by default for MSVC on Windows, with options to disable it.

* Fix configuration error for non-MSVC compilers.

* Reviewed and updated configuration for Python build and added comment for CFG.

* try exponential delay in grobner

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* throttle grobner method more actively

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* enable always add all coeffs in nlsat

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* initial parameter probe thread setup in C++

* more param tuning setup

* setting up the param probe solvers and mutation generator

* adding the learned clauses from the internalizer

* fix some things for clause replay

* score the param probes, but i can't figure out how to access the relevant solver statistics fields from the statistics obj

* set up pattern to notify batch manager so worker threads can update their params according
ly

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Lev Nachmanson <levnach@hotmail.com>
Co-authored-by: Nelson Elhage <nelhage@nelhage.com>
Co-authored-by: hwisungi <hwisungi@users.noreply.github.com>
2025-10-30 03:15:32 -07:00
Steffen Smolka
0b26f7e0ee
Add support for building Z3 using Bazel. (#7646)
Signed-off-by: Steffen Smolka <smolkaj@google.com>
2025-05-15 08:47:29 -07:00
Nikolaj Bjorner
6e88d91214 add badge for ocaml cmake
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-04-19 13:46:40 -07:00
Nikolaj Bjorner
54c6b11621
Update README.md
redist license pointer
2025-03-07 11:47:32 -08:00
chausner
c7dfb619a2
Minor tweaks in README.md (#7504) 2025-01-07 14:31:45 -08:00
Nikolaj Bjorner
b6c0e6fe4b
Update README.md 2025-01-07 11:02:39 -08:00
Nikolaj Bjorner
a8a50695c9
Update README.md 2024-11-18 13:29:06 -08:00
Nikolaj Bjorner
24dfc17920
Update README.md 2024-11-18 11:54:34 -08:00
Nikolaj Bjorner
e380903d61
Update README.md 2024-11-16 19:20:04 -08:00
Kirill A. Korinsky
5cee19fa09
It uses C++20 BTW (#7429) 2024-10-20 20:00:36 -07:00
Páll Haraldsson
8b81bda469
Julia now used the C API. (#7388) 2024-09-24 15:17:11 +01:00
Nikolaj Bjorner
ea417bbf92
Update README.md 2024-08-28 10:32:07 -07:00
Nikolaj Bjorner
f9176fb4b7
Update README.md 2024-05-07 11:39:52 -07:00
Nikolaj Bjorner
e722dc7777 add status badge for windows build, remove windows build from Azure pipelines
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-20 16:30:08 -08:00
itehax
aa703160ce
Update README.md (#6960) 2023-10-23 15:28:02 -07:00
Jack·Boos·Yu
9118a93e44
[document] Add vcpkg instruction step (#6345) 2022-09-19 09:36:54 -07:00
Bruce Mitchener
1eb2472b19
README: Fix release notes link. (#6185) 2022-07-22 09:45:07 -07:00
Chaoqi Zhang
3439d2407b
Revert "doc: update readme (#5898)" (#5905)
This reverts commit 313b87f3c6.
2022-03-20 11:21:11 -07:00
Chaoqi Zhang
313b87f3c6
doc: update readme (#5898)
add the command to `mkdir build` first
2022-03-14 09:30:08 -07:00
Jan Vraný
8e18a94558
Update README with info about Smalltalk bindings (#5893) 2022-03-09 12:31:12 -08:00
Kaleb Crans
d4ea67a6e7
Fix a few typos in README (#5782) 2022-02-06 19:47:47 +02:00
Kevin Gibbons
2b934b601d
Add WebAssembly/TypeScript bindings (#5762)
* Add TypeScript bindings

* mark Z3_eval_smtlib2_string as async
2022-01-09 17:16:38 -08:00
Nikolaj Bjorner
5a77c30ce0
Update README.md 2021-12-25 17:36:28 -08:00
Nikolaj Bjorner
8e59b34338
Update README.md 2021-10-29 17:04:42 +02:00
Nikolaj Bjorner
f7a2d08e74
Update README.md 2021-10-11 10:32:47 -07:00
Nikolaj Bjorner
b3e63638f2
Update README.md 2021-07-31 18:02:13 -07:00
Nikolaj Bjorner
5533fc9dbc
Update README.md 2021-07-31 11:11:21 -07:00
Nikolaj Bjorner
206d7709d3
Update README.md 2021-06-15 12:25:03 -05:00
Nikolaj Bjorner
03947b2168 remove travis badge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-04 11:40:51 -07:00
Don Syme
504b6559ab
[WIP] Suggestion: build .NET package for both x86 and x64 and rename (#5021)
* build package for x86

* build package for x86

* build package for x86

Co-authored-by: Don Syme <donsyme@fastmail.com>
2021-02-11 09:29:32 -08:00
Nikolaj Bjorner
d591bf62c1 add to readme #4575
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 09:35:50 -07:00
Nikolaj Bjorner
4d586c2c13 remove stale references to gac/csc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 12:03:03 -07:00
Nikolaj Bjorner
f381d51c83 update badge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-29 14:04:12 -07:00
ahumenberger
d706d43712
Update README with infos about Julia bindings (#4298)
* Update README for Julia bindings

* Fix links in readme

* Add hash of z3_jll

* Fix typo
2020-05-12 19:34:47 -07:00
Anton Kochkov
50d58114cf
Fix the Julia bindings paragraph in README (#4068) 2020-04-23 10:05:50 -07:00
Nikolaj Bjorner
95a78b2450
updates to seq and bug fixes (#4056)
* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix #4037

* nicer output for skolem functions

* more overhaul of seq, some bug fixes

* na

* added offset_eq file

* na

* fix #4044

* fix #4040

* fix #4045

* updated ignore

* new rewrites for indexof based on #4036

* add shortcuts

* updated ne solver for seq, fix #4025

* use pair vectors for equalities that are reduced by seq_rewriter

* use erase_and_swap

* remove unit-walk

* na

* add check for #3200

* nits

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* name a type

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove fp check

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove unsound axiom instantiation for non-contains

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix rewrites

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix #4053

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix #4052

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-22 13:18:55 -07:00
Nikolaj Bjorner
9af4cc0fd6 links to API (related to issue in z3doc)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-12-03 12:20:11 +01:00
Nikolaj Bjorner
cef5a26361 update README on cmake
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-11-06 08:43:54 +01:00
Nikolaj Bjorner
c1fa844460 format
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-17 10:01:11 -07:00
Nikolaj Bjorner
a82cee6984 add information about supported packages in README, fix #2642
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-17 10:00:41 -07:00
Nikolaj Bjorner
06ee09a113
Update README.md 2019-07-26 17:56:54 -07:00
Nikolaj Bjorner
07472d2563
Update README.md 2019-07-26 16:47:55 -07:00
Nikolaj Bjorner
42a1926cbb update readme
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-07-26 15:48:07 -07:00
Nikolaj Bjorner
6b5961ac1e update readme
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-07-26 15:47:24 -07:00
Yusuke Matsushita
53046df628
Merge navigations for stable and nightly builds
Merged navigations for stable and nightly builds, reflecting the very recent update.
2019-06-11 02:52:13 +09:00
Nikolaj Bjorner
9fa52153fa remove cz3 builds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-06 18:19:32 -07:00
Nikolaj Bjorner
16fa1fa5db remove and
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-06 17:42:10 -07:00
Nikolaj Bjorner
9615974e76 add macz3 status
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-20 10:30:00 -08:00
Nikolaj Bjorner
5a94cece2e add macz3 status
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-20 10:29:00 -08:00
Nikolaj Bjorner
566bdf3a82 add self-contained section on where to retrieve binaries
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-17 09:55:15 -07:00