3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-25 10:05:32 +00:00
Commit graph

583 commits

Author SHA1 Message Date
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
Nikolaj Bjorner
575538d325 follow error message to put dependencies in setup args
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 18:38:29 -08:00
Nikolaj Bjorner
4123405d17 add version
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 15:50:09 -08:00
Nikolaj Bjorner
6282f40255 try add name to project
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 14:57:45 -08:00
Nikolaj Bjorner
7e716f7cfe try fix suggested in #7041
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 13:12:05 -08:00
Nikolaj Bjorner
6cd619d377 kludge to fixup osver in python for Mac
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 11:39:55 -08:00
Nikolaj Bjorner
76c05f171a specify a readme file with the nuget package
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-05 12:32:30 -08:00
Asger Hautop Drewsen
a9513c1998
Improve BoolRef addition (#7045) 2023-12-05 09:12:25 -08:00
Asger Hautop Drewsen
764f0d54a4
Overload xor operator for BoolRef (#7043) 2023-12-05 07:48:57 -08:00
Andrey Andreyevich Bienkowski
18f14921ba
Clarify optimizer guarantees (#7030)
* Clarify optimizer guarantees (python)

* Clarify optimization guarantees (OCaml)

* Clarify optimizer guarantees (java)

* Clarify optimizer guarantees (.net)
2023-12-04 09:32:26 -08:00
Alper Altuntas
d540d881ef
Add __enter__ and __exit__ methods to Solver class (#7025)
To enable the usage of the with statement for the Solver class
instances, this commit adds __enter__ and __exit__ methods.
The with statement should offer a more concise and safer
alternative to explicit usage of push() and pop() methods.
2023-11-30 08:35:08 -08:00
Nikolaj Bjorner
f90b10a0c8 fix #7012
omitting constructor, simplifying operator definitions, omitting incorrect type annotations
2023-11-28 13:26:10 -08:00
Bruce Mitchener
9d1ceab1f2
cmake: Use FindPython3. (#7019)
`FindPythonInterp` has been deprecated for a long time and is more
verbal about that deprecation now.

The build system no longer uses `PYTHON_EXECUTABLE` but instead uses
`Python3_EXECUTABLE`.
2023-11-27 11:20:21 +01:00
Nikolaj Bjorner
9382b96a32 add API to access symbols associated with quantifiers 2023-11-19 16:30:09 -08:00
Nikolaj Bjorner
3d8f75b3d8 enable on-clause with dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-18 16:59:02 -07:00
Nikolaj Bjorner
939bf1c725 wip - alpha support for polymorphism
An initial update to support polymorphism from SMTLIB3 and the API (so far C, Python).

The WIP SMTLIB3 format is assumed to be supporting the following declaration

```
(declare-type-var A)
```
Whenever A is used in a type signature of a function/constant or bound quantified variable, it is taken to mean that all instantiations of A are included in the signature and assertions.
For example, if the function f is declared with signature A -> A, then there is a version of f for all instances of A.
The semantics of polymorphism appears to follow previous proposals: the instances are effectively different functions.
This may clash with some other notions, such as the type signature forall 'a . 'a -> 'a would be inhabited by a unique function (the identity), while this is not enforced in this version (and hopefully never because it is more busy work).

The C API has the function 'Z3_mk_type_variable' to create a type variable and applying functions modulo polymorphic type signatures is possible.
The kind Z3_TYPE_VAR is added to sort discriminators.

This version is considered as early alpha. It passes a first rudimentary unit test involving quantified axioms, declare-fun, define-fun, and define-fun-rec.
2023-07-12 18:09:02 -07:00
THE Spellchecker
dc0887db5a
Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
Clemens Eisenhofer
4cb158a79b
User Propagator: Return if propagated lemma is redundant (#6791)
* Give users ability to see if propagation failed

* Skip propagations in the new core if they are already satisfied
2023-07-07 09:58:41 -07:00
Nikolaj Bjorner
68663fd97a fix indentation for python file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-06 09:02:58 -07:00
Nikolaj Bjorner
3782eb1be4 fix #6785
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-05 19:50:07 -07:00
Clemens Eisenhofer
82667bd86b
Fix UP's decide callback (#6707)
* Query Boolean Assignment in the UP

* UP's decide ref arguments => next_split

* Fixed wrapper

* More fixes
2023-06-02 09:52:54 +02:00
Manuel Carrasco
230306ddfc
Add solver::interrupt to Python's API. (#6739) 2023-05-28 21:04:36 +02:00
Nikolaj Bjorner
ccc4f2d382 fix #6682 2023-04-11 05:10:03 -07:00
Declan Hwang
cf4df08fd0
fix typo (#6628) 2023-03-09 09:29:30 -08:00
Frederick Robinson
be44ace995
fix typo (#6569) 2023-02-03 13:08:35 -08:00
Nikolaj Bjorner
19fed09122 protecting add_simplifier API against mis-use
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-02-01 08:35:32 -08:00
Nikolaj Bjorner
550619bfcf add API for creating and attaching simplifiers
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-31 17:06:03 -08:00
Nikolaj Bjorner
7d364bf786 Allow building AC functions without requiring arity check from API 2023-01-22 14:39:58 -08:00
Nikolaj Bjorner
523a3f34b0 change to manylinux2014 in setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-19 17:27:07 -08:00
Walden Yan
dbf93c5fbd
Fixing array select for lambda expressions in Python API (#6516)
* fix: making array select work for lambda expressions

* more elegant solution
2023-01-01 15:27:54 -08:00
Nikolaj Bjorner
f6d411d54b experimental feature to access congruence closure of SimpleSolver
This update includes an experimental feature to access a congruence closure data-structure after search.
It comes with several caveats as pre-processing is free to eliminate terms. It is therefore necessary to use a solver that does not eliminate the terms you want to track for congruence of. This is partially addressed by using SimpleSolver or incremental mode solving.

```python
from z3 import *
s = SimpleSolver()
x, y, z = Ints('x y z')
s.add(x == y)
s.add(y == z)
s.check()
print(s.root(x), s.root(y), s.root(z))
print(s.next(x), s.next(y), s.next(z))
```
2022-12-30 21:41:27 -08:00
Nikolaj Bjorner
ec74a87423 fix #6510
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-27 20:19:26 -08:00
Nikolaj Bjorner
8efaaaf249 Fix #6503
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-25 17:29:06 -08:00
Nikolaj Bjorner
cd3d38caf7 sort out terminology/add explanations, add shortcut to C++, fix #6491
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-13 16:17:38 -08:00
Nikolaj Bjorner
1434c7d394 #6059
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-09 08:50:32 -08:00
Nikolaj Bjorner
4a451b10d8 add custom coercion for floats. fix #6482
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-07 09:07:13 -08:00
Nikolaj Bjorner
ff68df3451 update output of z3 doc 2022-11-08 16:10:50 -08:00
Nikolaj Bjorner
07dd1065db added API to monitor clause inferences
See RELEASE_NOTES for more information
examples pending.
2022-10-19 08:34:55 -07:00
Nikolaj Bjorner
541aba308c fix #6401
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-17 10:27:15 -07:00
Bruce Mitchener
42f5047463 cmake: Cleanup remnants of workaround for USES_TERMINAL.
In older versions, this was dependent upon the version of cmake,
but when it was updated for newer cmake, these remnants were
left.
2022-08-02 17:39:10 +03:00
Nikolaj Bjorner
cd7ef11593 add decide callbacks to propagator API
this is an intermediary state. The decide_eh is only partially implemented.
2022-07-27 04:28:41 +02:00
Nikolaj Bjorner
5c2c0ae900 force-push on new_eq, new_diseq in user propagator, other fixes to Python bindings for user propagator
This update allows the python bindings for user-propagator to handle functions that are declared to be registered with the user propagator plugin. It fixes a bug in UserPropagateBase.add to allow registering terms dynamically during search.
It also fixes a bug in theory_user_propagate as scopes were not fully pushed when the solver gets the callbacks for new equalities and new disequalities.
It also adds equality and disequality interfaces to the sat/smt solver version (which isn't being exercised in earnest yet)
2022-07-25 03:42:29 +02:00
Nikolaj Bjorner
4368ec9953 startswith
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-22 11:53:07 -07:00