3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-18 06:39:02 +00:00
Commit graph

2340 commits

Author SHA1 Message Date
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 c131eb4db1 build fix 2022-04-16 16:42:45 +02:00
Nikolaj Bjorner f4c500c519 fix build
reference types are not part of C
2022-04-16 15:16:53 +02:00
Nikolaj Bjorner 8e70112832 Update z3.py
allow ading funcinterp to models
2022-04-15 23:31:15 +02:00
Simon Cruanes 11d992a335
wip: tweak GC further (#5982) 2022-04-15 20:08:39 +02:00
Clemens Eisenhofer e11496bc65
Added decide-callback to user-propagator (#5978)
* Fixed registering expressions in push/pop

* Reused existing function

* Reverted reusing can_propagate

* Added decide-callback to user-propagator

* Refactoring

* Fixed index
2022-04-15 20:07:17 +02:00
Zachary Wimer 9ecd4f8406
MANIFEST.in will now include pyproject.toml (#5979) 2022-04-15 19:53:16 +02:00
Nikolaj Bjorner 3cc9d7f443 improve pre-processing 2022-04-15 12:55:26 +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
Nikolaj Bjorner c9fa00aec1 expose recursive functions with own op-code over API 2022-04-13 11:24:24 +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 eb2dd92d37 Merge branch 'master' of https://github.com/z3prover/z3 2022-04-11 17:06:03 +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
Clemens Eisenhofer b0d8b27f37
Fixed registering expressions in push/pop (#5964)
* Fixed registering expressions in push/pop

* Reused existing function
2022-04-11 16:50:13 +02:00
Frédéric Bour f43d9d00d4
Z3_add_rec_def body is not a macro (#5963) 2022-04-11 13:38:20 +02:00
Nikolaj Bjorner 011c1b2dd2 remove refs to bare_str 2022-04-09 12:06:27 +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
fleisherdev ac2523af82
Fix null ref on access of Entry[] contents (#5947)
Co-authored-by: jfleisher <jofleish@microsoft.com>
2022-04-06 05:37:51 +02:00
Nikolaj Bjorner 3828130791 fix #5922 use 0u to help type inference
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-24 14:05:14 -10:00
John Fleisher ce04c16a6f
Jfleisher/nightlynuget (#5916)
* WiP: Test nightly version number change

* Fix debug assert

* WiP: test nuget publish to AzDo feed for nightly build

* WiP: Make Nuget deploy separate stage

* WiP: fix nightly stage name

* change nuget push to vstsfeed

* Try case sensitive name for artifacts

* WiP: use artifact folder names

* add Rev version to package

* WiP: build def variation on nightly build version

* WiP: use Build_BuildNumber and Build_DefinitionName

* WiP: using hyphen in nightly version

* Tag nightly packages with datetime

* fix commit

* Build.BuildId and Build.DefinitionName

* WiP: change suffix format to lead with alpha

* test z3public feed publish

* revert public publish test

* WiP: test build# versioning scheme

* WiP: another variant on version number for nightly

Co-authored-by: jfleisher <jofleish@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-22 12:19:58 -07: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 86af723db7 remove left-over debug output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-19 09:40:29 -07:00
Nikolaj Bjorner 41d1c34067 remove else case
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-17 12:33:15 -07:00
Nikolaj Bjorner 1fa373d6c2 old bug: unit of xor is false
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-17 08:21:22 -07:00
Matt Thornton 4e0a2f5968
Dispose of intermediate Z3Objects created in dotnet api. (#5901)
* Dispose of intermediate Z3Objects created in dotnet api.

* Set C# LangVersion to 8.0.

* Fix build errors.

* Fix warning about empty using statement.

* Fix Xor to only dispose of objects that it creates internally.
2022-03-17 08:08:05 -07:00
Nikolaj Bjorner 0b230ee703 move some functions to using var pattern #5900
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 16:29:54 -07:00
Nikolaj Bjorner a1517251dd call dispose on sorts #5900, missing charSort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 07:28:05 -07:00
Nikolaj Bjorner cd5e114ed3 call dispose on sorts #5900
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 07:24:33 -07:00
Nikolaj Bjorner cb9dcb799f add regex power to API and for Java per request
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 06:17:31 -07:00
Nikolaj Bjorner e1929ca9b9 add regex power to API and for Java per request
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-15 19:18:33 -07:00
Nikolaj Bjorner 706d7ea893 native context uses legacy mk_context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-15 16:01:05 -07:00
John Fleisher 97c7ce63b5
Clean up build warnings (#5884)
* Clean up warnings in compile for documentation notes

* remove snk from local build

Co-authored-by: jfleisher <jofleish@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-07 12:55:30 -08:00
Nikolaj Bjorner 882fc31aea doc strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:25:05 -08:00
Nikolaj Bjorner b0c0f4d1f4 fix #5876
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:07:45 -08:00
Nikolaj Bjorner 3e51b69a9a no fun!
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:03:02 -08:00
Nikolaj Bjorner 87e6f103c6 commenting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 14:00:07 -08:00
Nikolaj Bjorner 676ba78600 fix else case: it is first argument of const array
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 13:10:02 -08:00
John Fleisher 35d26bc282
NativeModel: TryGetArrayValue (#5881)
* WiP:  Disposable, MkAdd, MkApp, MkBool, MkBoolSort, MkBound, MkBvSort, MkFalse, MkTrue, MkIntSort

* WiP: Native z3 mk_ functions

* WiP: mk_ functions for NativeContext

* WiP: add utility functions for getting values

* WiP: Adding more native utility functions

* native model pull

* WiP: NativeContext additions for array access

* WiP: use Z3_symbol in place of managed Symbol

* WiP: add solver, model, and array methods

* WiP: MkSimpleSolver, MkReal

* WiP: GetDomain GetRange

* WiP: MkExists

* Override for MkFuncDecl

* MkConstArray, MkSelect

* WiP: code cleanup

* migrate Context reference to NativeContext

* remove local signing from PR

* minor code cleanup

* Sorts to properties, fix usings,

* make IntSort property

* sort using

* IntSort, RealSort - properties

* WiP: get array value update

Co-authored-by: jfleisher <jofleish@microsoft.com>
2022-03-03 13:06:30 -08:00
Nikolaj Bjorner 248a3676af na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:40:29 -08:00
Nikolaj Bjorner e1e8d15827 stub out array serialization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:38:23 -08:00
Nikolaj Bjorner cd324a4734 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:07:00 -08:00
Nikolaj Bjorner 8d1276fa60 using directives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:03:31 -08:00
John Fleisher a08be497f7
NativeContext, NativeSolver, NativeModel - updates for Pex (#5878)
* WiP:  Disposable, MkAdd, MkApp, MkBool, MkBoolSort, MkBound, MkBvSort, MkFalse, MkTrue, MkIntSort

* WiP: Native z3 mk_ functions

* WiP: mk_ functions for NativeContext

* WiP: add utility functions for getting values

* WiP: Adding more native utility functions

* native model pull

* WiP: NativeContext additions for array access

* WiP: use Z3_symbol in place of managed Symbol

* WiP: add solver, model, and array methods

* WiP: MkSimpleSolver, MkReal

* WiP: GetDomain GetRange

* WiP: MkExists

* Override for MkFuncDecl

* MkConstArray, MkSelect

* WiP: code cleanup

* migrate Context reference to NativeContext

* remove local signing from PR

* minor code cleanup

Co-authored-by: jfleisher <jofleish@microsoft.com>
2022-03-03 10:41:12 -08:00
Nikolaj Bjorner 811cd9d48d add example
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 09:14:47 -08:00
Nikolaj Bjorner ee18c5070c add stubs for injective function axioms, add some parameter functions 2022-03-03 09:09:03 -08:00
Nikolaj Bjorner 757cf7622d sketch ArrayValue, add statistics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-02 10:59:19 -08:00
Nikolaj Bjorner 80506dfdfa sketch ArrayValue, add statistics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-02 10:55:39 -08:00
Nikolaj Bjorner bf14aeb1bd stub out nativesolver 2022-03-02 10:06:38 -08:00
Nikolaj Bjorner 5f79a977fb use conventions from Context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 14:27:57 -08:00
Nikolaj Bjorner c812d1e890 update native func interp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 14:07:20 -08:00
Nikolaj Bjorner 61d2654770 quantifier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 13:18:18 -08:00
Nikolaj Bjorner deeb5e9921 finish NativeModel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 12:40:03 -08:00
Nikolaj Bjorner c0826d58bf add stubs for native model and func interp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 12:11:10 -08:00
Nikolaj Bjorner deaad86d6a nit 2022-03-01 12:11:10 -08:00
Clemens Eisenhofer 412b05076c
User-functions fix (#5868) 2022-02-26 09:21:01 -08:00
Nikolaj Bjorner 30a2f2fd9d initial stab at NativeContext 2022-02-25 07:56:36 -08:00
Nikolaj Bjorner ff5d210e81 na 2022-02-20 10:33:15 +02:00
Nikolaj Bjorner 9a1a72867c Add str.<= and str.< to Java API 2022-02-20 10:29:38 +02:00
Nikolaj Bjorner 7091b1c856 add additional regex operators to API 2022-02-20 10:29:18 +02: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
mbergen 2e15e2aa4d
Add access to builtin special relations (Context::mkLinearOrder and Context::mkPartialOrder ) to Java API (#5832)
* Add mkLinearOrder

* reorder arguments to match definition, add short comment

* add partial order

* add comments
2022-02-16 23:37:20 +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 e9dad84b85 update documentation comments 2022-02-06 03:35:32 +02:00
Nikolaj Bjorner a189ca8b60 truncation directive #5805 2022-01-31 10:50:46 -08:00
Nikolaj Bjorner a621041308 fix #5795
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-27 10:45:38 -08:00
Hennadii Chernyshchyk 85f6456655
Add missing constness (#5787) 2022-01-21 15:32:25 +01:00
Nikolaj Bjorner 36cfb88f5f add preliminary stub to handle closure types 2022-01-17 22:01:31 -08:00
Nikolaj Bjorner dfe2b27f9a #5773 2022-01-12 13:28:15 -08:00
Nikolaj Bjorner 08294d62e5 separate dependencies for qe_lite 2022-01-12 03:26:22 -08:00
Nikolaj Bjorner 2bcc814031 add macro to track closures declared in z3_api
This is to ease integration with external API wrappers that rely on accessing
information about type names that are used.
#5762
2022-01-12 02:47:39 -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
Kevin Gibbons 2b934b601d
Add WebAssembly/TypeScript bindings (#5762)
* Add TypeScript bindings

* mark Z3_eval_smtlib2_string as async
2022-01-09 17:16:38 -08:00
Nikolaj Bjorner 6013d5da47 #5755
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-07 14:05:06 -08:00
Nikolaj Bjorner 199daead50 remove Z3_bool_opt #5757
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-07 11:52:10 -08:00
Nikolaj Bjorner e943bee625 apply delcypher's todo
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-04 20:25:14 -08:00
Nikolaj Bjorner cf08cdff9c #5747 2022-01-03 08:54:54 -08:00
Nikolaj Bjorner e84ddb0d9a more #5746 2022-01-02 11:33:21 -08:00
Nikolaj Bjorner 88707f37e7 Better error reporting #5746 2022-01-02 11:31:50 -08:00
Nikolaj Bjorner fc77345bec breaking change. Enforce append semantics everywhere for parameter updates #5744
Replace semantics doesn't work with assumptions made elsewhere in code.
The remedy is to apply append (override) semantics for parameter changes.
2021-12-30 19:11:14 -08:00
Nikolaj Bjorner 95e26aaad9 #5742
expose access to constructors/accessors/recognizers given datatype sort
2021-12-28 11:00:34 -08:00
Anton Kochkov f11fcec082
Migrate from deprecated distutils.sysconfig in scripts (#5729) 2021-12-22 07:59:13 -08:00
Anton Kochkov f3af2193d0
Use Stdlib. instead of Pervasives. due to deprecation (#5730) 2021-12-22 07:53:47 -08:00
Nikolaj Bjorner e0d6e04493 fix c++
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-20 16:09:39 -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 6a039c2700 Update z3++.h
simplify definition
2021-12-19 11:53:01 -08:00
Nikolaj Bjorner bee742111a na 2021-12-19 11:05:19 -08:00
Nikolaj Bjorner 7441bd706b na 2021-12-19 10:57:42 -08:00
Nikolaj Bjorner 85e362277c Update z3++.h
with bindings for user propagate functions
2021-12-18 11:56:05 -08:00
Nikolaj Bjorner f0740bdf60 move user propagte declare to context level
declaration of user propagate functions are declared at context level instead of at solver scope.
2021-12-18 10:56:42 -08:00
Nikolaj Bjorner 4856581b68 na 2021-12-17 16:40:19 -08:00
Nikolaj Bjorner 8ca023d541 expose propagate created 2021-12-17 16:12:47 -08:00
Nikolaj Bjorner 2caa7e6e45 remove EnumToNative as it drops reference counts, fixes #5713 2021-12-16 03:22:54 -08:00
Nikolaj Bjorner b85f2f7e86 #5704 2021-12-12 21:10:07 -08:00
Calvin Loncaric 0405a597d4
Fix return type of as_int64 (#5703) 2021-12-09 14:39:38 -08:00
Nikolaj Bjorner 773a2ae7bc na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-07 15:08:43 -08:00
Nikolaj Bjorner 1e95fb44d1 add ability to register expressions during callback 2021-12-07 09:47:05 -08:00
Nikolaj Bjorner 0d055b83eb update input for doxygen #5400 2021-12-05 09:04:18 -08:00
Nikolaj Bjorner 41aa7d7b60 stack
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-02 09:00:51 -08:00
Nikolaj Bjorner c6a5aa0cc4 try th_lemma, update documentation of api functions for creating strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-01 09:21:02 -08:00
Nikolaj Bjorner 3c1aedf219 fixing #5473
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-30 17:08:28 -08:00
Nikolaj Bjorner 5857236f2f introducing base namespace for user propagator 2021-11-29 19:41:30 -08:00
Nikolaj Bjorner 833dd62623 fix #5681 2021-11-24 13:24:31 +01:00
Nikolaj Bjorner fee4821106 include thread
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-19 21:06:07 +01:00
Nikolaj Bjorner a7d24788c3 wasm build issue
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-19 20:45:36 +01:00
Nikolaj Bjorner 741c5f43f4 Merge branch 'master' of https://github.com/z3prover/z3 2021-11-19 11:03:08 -08:00
Nikolaj Bjorner ca2c2bb802 ensure smt2log works with multi-threaded consumers, ease scenarios around #5655
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-19 11:02:50 -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 f2fcbc7cb7 capture values not reference 2021-11-07 13:43:56 -08:00
Clemens Eisenhofer 091079e58c
Added user propagator example (#5625)
* Added user propagator example

* User propagator example code refactoring
(+ removed unused parameter warning)

* Moved user-propagator example to its own directory
2021-11-02 15:03:02 -07:00
Henrich Lauko 96671cfc73
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
2021-10-29 15:42:32 +02:00
Alexander Traud f5f35f87d0
fix grouping for latest doxygen (#5626)
Since doxygen 1.8.16, opening and closing a group must not be done as
C comment but as doxygen command. In other words, not one but two
asterisk characters are required so that doxygen finds a group.
2021-10-27 23:46:31 +02:00
Nikolaj Bjorner 075769c4c0 try get_string contents again
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-25 16:03:40 +02:00
Nikolaj Bjorner 45681b4c6e update API type annotation to make it OCaml friendly 2021-10-25 13:43:15 +02:00
Nikolaj Bjorner 3a3cef8fce #5615 - update documentation and use non-encoded versions for ASCII characters in get_lstring
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-23 18:21:51 +02:00
Nikolaj Bjorner 7f41d6140f use some suggestions from #5615
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-22 12:39:55 -04:00
Nikolaj Bjorner 051616385f remove deprecated escape string from Julia bindings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-21 19:14:12 -04:00
Nikolaj Bjorner f05ac8a429 updated C++ API for escaped and unescaped strings #5615
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-21 14:52:59 -04:00
Nikolaj Bjorner 05e7ed9637 add API to access unescaped strings, update documentation of Z3_get_lstring, #5615
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-21 11:30:03 -04:00
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