3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 17:45:32 +00:00
Commit graph

625 commits

Author SHA1 Message Date
Nikolaj Bjorner
bd566f16b1 Expose PARAMETER_INTERNAL and PARAMETER_ZSTRING in case API users access these #7522 2025-01-22 11:46:11 -08:00
Michał Górny
fc9ff946b7
use cmake from PyPI only when system executable is not available (#7514)
Rather than pulling `cmake` from PyPI unconditionally, add it to build
dependencies only if the system `cmake` executable cannot be found.
This eliminates an unnecessary dependency on systems featuring CMake,
and ensures that whenever possible, a downstream patched CMake version
is used that is more compatible with the system in question.
2025-01-21 14:39:19 -08:00
Nikolaj Bjorner
71a4801c1d add shortcuts to convert to python objects in cases of numerals and strings 2025-01-05 12:17:38 -08:00
Nikolaj Bjorner
cd41b21fa2 fix #7501 2025-01-05 11:59:59 -08:00
Nikolaj Bjorner
05f166f736 add py_value to selected classes in python bindings, add mode for input-assertion based lookahead solving 2025-01-04 13:40:49 -08:00
Nikolaj Bjorner
87f7a20e14 Add (updated and general) solve_for functionality for arithmetic, add congruence_explain to API to retrieve explanation for why two terms are congruent Tweak handling of smt.qi.max_instantations
Add API solve_for(vars).
It takes a list of variables and returns a triangular solved form for the variables.
Currently for arithmetic. The solved form is a list with elements of the form (var, term, guard).
Variables solved in the tail of the list do not occur before in the list.
For example it can return a solution [(x, z, True), (y, x + z, True)] because first x was solved to be z,
then y was solved to be x + z which is the same as 2z.

Add congruent_explain that retuns an explanation for congruent terms.
Terms congruent in the final state after calling SimpleSolver().check() can be queried for
an explanation, i.e., a list of literals that collectively entail the equality under congruence closure.
The literals are asserted in the final state of search.

Adjust smt_context cancellation for the smt.qi.max_instantiations parameter.
It gets checked when qi-queue elements are consumed.
Prior it was checked on insertion time, which didn't allow for processing as many
instantations as there were in the queue. Moreover, it would not cancel the solver.
So it would keep adding instantations to the queue when it was full / depleted the
configuration limit.
2024-12-19 23:27:57 +01:00
Oskar Haarklou Veileborg
b4295620b3
Add __enter__ and __exit__ methods on Optimize class (#7477)
This enables the use of the with statement for the Optimize class to
concisely call push() and pop(). This works similarly to the Solver
class.
2024-12-13 09:19:04 -08:00
Nikolaj Bjorner
05e053247d add facility to solve for a linear term over API 2024-11-30 09:34:27 -08:00
Nikolaj Bjorner
d2411567b5 add projection with witnesses
expose model based projection with witness creation
2024-11-27 10:26:34 -08:00
Nikolaj Bjorner
36725758eb fix typos POLING -> POLLING in setup.py and remove unused CFLAGS
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-21 11:32:38 -08:00
Nikolaj Bjorner
71bad7159b #7418 - circumvent use of timer threads to make WASM integration of z3 easier
The scoped_timer uses a std::therad. Spawning this thread fails in cases of WASM.
Instead of adapting builds and using async features at the level of WASM and the client, we expose a specialized version of z3 that doesn't use threads at all, neither for solvers nor for timers.
The tradeoff is that the periodic poll that checks for timeout directly queries the global clock each time.
We characterize it as based on polling.
2024-11-21 11:20:05 -08:00
Nikolaj Bjorner
8965123c0d fix type in setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-19 19:08:29 -08:00
Nikolaj Bjorner
10d9c81957 adapt for pyodide built
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-19 18:51:04 -08:00
Nikolaj Bjorner
b929996941 update to set single threaded
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-16 09:11:44 -08:00
Nikolaj Bjorner
f39198d9a8 move build-env setting to correct place
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-16 08:32:47 -08:00
Nikolaj Bjorner
7c5ff7c623 moving compile time flags to setup for pyodide 2024-11-16 08:28:24 -08:00
Linus
d3009dabfc
Proposed fix for #7451 (#7452) 2024-11-13 09:11:40 -08:00
Audrey Dutcher
75e46778fa
Make build process work with pyodide (#7442) 2024-11-04 11:09:51 -08:00
Nikolaj Bjorner
8b657f27aa add shortcut to retrieve kind of application
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-22 13:05:58 -07:00
Nikolaj Bjorner
78d1139ba0 add shortcut to retrieve kind of application
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-22 13:04:41 -07:00
Nikolaj Bjorner
0ebea1c298 remove debug out
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-22 11:58:16 -07:00
Nikolaj Bjorner
54d30f26f7 add _0 to platform tag for pypi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-10 15:52:10 -07:00
Nikolaj Bjorner
00f1f1b83d fix typo in setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-09 14:19:10 -07:00
Nikolaj Bjorner
fe71b75ffd remove : from setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-09 13:21:27 -07:00
Nikolaj Bjorner
48aa2f6988 setup python dist to remove internal build suffix for macos 2024-10-09 12:47:17 -07:00
Nikolaj Bjorner
8c39863019 fix typo in arch for setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-09-30 16:17:40 -07:00
Nikolaj Bjorner
4cefc513eb add sequoia to os versions #7407
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-09-30 16:05:53 -07:00
Nikolaj Bjorner
19f63cd6e3 add sequoia to os versions #7407
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-09-30 15:57:49 -07:00
Nikolaj Bjorner
48712b4f60 Add initial value setting for variables in Z3 API, solver, and optimize modules 2024-09-18 16:13:15 +03:00
Nikolaj Bjorner
0ba306e7b3 y 2024-09-17 12:27:13 +03:00
Audrey Dutcher
0837e3b8e8
Fix nightly (#7365)
- add some logic to setup.py to handle cross platform tagging correctly
  this adds a dependency on setuptools>=70
- rearrange the nightly CI to use these new builds correctly
2024-09-03 16:11:42 -07:00
Nikolaj Bjorner
5360656440 fix expected
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-08-28 09:40:57 -07:00
Audrey Dutcher
e1f1d677ff
New python packaging and tests (#7356)
* Simplify/modernize python packaging

* Modify azure CI to utilize new python packaging
2024-08-27 17:12:31 -07:00
Philip Zucker
e7382d6ff9
Added "&lambda;" pretty printing to python (#7320) 2024-07-31 08:14:16 -07:00
Nikolaj Bjorner
374609bd46 kludge to address #7232, probably superseeded by planned revision to setup/pypi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-07-08 16:54:09 -07:00
Nikolaj Bjorner
c7529d0b25 expose fold as well
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 14:56:18 -07:00
Nikolaj Bjorner
fc6c4c98e2 initial warppers for seq-map/seq-fold
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 14:52:49 -07:00
Nikolaj Bjorner
b8a69987c3 fix #7165 2024-03-17 16:33:40 -07:00
Nikolaj Bjorner
620efbb67b add aacrhc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-03-06 13:53:47 -08:00
Steven Moy
e8c8d8aa7d
Put in workaround to rename manylinux_arm64 to manylinux_aarch64 (#7149) 2024-03-05 13:38:12 -08:00
Nikolaj Bjorner
10687082f1
Revert "For many linux build, use aarch64 instead of arm64 (#7147)" (#7148)
This reverts commit 7694bca5f4.
2024-03-05 12:25:31 -08:00
Steven Moy
7694bca5f4
For many linux build, use aarch64 instead of arm64 (#7147) 2024-03-05 11:27:43 -08:00
Nikolaj Bjorner
77a07bb791 detect arm64 for manylinux setup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-03-04 21:14:19 -08:00
Bruce Mitchener
143a35d370
Fix typos. (#7137) 2024-02-22 09:35:15 -08:00
Cal Jacobson
199ef30e0c
conditionally depend on importlib_resources (#7116)
In python >= 3.9, it's available as part of the stdlib.
2024-02-18 12:20:24 +07:00
Nikolaj Bjorner
f1d97c7a3a allow callbacks to be nested 2024-02-13 20:30:17 +07:00
Bruce Mitchener
53f89a81c1
Fix some typos. (#7115) 2024-02-07 23:06:43 -08:00
Nikolaj Bjorner
28c44a6ed0 fix #7105
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-30 15:41:14 -08:00
Nikolaj Bjorner
c340233df6 fix #7081
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-16 10:31:31 -08:00
Nikolaj Bjorner
afba43a5a7 fix #7085
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-16 10:18:46 -08:00