3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-15 14:11:28 +00:00
Commit graph

2655 commits

Author SHA1 Message Date
Shiwei Weng 翁士伟
894c0e9fbe
Bugfix: post-build sanity check when an old version of ocaml-z3 is installed (#7815)
* fix: add generating META for ocamlfind.

* Patch macos. We need to keep the `@rpath` and use environment var to enable the test because we need to leave it to be fixed by package managers.

* Trigger CI.

* Debug.

* Debug.

* Debug.

* Debug.

* Debug.

* Debug.

* Hacky fix for ocaml building warning.

* Fix typo and rename variables.

* Fix cmake for ocaml test, using local libz3 explicit.
2025-08-24 20:49:04 -07:00
Nikolaj Bjorner
12563c6963 clean up a little of the handling of VERSION.txt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-24 16:38:15 -07:00
Copilot
300e0ae69e
Move VERSION.txt to scripts directory and update all references (#7811)
* Initial plan

* Move VERSION.txt to scripts/ and update all references

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-08-24 16:36:05 -07:00
Nikolaj Bjorner
287464567b copy VERSION from SRC_DIR
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-24 15:10:49 -07:00
Nikolaj Bjorner
116e1eca8b print dirs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-24 15:02:50 -07:00
Nikolaj Bjorner
be22111df5 more output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-24 14:49:56 -07:00
Nikolaj Bjorner
867bc6aee6 remove extra characters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-24 14:36:23 -07:00
Nikolaj Bjorner
438b41acbf try other dir
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-23 18:27:26 -07:00
Nikolaj Bjorner
1987b3dde1 try src_dir_repo
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-23 18:20:32 -07:00
Nikolaj Bjorner
778b9a57c3 try diferennt dirs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-23 18:13:18 -07:00
Nikolaj Bjorner
3b036369f9 add more logging to setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-23 16:37:06 -07:00
Nikolaj Bjorner
21e63dba8d add print for version file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-23 14:41:28 -07:00
Copilot
8d395d63ae
Fix Julia bindings linker errors on Windows MSVC (#7794)
* Initial plan

* Fix Julia bindings linker errors on Windows MSVC

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

* Complete Julia bindings fix validation and testing

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

* Fix Julia bindings linker errors on Windows MSVC

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-08-23 14:24:20 -07:00
Copilot
5d29eb1060
Fix Azure Pipeline PyPI package builds by including VERSION.txt in source distribution (#7808)
* Initial plan

* Fix Azure Pipeline PyPI package builds by including VERSION.txt in source distribution

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-08-23 10:51:35 -07:00
Nikolaj Bjorner
fa0f9c97bc fix parsing of version
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-20 09:45:06 -07:00
Nikolaj Bjorner
02f195a380 fix version parse
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-20 09:39:36 -07:00
Nikolaj Bjorner
72655637de read version from VERSION.txt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-20 09:24:58 -07:00
Copilot
1e7832a391
Use solver factory translate method in Z3_solver_translate (#7782)
* Initial plan

* Fix Z3_solver_translate to use solver factory translate method

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-08-14 18:13:23 -07:00
Nikolaj Bjorner
57a60c832b add > operator as shorthand for Array 2025-08-13 10:24:46 -07:00
Nikolaj Bjorner
3abb091336 fix #7776 2025-08-13 10:24:46 -07:00
Nikolaj Bjorner
fcd3a70c92 remove theory_str and classes that are only used by it 2025-08-07 21:05:12 -07:00
Nikolaj Bjorner
7ba967e136 fix java build for java bindings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-07 14:37:29 -07:00
Nikolaj Bjorner
0cefc926b0 register on_binding attribute
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-07 13:46:07 -07:00
Nikolaj Bjorner
d57dd6ef73 use jboolean in Native interface
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-07 13:11:11 -07:00
Nikolaj Bjorner
fa3d341b18 add on_binding callbacks across APIs
update release notes,
add to Java, .Net, C++
2025-08-07 12:55:50 -07:00
Nikolaj Bjorner
aad511d40b missing new closure
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-06 21:22:23 -07:00
Nikolaj Bjorner
b33f444545 add an option to register callback on quantifier instantiation
Suppose a user propagator encodes axioms using quantifiers and uses E-matching for instantiation. If it wants to implement a custom priority scheme or drop some instances based on internal checks it can register a callback with quantifier instantiation
2025-08-06 21:11:55 -07:00
Nuno Lopes
b1ab695eb6
fix #7603: race condition in Ctrl-C handling (#7755)
* fix #7603: race condition in Ctrl-C handling

* fix race in cancel_eh

* fix build
2025-08-06 14:27:28 -07:00
Copilot
7a8ba4b474
Add support for Algebraic Datatypes in JavaScript/TypeScript bindings (#7734)
* Initial plan

* Add datatype type definitions to types.ts (work in progress)

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

* Complete datatype type definitions with working TypeScript compilation

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

* Implement core datatype functionality with TypeScript compilation success

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

* Complete datatype implementation with full Context integration and tests

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-08-04 20:58:42 -07:00
Nikolaj Bjorner
07613942da Add parameter validation for selected API functions 2025-07-27 13:38:37 -07:00
humnrdble
eb24488c3e
FreshConst is_sort (#7748) 2025-07-27 03:19:43 -07:00
Nikolaj Bjorner
661ccb3702
Revert "Fix source installation to create dist-info directory for package dis…" (#7704)
This reverts commit ad0afbb792.
2025-06-29 09:11:32 -07:00
Copilot
ad0afbb792
Fix source installation to create dist-info directory for package discovery (#7695)
* Initial plan

* Add proper pyproject.toml metadata for dist-info creation

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

* Clean up setup.py and add comprehensive test for dist-info fix

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

* Fix build errors in setup.py and pyproject.toml

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

* Fix ModuleNotFoundError by removing dynamic version loading from pyproject.toml

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

* Remove hardcoded version from pyproject.toml, use dynamic version from setup.py

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-06-28 16:06:03 -07:00
Copilot
84a6e4d672
Fix pydoc doctest failures by updating expected output format for string operations (#7703)
* Initial plan

* Fix pydoc doctest failures by updating expected output format

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-06-27 19:11:04 -07:00
Shiwei Weng 翁士伟
c2efd3dc6d
Update on building OCaml binding with CMake (#7698)
* fix: add generating META for ocamlfind.

* Patch macos. We need to keep the `@rpath` and use environment var to enable the test because we need to leave it to be fixed by package managers.

* Trigger CI.

* Debug.

* Debug.

* Debug.

* Debug.

* Debug.

* Debug.

* Hacky fix for ocaml building warning.

* Fix typo and rename variables.
2025-06-27 17:55:58 -07:00
Copilot
2de40ff220
Improve Extract function documentation to clarify bit-vector vs sequence usage (#7701)
* Initial plan

* Improve Extract function documentation to clarify bit-vector vs sequence usage

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-06-27 10:21:23 -07:00
Dongjae Lee
3916c451e5
Fix: typo in z3 python api (#7693) 2025-06-24 07:13:44 -07:00
Nikolaj Bjorner
c387b20ac6 move smt params to params directory, update release.yml 2025-06-09 10:47:22 -07:00
Nikolaj Bjorner
b4c2b455bd #7667 - add API documentation
The scenario works as expected when disabling model compression:

```
from z3 import *
pre_processor = Tactic("bit-blast")
solver = Solver()

set_param("model.compact", False)

x = BitVec('x', 8)
pre_processed = pre_processor(x == 5)
print(pre_processed[0])
solver.add(pre_processed[0]) # add the sole assertion

if solver.check() == sat:
    print(solver.model())
    model = pre_processed[0].convert_model(solver.model())
    print(model)
    print(model[x].as_long())
```
2025-05-30 11:05:51 +01:00
Brandon Stride
257b8e91e6
Fix out of bounds error in OCaml API (#7665) (#7666) 2025-05-29 17:06:48 +01:00
LeeYoungJoon
0a93ff515d
Centralize and document TRACE tags using X-macros (#7657)
* Introduce X-macro-based trace tag definition
- Created trace_tags.def to centralize TRACE tag definitions
- Each tag includes a symbolic name and description
- Set up enum class TraceTag for type-safe usage in TRACE macros

* Add script to generate Markdown documentation from trace_tags.def
- Python script parses trace_tags.def and outputs trace_tags.md

* Refactor TRACE_NEW to prepend TraceTag and pass enum to is_trace_enabled

* trace: improve trace tag handling system with hierarchical tagging

- Introduce hierarchical tag-class structure: enabling a tag class activates all child tags
- Unify TRACE, STRACE, SCTRACE, and CTRACE under enum TraceTag
- Implement initial version of trace_tag.def using X(tag, tag_class, description)
  (class names and descriptions to be refined in a future update)

* trace: replace all string-based TRACE tags with enum TraceTag
- Migrated all TRACE, STRACE, SCTRACE, and CTRACE macros to use enum TraceTag values instead of raw string literals

* trace : add cstring header

* trace : Add Markdown documentation generation from trace_tags.def via mk_api_doc.py

* trace : rename macro parameter 'class' to 'tag_class' and remove Unicode comment in trace_tags.h.

* trace : Add TODO comment for future implementation of tag_class activation

* trace : Disable code related to tag_class until implementation is ready (#7663).
2025-05-28 14:31:25 +01:00
Nikolaj Bjorner
7ebe7c46b9 remove stale API #7648 2025-05-15 10:57:46 -07:00
Nikolaj Bjorner
9232ef579c remove copy of LICENSE.txt - pypi doesn't take it 2025-05-09 16:53:45 -07:00
Nikolaj Bjorner
644118660f list euf dependency in api cmakefile
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-07 15:47:03 -07:00
Nikolaj Bjorner
dd211bade9 filter out terms that are not solved 2025-04-30 09:40:45 -07:00
Nikolaj Bjorner
17cac7d87c provide shortcut to command-line version to retrieve parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-04-19 13:51:08 -07:00
Shiwei Weng 翁士伟
f7aec02503
WIP: Migrating OCaml binding to CMake (#7254)
* Update doc for `mk_context`.

* Migrating to cmake.

* Migrating to cmake. It builds both internal or external libz3.

* Start to work on platform-specific problem.

* Messy notes.

* debug.

* Cleanup a bit.

* Fixing shared lib extension.

* Minor.

* Resume working on this PR.

* Remove including `AddOCaml`.

* Keep `z3.ml` and `z3.mli` in the src but specify the generated file in the bin.

* Keep `ml_example.ml` in the src.

* Try github action for ocaml.

* Add workflow using matrix.

* Fix mac linking once more.

* Bypass @rpath in building sanity check.
2025-04-19 13:41:27 -07:00
Nikolaj Bjorner
ed5dd26bb7 remove non-working ts mcp server, settle with python variant 2025-04-18 10:10:12 -07:00
Nikolaj Bjorner
741cb5c3b5 minimal z3 MCP server 2025-04-18 10:00:04 -07:00
Nikolaj Bjorner
3f73c8b18f stab at SMTLIB REL mcp server 2025-04-17 17:23:09 -07:00