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

2108 commits

Author SHA1 Message Date
CEisenhofer 3557e0b0c5
Added eq/fixed/final functions in C++ user propagator as methods (#5607) 2021-10-19 10:48:31 -04:00
Simon Cruanes 6302b864c8
tweak GC in OCaml bindings (#5600)
* feat(api/ml): use custom block hints to guide the GC

this forces the GC to collect garbage when a few _large_ objects
(solver, etc.) are dead. The current code would let arbitrarily many
such objects die and not trigger a GC (which would have to come from
OCaml code instead)

* tuning

* try to use caml_alloc_custom_mem with fake sizes

* try to fix leak by explicitly finalizing OCaml context

* chore: use more recent ubuntu for azure CI

* remove finalizer causing segfault in example
2021-10-14 12:46:14 -07:00
Nikolaj Bjorner ff723f15ff Update z3++.h 2021-09-29 12:19:02 -07:00
Nikolaj Bjorner 3abecc3428 add extra commands to API parser 2021-09-27 14:19:43 -07:00
Jamey Sharp 426306376f
CNF conversion refactoring (#5547)
* split sat2goal out of goal2sat

These two classes need different things out of the sat::solver class,
and separating them makes it easier to fiddle with their dependencies
independently.

I also fiddled with some headers to make it possible to include
sat_solver_core.h instead of sat_solver.h.

* limit solver_core methods to those needed by goal2sat

And switch sat2goal and sat_tactic over to relying on the derived
sat::solver class instead. There were no other uses of solver_core.

I'm hoping this makes it feasible to reuse goal2sat's CNF conversion
from places like the tseitin-cnf tactic, so they can be unified into a
single implementation.
2021-09-20 08:53:10 -07:00
CEisenhofer c58b2f4a9c
Added character functions to API (#5549)
* Added character functions to API

* Changed names of c++ functions
2021-09-15 13:34:58 +01:00
Nikolaj Bjorner 55285b2193 make it easier to iterate over arguments of an application
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-02 09:51:59 -07:00
Nikolaj Bjorner ba68fba419 build 2021-09-01 17:10:23 -07:00
Nikolaj Bjorner 0c53c139da add to_string method to make it easier to use without << 2021-09-01 15:37:58 -07:00
Nikolaj Bjorner f91c3d9fd6 round-tripping escapes, again #5519 2021-08-31 20:36:38 -07:00
Nikolaj Bjorner 90f98d5791 fix part of #5519
generation of escape sequences for output was not handling non-printable character ranges correctly and also not offsetting hexadecimal characters right.
2021-08-31 20:06:06 -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
Nuno Lopes 9b5ec6d004 logging cleanup
move everything out-of-line as common path doesn't log
fix some race conditions on file ptr vs enable_logging vars
2021-08-29 12:24:19 +01:00
Nuno Lopes 9a172939e0 fix logging in Z3_fpa_get_[es]bits 2021-08-29 10:58:54 +01:00
Nikolaj Bjorner b1bc890992 fix #5515
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-28 18:05:51 -07:00
Nuno Lopes e5a2f08cc9 fix logging of Z3_mk_lambda and Z3_mk_lambda_const
In preparation of a bug report just for you @NikolajBjorner
2021-08-29 00:37:45 +01:00
Nikolaj Bjorner 828fc72754 types
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-26 18:55:53 -07:00
Nikolaj Bjorner d6848175eb re-add API for creating propagator from a context for "fresh" 2021-08-26 18:12:40 -07:00
Nikolaj Bjorner f7c1ed8273 missing this
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-26 10:41:37 -07:00
Nikolaj Bjorner 4d39af3d7b #5507 missing init 2021-08-26 09:37:06 -07:00
Nikolaj Bjorner 5fa1b0b09f update project description #5503 2021-08-24 09:48:33 -07:00
Nikolaj Bjorner 592c53e46d char sort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-23 20:45:26 -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 15e3e81cb5 remove likely culprit for #5493
@zwimer: I had to remove a different move constructor before in the same API due to a different bug that the coverage tool exposed. I was unable to reproduce the bug reported in #5493 in my environment, but the interaction with reference counting and move constructors is sufficiently opaque that I rather not have to fix more bugs introduced with move constructors in the API. I am therefore removing also this use of && and maybe this fixes #5493
2021-08-19 21:08:20 -07:00
Nikolaj Bjorner d980ee0533 fix regression in FPNumRef sign 2021-08-18 10:00:22 -07:00
Nikolaj Bjorner 7f88cfe727 build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-17 10:10:20 -07:00
Nikolaj Bjorner 1884ad5b2f expose method for updating python model for constants
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-17 09:09:04 -07:00
Nikolaj Bjorner c8a83749dd #5484 2021-08-16 11:19:22 -07:00
Nikolaj Bjorner 2704fb5fd5 expose n-ary xor 2021-08-14 10:52:09 -07:00
intrigus-lgtm 35698c650d
Add AssertSoft String overload for Java Api (#5475)
This adds a String overload for AssertSoft.
Previously only integer weights could have been used,
limiting the user. With Strings the user can now use
e.g. Java's BigInteger class converted to a String instead.
2021-08-12 09:18:18 -07:00
Nikolaj Bjorner 38250fc304 re-move #5442 2021-07-29 15:33:30 -07:00
Nikolaj Bjorner 79296d8dfc proviso for different life-time of objects allocated in arguments. 2021-07-27 09:09:21 -07:00
Nikolaj Bjorner 5964b26ca2 err 2021-07-27 09:07:34 -07:00
Nikolaj Bjorner 7cb4932ae8 fix #5435 2021-07-27 09:04:29 -07:00
Nikolaj Bjorner 0ba518b0c0 avoid perf abyss for macros
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-20 20:07:06 -07:00
CEisenhofer 0fa4b63d26
Added sbv2s (#5413)
* Added sbv2s

* Fixed indention

Co-authored-by: Clemens Eisenhofer <Clemens.Eisenhofer@tuwien.ac.at>
2021-07-16 17:58:28 +02:00
Nikolaj Bjorner 79c261736b charsort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-13 19:50:41 +02:00
Nikolaj Bjorner 97a035fd6d add char sort to .net
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-13 19:43:12 +02:00
Nikolaj Bjorner 1b648437b7 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-13 17:42:34 +02:00
Nikolaj Bjorner a3010c8875 version inc, bvsort->bitvecsort 2021-07-13 17:14:47 +02:00
Nikolaj Bjorner 7ae78da850 adding access to characters over API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-13 15:56:08 +02:00
Marc Mosko 8a33391708
Expose optimize.assertAndTrack to Java (#5387)
Co-authored-by: Marc Mosko <mmosko@parc.com>
2021-07-06 01:22:00 -07:00
Gabriel Radanne 0c7625cd26
Remove size argument in OCaml's Z3.mk_re_intersect (#5383)
* Remove size argument in OCaml's `Z3.mk_re_intersect`

Passing the size as argument is unnecessary in OCaml, and that argument is abridged in all similar `Seq` functions. This applies the same pattern.

* Enable the ocaml documentation in Seq.

Turn all the comments into proper documentation comments.
2021-07-06 01:21:04 -07:00
Nikolaj Bjorner 7255a2afd1 fix #5379
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-05 18:43:11 +02:00
Nikolaj Bjorner f3737f6831 #5361 2021-06-21 14:58:00 -07:00
Gram 589f99eea9
Fix Flake8 violations in Python API (#5332)
* Fix flake8 violations in z3.py

* Fix flake8 violations in z3printer.py

* Fix flake8 violations in z3rcf.py and z3util.py

* do not allocate list on every call to set_default_rounding_mode
2021-06-16 10:49:47 -05:00
Nikolaj Bjorner 9c6b29164d #5337
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-15 12:31:40 -05:00
Nikolaj Bjorner 3e773fba5e get-universe
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 21:07:48 -07:00
Gram 3d8865d925
Fix some PEP-8 violations in Python code (#5295)
* reformat python code using autopep8

* manually wrap some too long lines and adjust some checks

* run autopep8 in aggressive mode

* run autopep8 in very aggressive mode

* manually reformat z3types.py

* unify: use double quotes

* use sys.version_info instead of sys.version

* drop accidentally commited src/util/z3_version.h
2021-05-23 10:27:55 -07:00
Nuno Lopes f1e0d5dc8a remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00