3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00
Commit graph

29 commits

Author SHA1 Message Date
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
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
d4410d0872 address compilation warnings of unused parameters, add shorthands to set parameters on Optimize
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-04-16 14:32:48 -07:00
Bruce Mitchener
4bc1b0b8c8 Fix typos. 2018-12-05 21:07:34 +07:00
Nikolaj Bjorner
3d37060fa9 remove dependencies on contracts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-20 10:24:36 -07:00
Nikolaj Bjorner
3bc2213d54 fix #1577
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-03 17:43:42 -07:00
Nikolaj Bjorner
dbb35b951c make .NET and Java bindings for optimization use Expr instead of ArithExpr to accomodate bit-vector optimization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-13 08:51:16 -08:00
Christoph M. Wintersteiger
db398eca7a Tabs, formatting. 2017-09-17 17:50:05 +01:00
Nikolaj Bjorner
e02160c674 expose bounds as vector expressions instead of containing ad-hoc expressions. Issue #911
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-02-24 11:07:40 -08:00
Nikolaj Bjorner
461e88e34c additional robustness check for incremental sat solver core when it recieves interpreted constants, added PB equality to interface and special handling of equalities to adddress performance gap documented in #755
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-25 20:32:13 -07:00
Nikolaj Bjorner
e32e0d460d fix at-most-1 constraint compiler bug
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-22 21:50:45 -07:00
Nikolaj Bjorner
cb2d8d2107 add detection of non-fixed variables to consequence finding
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-07-30 19:12:41 -07:00
Nikolaj Bjorner
662e43d264 overloading support for C# expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-23 15:50:30 -07:00
Nikolaj Bjorner
eb5af100bd adding optimize bindings for ML, adding get_reason_unknown to optimize, mentioned in pull request issue #188, second edition
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-08-09 17:49:20 +02:00
Christoph M. Wintersteiger
a41a9c94dd Formatting 2015-05-19 12:43:25 +01:00
Nikolaj Bjorner
52619b9dbb pull unstable
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-04-01 14:57:11 -07:00
Nikolaj Bjorner
b050ac7c7c using properties
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-13 19:11:20 -07:00
Nikolaj Bjorner
e46114819b revamp API for acessing values of objectives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-13 18:59:13 -07:00
Nikolaj Bjorner
08dcd51594 fix bugs in incremental operation of sat solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-09-27 12:04:54 -07:00
Nikolaj Bjorner
31f16d7aa4 add push/pop to optimization context for convenience
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-09-01 14:58:58 -07:00
Nikolaj Bjorner
330120e406 update documentation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-03-24 03:37:02 -07:00
Nikolaj Bjorner
b71580f11c fix APIs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-03-24 03:11:53 -07:00
Nikolaj Bjorner
ff1543d700 fix APIs, add python API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-03-23 21:28:11 -07:00
Nikolaj Bjorner
58f8181a74 fixes to dotnet interface
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-12-26 17:14:29 -08:00
Anh-Dung Phan
caba15d6b3 Remove superfluouse indices to make .NET API thinner 2013-12-10 17:15:51 -08:00
Nikolaj Bjorner
4d6aa1a0f3 add to_string and get_help methods to optimize API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-12-06 11:34:41 -08:00
Anh-Dung Phan
d38e2b9b78 Expose objective indices to .NET API 2013-12-05 17:30:40 -08:00
Nikolaj Bjorner
56c4fa8f6d expose models, working on network flow
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-12-04 17:39:54 -08:00
Nikolaj Bjorner
e3fe80fd4d add .NET interface and finish C interface for optimization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-12-03 20:20:24 -08:00