3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 09:55:19 +00:00
Commit graph

266 commits

Author SHA1 Message Date
Nikolaj Bjorner 16448104eb add new model event handler for incremental optimization 2021-02-05 17:11:04 -08:00
Nikolaj Bjorner d2abc9ed0f remove comment #4956
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-21 22:18:24 -08:00
pcarbonn 0eb04df834
fix #4956 (#4958) 2021-01-21 22:16:49 -08:00
Nikita Leshenko d8eba2d72f
scripts/update_api: Replace Z3_LIBRARY_DIRS with Z3_LIB_DIRS (#4915)
The error message that is printed when libz3.so can't be loaded contains
incorrect instruction to set `Z3_LIBRARY_DIRS` builtin. The correct variable
name is `Z3_LIB_DIRS`.

Signed-off-by: Nikita Leshenko <nikita@leshenko.net>
2020-12-26 12:27:10 -08:00
Sergey Vladimirov 7f0b5bc129
Allow to skip System.loadLibrary() calls from Java Native class (#4667) 2020-08-28 07:30:26 -07:00
Nikolaj Bjorner 96f10b8c1c user propagator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-22 19:01:04 -07:00
Nikolaj Bjorner 2d5b749745 extend solver callbacks with methods
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-21 19:24:59 -07:00
Nikolaj Bjorner 080be7a2af merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-21 12:14:28 -07:00
Nikolaj Bjorner 4857d60c99 user propagator over the API 2020-08-18 21:53:02 -07:00
Lev Nachmanson d3c00ca2c3 change mode to executable to some py files
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-05-16 14:12:16 -07:00
Lev Nachmanson 08940cff8f comment out the call to nra_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-05-15 11:26:40 -07:00
Phillip Schanely a20d4fa362 Use the latin-1 codec instead of ascii in Python bindings.
The latin-1 codec maps byte values 0-255 to unicode codepoints 0-255.
The ascii codec only maps the lower half of that range.
2020-03-05 21:52:22 -08:00
Nikolaj Bjorner 80c98dfb1f avoid const in ml
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-02-27 10:40:10 -08:00
Nikolaj Bjorner a65efb682b avoid const in ml
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-02-27 10:40:10 -08:00
jeff 6330bf7d25 fix z3 library search order 2020-02-26 20:56:51 -08:00
Nikolaj Bjorner 833b54a12c fix dotnet build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-02-26 09:44:21 -08:00
Nikolaj Bjorner f0689546f3 return non-escaped string value for Python #3080
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-02-26 09:16:23 -08:00
Nikolaj Bjorner f70696d8e7 reduce contention #2842
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-06 20:10:11 -08:00
Nikolaj Bjorner 7e174f50c1 use Z3_char_ptr
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-08 09:14:10 -07:00
Nikolaj Bjorner f4b803de95 expose mk_divides over API. Corresponds to a = b (mod m), #723
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-08 08:46:49 -07:00
Nikolaj Bjorner 79d4502771 atomics for #2565
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-25 20:22:35 -07:00
Nikolaj Bjorner df2f0416e2 undo atomic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-17 21:56:28 -04:00
Nikolaj Bjorner c68cfe878e #2565 use atomic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-17 18:15:19 -07:00
Nikolaj Bjorner 74631265b9 remove stale assertions due to lambda #2446
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-07-30 14:32:06 +08:00
Audrey Dutcher c2cb2c9fad python bindings: add core functions with _bytes suffix that do not decode strings 2019-02-18 23:59:27 -07:00
Audrey Dutcher 591abead4b Revert "Don't delete the reference to the native library in the python bindings"
This reverts commit 3339be6d22.
2019-02-18 23:51:11 -07:00
Audrey Dutcher 3339be6d22 Don't delete the reference to the native library in the python bindings 2019-02-10 14:05:45 -08:00
Bruce Mitchener 51a947b73d Change how 64 bit builds are detected.
Instead of doing this at configure time, we look at the actual
compile time status. This also avoids hardcoding checks based on
what CPU architecture is present, which doesn't work when Z3 is
being built on non-x86_64 platforms.
2018-12-09 16:16:20 +07:00
Nikolaj Bjorner eea9b79035
Merge pull request #1975 from Bronsa/null_wrapped
Guard against null wrapped functions in OCaml API
2018-11-27 10:44:20 -08:00
Nicola Mometto ad49c3269a Guard against null wrapped functions in OCaml API 2018-11-27 18:11:29 +00:00
Nicola Mometto 21158d87e3 override n_mk_config in ml bindings to catch exception path 2018-11-27 12:31:00 +00:00
Bruce Mitchener edf8ba44d1 Switch from using Z3_bool to using bool.
This is a continuation of the work started by using stdbool and
continued by switching from Z3_TRUE|FALSE to true|false.
2018-11-20 11:27:09 +07:00
Nikolaj Bjorner 1bf934e53a
Merge pull request #1918 from c-cube/ocaml-release-gc
feat(api/ml): release runtime lock on some long-running functions
2018-11-06 15:03:30 -08:00
Simon Cruanes 9121c74c9f feat(api/ml): release runtime lock on some long-running functions 2018-11-06 16:23:18 -06:00
Nikolaj Bjorner 52801db3fd more dotnet core prepration
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-22 16:28:01 -07:00
Nikolaj Bjorner c247abfc65 prepare js output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-08-03 22:13:25 -07:00
Nikolaj Bjorner fed977b492 fix #1782
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-08-02 10:08:16 -07:00
Nikolaj Bjorner 1cb3f7c792 fixing #1520
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-28 18:03:13 -07:00
Nikolaj Bjorner 0d4b4b30b1 change storage layout of .Net binding Z3_bool to byte to deal with uninitialized memory reads on larger allocation sizes. Bug introduced when switching from defining Z3_bool as int to the bool type from stdbool
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-02 02:58:06 -07:00
Nikolaj Bjorner f1d27cd487 workaround non-deterministic behavior of is_irrational_numeral test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-29 18:16:32 -07:00
yxliang01 f7bcf0fd58 Z3 now will also try to find libz3 in PYTHONPATH 2018-04-24 08:17:20 -07:00
Bruce Mitchener 16a2ad9afd Use stdint.h for int64_t / uint64_t in API.
Now that we can use stdint.h, we can use it to portably define
64 bit integer types for use in the API.
2018-03-30 23:06:24 +07:00
Nikolaj Bjorner 76dec85c93 use stdbool #1526 instead of int
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-27 15:41:53 -07:00
Nikolaj Bjorner 1992749e78 to ascii or not to ascii #1447
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-01-07 18:52:00 -08:00
Nikolaj Bjorner 61d149a724 fix java build problem with bool arrays
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-15 16:18:18 -08:00
Nikolaj Bjorner 795e0c641a add method to create bit-vectors directly from an array of Booleans
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-15 14:44:59 -08:00
Christoph M. Wintersteiger 17bcb37cf1 Fixed error handlers in Python API. 2017-11-08 20:09:18 +00:00
Christoph M. Wintersteiger bf563bbd5f Fixed default library path order in Python API. 2017-11-08 17:29:40 +00:00
Christoph M. Wintersteiger ef800d7b93 Fixed library path order in Python API. 2017-11-08 17:20:25 +00:00
Christoph M. Wintersteiger d2c5e0e76a Fixed problems arising from unfortunate object destruction order in the Python API. Fixes #989. 2017-11-08 16:36:47 +00:00
Dan Liew a2d7b43554 Update header includes to be relative to src/ directory. 2017-08-17 18:26:53 +01:00
Nikolaj Bjorner 086ea7867e another stab at #989
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-14 12:52:25 -07:00
Nikolaj Bjorner 8fdf3177da add initialization to unused parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 14:06:29 -07:00
Nikolaj Bjorner 45e31b0db3 add dummy initialization to unused variables to avoid compiler warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-28 10:17:46 -07:00
Nikolaj Bjorner ca67274519 another round of fix for #989 to avoid problems with doxygen generation (TravisCI build failure)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 12:59:34 -07:00
Nikolaj Bjorner af47aa0120 updated suspenders for #989
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 12:32:44 -07:00
Nikolaj Bjorner b902018373 add suspenders for #989
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 11:56:01 -07:00
Nikolaj Bjorner 2e3a5a2060 attempt at addressing #989 by referencing _lib directly instead of over lib() in function calls
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 11:03:18 -07:00
George Karpenkov dbdb0307db Free allocated char arrays in JNI API
Fixes #886
2017-03-01 15:22:15 +01:00
martin-neuhaeusser 0e966f21ff Fix off-by-one bug in array indexing in the OCaml bindings
This patch fixes an off-by-one bug that occurred in the construction of output arrays
in the OCaml bindings.
2017-01-30 17:28:24 +01:00
Nikolaj Bjorner a0a81fc2d7 add format #879
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-26 08:37:37 -08:00
Daniel Perelman f7ebe16046 Omit '.dll' from library name for DllImport. 2017-01-11 16:56:28 -08:00
Christoph M. Wintersteiger d8d869822f Cleaned up #include<iostream> in api* objects. 2017-01-10 21:04:44 +00:00
Dan Liew 2e74a2c54e Refactor update_api.mk_ml() so that the source and output directories
can be different. This feature will be needed by the CMake build system
to build the OCaml bindings.
2016-12-19 21:05:17 +00:00
Kevin Chung e16577ff61 Making z3 python look in its installation directory for the z3 lib 2016-12-18 17:27:55 -05:00
Christoph M. Wintersteiger 5dec919217 Remove unnecessary "unsafe" qualifier on internal .NET API class. 2016-10-06 16:36:19 +01:00
Andrew Dutcher 7816c53352 allow python to load libz3 using loader's default search 2016-09-28 21:05:55 -07:00
Andrew Dutcher 02217d048b replace all non-portable filepath slashes with os.path.join 2016-09-14 14:19:10 -07:00
Andrew Dutcher cb83c42100 Make python stuff live in a python directory in the build tree 2016-09-14 01:49:16 -07:00
Andrew Dutcher 704105306c FINISH IT 2016-09-14 01:40:01 -07:00
Andrew Dutcher 0bbd172af3 First steps to a sane python build 2016-09-14 01:37:04 -07:00
Andrew Dutcher fa6cc19184 Moved python bindings into package 2016-09-14 01:33:07 -07:00
martin-neuhaeusser f069b1c0e9 Make C-layer of OCaml bindings C89 compatible.
This patch ensures that the C code generated for the OCaml stubs complies with C89. It is needed to compile Z3 with OCaml support with Visual Studio versions older than VS2013.
2016-06-10 16:49:06 +02:00
Martin R. Neuhaeusser 436113896d Fix typo in OCaml bindings 2016-04-19 12:51:16 +02:00
Martin R. Neuhaeusser 6889767c9a Fix bug in OCaml API where double values have been wrapped incorrectly.
This patch fixes a segmentation fault that occurs due to incorrect
wrapping of double values in the OCaml API.
2016-04-19 10:10:28 +02:00
Martin R. Neuhaeusser 67ac1a003e Avoid conversion between mutable arrays and lists in OCaml API.
This patch eliminates the conversion between OCaml arrays and lists
from Z3's OCaml API.
2016-04-18 17:20:27 +02:00
martin-neuhaeusser b873c6b508 Simplify OCaml API
This patch simplifies the implementation of the OCaml bindings. For example,
the applyX wrapper functions have become unnecessary in the new OCaml API.
It also removes the internal ML2C structure that was used as an intermediate
layer between the C and the OCaml layer.
2016-04-06 12:10:59 +02:00
martin-neuhaeusser f133f478c8 Translate correctly between OCaml option values and NULL pointers
This patch refactors the update_api script and the z3.ml implementation
to properly translate between OCaml options and NULL pointers. Some
unifications and simplifications (avoidance of unnecessary value allocation)
in the script that creates the native bindings.
2016-04-04 17:16:15 +02:00
martin-neuhaeusser b85516c271 Fix reference counting in the C layer of the OCaml bindings
The Z3 context and its reference counters are stored in a structure which is allocated
by the C layer outside the OCaml heap, whenever a Z3 context is created. The structure
and its Z3 context are disposed, once the last reference counter reaches zero. Reference
counters are decremented by C-level finalizers.

The OCaml representations for a Z3 context wrap only a pointer to the corresponding structure.
2016-04-03 09:41:06 +02:00
Martin R. Neuhaeusser feae0e8277 Use a custom block for storing a Z3_config in the ML bindings. 2016-03-31 18:31:59 +02:00
Christoph M. Wintersteiger cfda8e9e03 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-08 14:32:30 +00:00
Dan Liew 589227235e Try to improve some of the comments in `scripts/update_api.py`
based on discussion in #461.
2016-03-07 18:45:34 +00:00
Christoph M. Wintersteiger 3968423c26 build fix for ML API 2016-03-07 15:35:25 +00:00
Christoph M. Wintersteiger 0ea2ac3f28 API script fix 2016-03-07 14:21:33 +00:00
Christoph M. Wintersteiger 027331aef2 resolved merge conflicts 2016-03-07 14:20:10 +00:00
Dan Liew 1d9a7dcf47 Add missing shebang in `scripts/update_api.py`. The script
was already marked as executable but it wasn't possible to execute
from a shell due to the missing shebang.
2016-03-04 15:31:56 +00:00
Dan Liew f6e946443e Made emission of the API module files `api_log_macros.h`,
``api_log_macros.cpp`` and ``api_commands.cpp`` optional in
``update_api.py``. This is required to implement support for
building and installing Z3's API bindings with CMake.
2016-03-04 15:26:09 +00:00
Dan Liew db34baa979 Partially refactor the code in `update_api.py` so that it can
be used as a script for other build systems and is callable via
a new ``generate_files()`` function from ``mk_util.py``. This removes
the horrible ``_execfile()`` hack that was previously in ``mk_util.py``.

Unfortunately lots of bad code is still in ``update_api.py`` but
fixing all of its problems is too much work right now.
2016-03-04 15:26:09 +00:00
Christoph M. Wintersteiger c9a5676346 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-04 15:15:16 +00:00
Christoph M. Wintersteiger cf5910e041 typos 2016-03-04 15:08:03 +00:00
Christoph M. Wintersteiger 62cae4186b ML API bug fixes 2016-02-15 12:54:05 +00:00
Christoph M. Wintersteiger b99fcb9c8a More new OCaml API 2016-02-14 19:56:22 +00:00
Christoph M. Wintersteiger 824169da0a New OCaml API 2016-02-13 22:09:45 +00:00
Nikolaj Bjorner 9c6271dded add debugging facilities for github issues #384 #367
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-22 10:43:18 -08:00
Christoph M. Wintersteiger d5f79c1f17 build fix for ML API 2015-12-12 19:30:25 +00:00
Nikolaj Bjorner 2122fdee45 fix build script for update to name of get_error_msg
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-19 08:33:27 -08:00
Nikolaj Bjorner 1d4b996765 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-18 16:39:51 -08:00
Christoph M. Wintersteiger 706a037bf4 Python 3.x string decoding fix 2015-11-16 15:16:50 +01:00
Nikolaj Bjorner bea68cd194 remove deprecated API functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-14 17:05:15 -08:00
Christoph M. Wintersteiger 05eb78ccac fix for string decoding in build scripts 2015-11-14 15:42:49 +00:00