3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00
Commit graph

121 commits

Author SHA1 Message Date
THE Spellchecker
dc0887db5a
Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
Nikolaj Bjorner
2e068e3f56 add simplifiers to .net API 2023-02-02 17:41:00 -08:00
Peter Bruch
58fad41dfa
Dotnet Api: Fix infinite finalization of Context (#6361)
* Dotnet Api: suppress GC finalization of dotnet context in favor of re-registering finalization

* Dotnet Api: enable concurrent dec-ref even if context is created without parameters.

* Dotnet Api: removed dead code.
2022-09-22 13:25:17 -05:00
Nikolaj Bjorner
edeeded4ea
remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332)
The notion of reference counted contexts never worked.
The reference count to a context only ends up being 0 if the GC kicks in and disposes the various z3 objects. A call to Dispose on Context should free up all resources associated with that context. In exchange none of the resources are allowed any other operation than DecRef. The invocations of DecRef are protected by a lock and test on the context that the native pointer associated with the context is non-zero. Dispose sets the native pointer to zero.

Z3_enable_concurrent_dec_ref ensures that:

- calls to decref are thread safe. Other threads can operate on the context without interference.

The Z3_context ensures that
- z3objects allocated, but not disposed during the lifetime of Z3_context are freed when Z3_context is deleted (it triggers a debug warning, but this is now benign).
2022-09-11 18:59:00 -07:00
Clemens Eisenhofer
56fb161532
ADT-constructor generation crashed in .NET/Java when no (= default) fields are given (#6287) 2022-08-21 12:40:38 -07:00
Nikolaj Bjorner
89af9df02d add IEnumerable for distinct
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-21 23:22:24 -07:00
Nikolaj Bjorner
3c94083a23 fix doc errors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-01 15:29:44 -07:00
Nikolaj Bjorner
506f8f88aa add user propagator functionality 2022-05-08 12:43:46 -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
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
7091b1c856 add additional regex operators to API 2022-02-20 10:29:18 +02: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
2caa7e6e45 remove EnumToNative as it drops reference counts, fixes #5713 2021-12-16 03:22:54 -08: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
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
f7b1469462 Try freeing context in dispose method and not wait for finalizer #5043 2021-02-27 11:02:58 -08:00
Nikolaj Bjorner
bac4726531 remove redundant method
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 14:40:17 -07:00
Nikolaj Bjorner
571e345d07 add mkStringSort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 14:39:02 -07:00
Nikolaj Bjorner
0bc33e9c9d correct the type returned by mkNth #4454
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 09:10:58 -07:00
Nikolaj Bjorner
779183da06 fixing smtfd
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-11-10 18:23:32 -08:00
Nikolaj Bjorner
335543b374 adding comparison #2360
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-28 21:14:58 -07:00
Nikolaj Bjorner
d953bdd2e4 add multi-argument select for C#
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-17 11:35:03 -07:00
Nikolaj Bjorner
834cf962a1 expose nth over API, change _getitem_ in python bindings to use nth instead of at, add 'at' operator for the purpose of the previous semantics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-17 11:23:01 -07:00
Bruce Mitchener
4bc1b0b8c8 Fix typos. 2018-12-05 21:07:34 +07:00
Nikolaj Bjorner
d45b8a3ac8 fix debug build, add access to numerics from model
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-17 15:24:54 -08:00
Nikolaj Bjorner
0f0287d129 prepare release notes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-28 17:42:16 -05:00
Nikolaj Bjorner
3d37060fa9 remove dependencies on contracts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-20 10:24:36 -07:00
Florian Pigorsch
326bf401b9 Fix some spelling errors (mostly in comments). 2018-10-20 17:07:41 +02:00
Nikolaj Bjorner
e13b61eae8 work around regression with use of mk_app_core, returning BR_FAILED if nothing is rewritten
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-02 11:10:37 -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
Nikolaj Bjorner
520ce9a5ee integrate lambda expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-26 07:23:04 -07:00
Nikolaj Bjorner
c513f3ca09 merge with master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-25 14:57:01 -07:00
Bruce Mitchener
878a6ca14f Fix typos. 2018-03-09 14:30:43 +07:00
Bruce Mitchener
73b3da37d8 Typo fixes. 2018-01-02 22:48:06 +07:00
Nikolaj Bjorner
161b6a9983 increase minor version, update java/.net apis
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-28 11:51:37 -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
Nikolaj Bjorner
fd49a0c89c added facility to persist model transformations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-02 00:05:52 -05:00
Nikolaj Bjorner
c9f540b066 additional array functions exposed over API, ping #1223
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-19 11:08:48 -07:00
Nikolaj Bjorner
ae9a6664d4 add cube mode
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-24 10:53:57 -07:00
Christoph M. Wintersteiger
db398eca7a Tabs, formatting. 2017-09-17 17:50:05 +01:00
Nikolaj Bjorner
0ac80fc042 have parser produce ast-vector instead of single ast
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-06-01 21:21:05 -07:00
Nikolaj Bjorner
3a0e9e8f53 add itos/stoi conversion to API. Issue #895
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-02-11 11:31:13 -05:00