3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-16 22:05:36 +00:00
Commit graph

967 commits

Author SHA1 Message Date
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
Christoph M. Wintersteiger b178420797 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-31 18:11:30 +01:00
Nikolaj Bjorner 20bbdfe31a moving remaining qsat functionality over
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 15:35:26 -07:00
Nikolaj Bjorner f175f864ec merge useful utilities from qsat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 12:01:44 -07:00
Nikolaj Bjorner 22cae143b1 Merge pull request #517 from yaqwsx/expr_values_to_int
Add methods for obtaining numeral values in C++ API
2016-03-16 20:43:39 -04:00
Andres Nötzli 34da0a32b9 [Z3py] Fix error in FPRef.__neg__()
`FPRef.__neg__()` did not work previously because it tried to construct an FPRef from an FPRef (`fpNeg()` already returns an FPRef).
2016-03-16 17:12:45 -07:00
Christoph M. Wintersteiger 778c7fcc64 Bugfix for model evaluator and internal, uninterpreted FPA functions.
Fixes #518
2016-03-16 16:17:08 +00:00
Christoph M. Wintersteiger cdc8e1303a Bugfix for fp.to_*_unspecified.
Fixes #507
2016-03-16 16:16:29 +00:00
Jan Mrázek 57265f6eb1 Add methods for obtaining numeral values in C++ API 2016-03-16 00:18:49 +01:00
Christoph M. Wintersteiger 027331aef2 resolved merge conflicts 2016-03-07 14:20:10 +00:00
Andres Nötzli d6ece7e8a5 [Z3py] Add examples for fpToFP 2016-03-07 00:21:26 -08:00
Christoph M. Wintersteiger a2ecb19d03 Added hash-consing remarks to mk_context and mk_context_rc.
Fixes #452
2016-03-05 17:58:32 +00:00
Christoph M. Wintersteiger 8abedbf389 whitespace 2016-03-05 17:55:27 +00:00
Christoph M. Wintersteiger 61525b9f5e style 2016-03-04 17:07:20 +00:00
Christoph M. Wintersteiger bfd836e911 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-04 14:49:41 +00:00
Christoph M. Wintersteiger 8cc3ba5a8b fixed FP Python doctest examples 2016-03-04 13:09:42 +00:00
Christoph M. Wintersteiger b27977ea90 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-02 15:14:12 +00:00
Andres Nötzli 18b9cd1948 [Z3py] Fix documentation in FPSortRef 2016-03-01 18:56:20 -08:00
Christoph M. Wintersteiger 1e86175c03 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-01 21:21:32 +00:00
Christoph M. Wintersteiger 59e695f2be Bugfixes for FP numerals in Python
Relates to #464, #470
2016-03-01 21:21:25 +00:00
Nikolaj Bjorner 9b6963d112 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-01 09:48:53 -08:00
Nikolaj Bjorner 67397bf71e enable logic parameter update to configure SMTLIB logic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-01 09:48:24 -08:00
Christoph M. Wintersteiger 0cb8193cdd logic fix 2016-03-01 17:42:33 +00:00
Nikolaj Bjorner 7f51ecab37 enable logic parameter update to configure SMTLIB logic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-01 09:26:14 -08:00
Christoph M. Wintersteiger c171170bed Fixed FP string input conversions.
Fixes #464
2016-03-01 15:31:33 +00:00
Andres Notzli 91d6b2cbbb [Z3py] Consistent behavior of eq and ne for FP
Before, x == y and x != y were returning inconsistent expressions (i.e.
`Not(x == y)` was not the same as `x != y`):

>>> x = FP('x', Float32())
>>> y = FP('y', Float32())
>>> (x == y).sexpr()
'(= x y)'
>>> (x != y).sexpr()
'(not (fp.eq x y))'

`=` does not have the same semantics as `fp.eq` (e.g. `fp.eq` of +0.0
and -0.0 is true while it is false for `=`).
This patch removes the __ne__ method from FPRef, so `x == y` and `x !=
y` use the inherited operations while fpEQ and fpNEQ can be used to
refer to `fp.eq(..)`/`Not(fp.eq(..))`.
2016-03-01 00:21:10 -08:00
Andres Nötzli c9269c1983 Fix documentation for floating-point comparisons 2016-02-29 19:12:14 -08:00
Nikolaj Bjorner c6c84dd59a update documentation help to be inline with fpLT. Issue #465
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 17:04:26 -08:00
Nuno Lopes d642d5fe4c API: add smt.logic parameter to enable setting the logic through the API
currently only Z3_solver_set_params() is supported
logic has to be set before solver first usage or before solver reset
2016-02-25 09:47:51 +00:00
Christoph M. Wintersteiger 0254b1f7ff ML API bug fixes 2016-02-15 13:28:22 +00:00
Christoph M. Wintersteiger 0dc85620aa ML API bug fix 2016-02-15 13:01:00 +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
Christoph M. Wintersteiger 6319861e26 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-12 18:32:46 +00:00
Christoph M. Wintersteiger f399fe5e1d resolved conflicts 2016-02-12 18:29:46 +00:00
Christoph M. Wintersteiger 9dbb8057ca Merge pull request #449 from kenmcmil/issue243
fixed logging on return of Z3_compute_interpolant...
2016-02-12 12:40:01 +00:00
Nikolaj Bjorner 8d61d36c3f add documentation methods to param_descrs, add C++ API and example for param_descrs. Issue #443
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-12 11:45:00 +00:00
Ken McMillan 8b90bc9e91 fixed logginf on return of Z3_compute_interpolant and added interpolation example to test_capi.c 2016-02-11 16:09:54 -08:00
Nikolaj Bjorner a6e1c70eab fix documentation/default bug. #445
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-10 15:02:22 +00:00
Nikolaj Bjorner 535fb39313 add documentation comments as raised in #443
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-10 12:02:40 +00:00
Nikolaj Bjorner 5285a795ac handle configuration passed in as null, deal with crash in logs attached to issue #243
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-10 01:20:16 +00:00
Christoph M. Wintersteiger 3df9fea54c removed unused variables 2016-02-09 16:38:35 +00:00
Christoph M. Wintersteiger 7e2783c6a2 Fixed javadoc links in comments.
Relates to #401.
2016-02-08 15:25:53 +00:00
Nikolaj Bjorner 3ef6d91038 fix #434: repeat documentation remarks about reference counting for disambiguation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-07 14:46:53 +00:00
Nuno Lopes 16a69e750a fix break in configure 2016-02-01 17:38:14 +00:00
Nuno Lopes ea55bd495f add new API function Z3_get_estimated_alloc_size() that returns *estimated* allocated memory size by Z3
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2016-02-01 17:19:55 +00:00
Nikolaj Bjorner 87228b6a9d add a little more verbiage to description of simplify. Issue #424
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-27 14:47:15 -08:00
Nuno Lopes 23cc8258fe remove m_ast_lim from API context since that one isn't used either
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2016-01-19 15:37:58 +00:00