Nikolaj Bjorner
81cb575c22
simplify
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-19 22:58:12 -07:00
Nikolaj Bjorner
2e52029114
add command-line overwrite capability to setup.py
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-19 22:53:25 -07:00
Nikolaj Bjorner
2c8df54b70
enable fresh for python wrapper for user-propagator
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-19 13:48:44 -07:00
Nikolaj Bjorner
815518dc02
add facility for incremental parsing #6123
...
Adding new API object to maintain state between calls to parser.
The state is incremental: all declarations of sorts and functions are valid in the next parse. The parser produces an ast-vector of assertions that are parsed in the current calls.
The following is a unit test:
```
from z3 import *
pc = ParserContext()
A = DeclareSort('A')
pc.add_sort(A)
print(pc.from_string("(declare-const x A) (declare-const y A) (assert (= x y))"))
print(pc.from_string("(declare-const z A) (assert (= x z))"))
print(parse_smt2_string("(declare-const x Int) (declare-const y Int) (assert (= x y))"))
s = Solver()
s.from_string("(declare-sort A)")
s.from_string("(declare-const x A)")
s.from_string("(declare-const y A)")
s.from_string("(assert (= x y))")
print(s.assertions())
s.from_string("(declare-const z A)")
print(s.assertions())
s.from_string("(assert (= x z))")
print(s.assertions())
```
It produces results of the form
```
[x == y]
[x == z]
[x == y]
[x == y]
[x == y]
[x == y, x == z]
```
Thus, the set of assertions returned by a parse call is just the set of assertions added.
The solver maintains state between parser calls so that declarations made in a previous call are still available when declaring the constant 'z'.
The same holds for the parser_context_from_string function: function and sort declarations either added externally or declared using SMTLIB2 command line format as strings are valid for later calls.
2022-07-01 20:27:18 -07:00
Nikolaj Bjorner
f24c5ca99a
#6095
...
arrays that are interpreted using as-array should be reflected back to store expressions
2022-06-21 12:42:44 -07:00
Dominic Steinhöfel
46bc726391
Better error message for mismatching sorts in substitutions in z3.substitute ( #6093 )
2022-06-13 13:46:30 -07:00
Nikolaj Bjorner
e468386359
#5656
...
guard __del__ operator by checking if library was unloaded.
2022-06-08 09:59:29 -07:00
Christoph M. Wintersteiger
33454193d4
Change FP default rounding mode in the Python API
2022-06-04 08:45:52 +01:00
Nikolaj Bjorner
15c47808d6
#6059
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-30 11:03:50 -07:00
Nikolaj Bjorner
7da9f12521
expose description of global parameters #6048
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-27 08:50:40 -04:00
Nikolaj Bjorner
f6b2874d7c
update to take effect of def_API for callback functions
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-16 10:30:54 -07:00
John Jones
361888f299
Generate bdist wheels for musllinux_1_1 ( #6025 )
2022-05-09 14:13:08 -07:00
Nikolaj Bjorner
b3e0213cab
missing object ref
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-02 12:35:28 -07:00
Nikolaj Bjorner
9b66d8600b
add shortcut to serialize/deserialize based on question at FV hangout
...
use case
```
from z3 import *
x, y = Ints('x y')
s = (x + y).serialize()
y = deserialize(s)
print(y)
```
2022-04-19 07:21:22 +02:00
Nikolaj Bjorner
8e70112832
Update z3.py
...
allow ading funcinterp to models
2022-04-15 23:31:15 +02:00
Zachary Wimer
9ecd4f8406
MANIFEST.in will now include pyproject.toml ( #5979 )
2022-04-15 19:53:16 +02:00
Zachary Wimer
7d47e45c6b
Add a hacky patch so that Z3 on M1 hardware can link to libs properly ( #5974 )
...
* Add a hacky patch so that Z3 on M1 hardware can link to libs properly
* Update setup.py
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-15 09:57:51 +02:00
Nikolaj Bjorner
ddbe17d581
#5965
...
define the is_bool on ArithSortRef
2022-04-13 16:08:54 +02:00
Zachary Wimer
c0b455e010
Add cmake setup.py build dep ( #5972 )
...
* Add wheel as build dependency
* Add cmake as a python build dependency
* pyproject toml update
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-13 08:48:08 +02:00
Zachary Wimer
9834d7aae0
Setup.py fix dependencies ( #5971 )
...
* Add wheel as build dependency
* pyproject toml update
2022-04-13 08:31:24 +02:00
Audrey Dutcher
032768b0fc
setup.py: copy generated python files correctly ( #5975 )
2022-04-13 08:29:36 +02:00
Nikolaj Bjorner
c996a66da0
separate pre-processing, add callback parameter to push/pop in python API
2022-04-11 17:05:59 +02:00
Nikolaj Bjorner
005b8e3cf8
arc -> arch
2022-04-09 08:28:22 +02:00
Nikolaj Bjorner
c98eda03f7
nightly osx arm64 wheel
2022-04-09 06:55:31 +02:00
Nikolaj Bjorner
f3789e21a3
id doesn't use mk_util
2022-04-08 14:42:18 +02:00
Nikolaj Bjorner
bbb27775ed
ensure that objects in callback are of sort Ast.
2022-03-20 11:24:42 -07:00
Nikolaj Bjorner
b5b9c85c40
call it UbuntuBuild
2022-03-19 15:24:53 -07:00
Nikolaj Bjorner
cfe02edda5
remove stale return
2022-03-19 12:26:48 -07:00
Nikolaj Bjorner
3e51b69a9a
no fun!
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:03:02 -08:00
Nikolaj Bjorner
2e00f2f32d
Propagator ( #5845 )
...
* user propagator without ids
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* user propagator without ids
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* fix signature
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* references #5818
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* fix c++ build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* switch to vs 2022
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* switch 2022
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* Update propagator example (I) (#5835 )
* fix #5829
* na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* switch to vs 2022
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* Adapted the example to the changes in the propagator
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* context goes out of scope in stack allocation, so can't used scoped context when passing objects around
* parameter check
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* add rewriter
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* Fixed bug in user-propagator "created" (#5843 )
Co-authored-by: Clemens Eisenhofer <56730610+CEisenhofer@users.noreply.github.com>
2022-02-17 09:21:41 +02:00
Nikolaj Bjorner
33985ebcf5
update expected
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-16 19:14:54 +02:00
Nikolaj Bjorner
07d02ea415
fix #5829
2022-02-09 12:08:36 +02:00
Nikolaj Bjorner
1c10ce4070
#5815 - surface multi-arity arrays over python API
2022-02-06 08:40:56 +02:00
Nikolaj Bjorner
8a84cacfea
add tuple support for __getitem__ #5815
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-06 04:02:12 +02:00
Nikolaj Bjorner
dfe2b27f9a
#5773
2022-01-12 13:28:15 -08:00
Nikolaj Bjorner
d3bc11dd3a
bvs have to be expressions
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-10 12:38:25 -08:00
Nikolaj Bjorner
21feefeac5
Add character access functions #5764
2022-01-10 12:33:58 -08:00
Nikolaj Bjorner
cf08cdff9c
#5747
2022-01-03 08:54:54 -08:00
Anton Kochkov
f11fcec082
Migrate from deprecated distutils.sysconfig
in scripts ( #5729 )
2021-12-22 07:59:13 -08:00
Nikolaj Bjorner
7a6070506d
#5727
...
Expose diff function,
expose allchar in Java API
expose op codes for replace/re/all
2021-12-20 10:17:06 -08:00
Nikolaj Bjorner
b85f2f7e86
#5704
2021-12-12 21:10:07 -08:00
Nikolaj Bjorner
99d5215956
revert use of f format
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-19 00:01:19 -08:00
Nikolaj Bjorner
f83367a11e
mac builds
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-18 22:39:30 -08:00
Nikolaj Bjorner
518ef9f916
fix #5674
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-18 21:14:50 -08:00
Nikolaj Bjorner
3a9656bc59
fixing issues with user propagator from python
...
"fresh" remains broken (not working yet).
2021-11-07 17:04:11 -08:00
Nikolaj Bjorner
f91c3d9fd6
round-tripping escapes, again #5519
2021-08-31 20:36:38 -07:00
pcarbonn
cd2701da0c
fix the use of ctx in Q() ( #5521 )
...
* fix #4956
* fix: use ctx in Q()
2021-08-31 10:01:47 -07:00
Nikolaj Bjorner
5fa1b0b09f
update project description #5503
2021-08-24 09:48:33 -07:00
Nikolaj Bjorner
170ef1dcca
add character sort to Python API and allchar function to API for ease. #5500
2021-08-23 20:02:50 -07:00
Nikolaj Bjorner
d980ee0533
fix regression in FPNumRef sign
2021-08-18 10:00:22 -07:00