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

4373 commits

Author SHA1 Message Date
Nikolaj Bjorner d0175b96b8 guarding against null symbols creeping in. Issue #571
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-20 14:07:45 -07:00
Nuno Lopes 417c80edbc fix mem leak in quantifier_info::insert_qinfo on timeout 2016-04-19 02:17:12 -07:00
Nikolaj Bjorner b512212d41 update func_interp code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-18 17:31:36 -07:00
Nikolaj Bjorner 3a6218ac21 update func_interp code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-18 17:30:52 -07:00
Nikolaj Bjorner cff843ca59 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-04-18 17:22:54 -07:00
Nikolaj Bjorner 4cb57cd4da fix regression introduced by using ref-vectors on non-ref'ed output parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-18 17:22:47 -07:00
Nikolaj Bjorner c3f4124a9f trace down recent exposed regression in goal2sat, incorporate Scott's suggestion on making vector<std::string inaccessible
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-18 14:50:10 -07:00
Nikolaj Bjorner 81232808ba add handling for int.to.str
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-18 11:17:33 -07:00
Nikolaj Bjorner 4761f4f191 add handling for int.to.str
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-18 11:14:40 -07:00
Christoph M. Wintersteiger 5d0db6d256 Fixed memory leak in goal::update.
Fixes #567
2016-04-18 17:18:16 +01:00
Christoph M. Wintersteiger 6db0a15d29 Fixed potential memory leakage issues in fpa2bv_converfter 2016-04-18 17:17:31 +01:00
Christoph M. Wintersteiger 3ffcea0fe4 whitespace 2016-04-18 16:52:12 +01:00
Martin R. Neuhaeusser 67ac1a003e Avoid conversion between mutable arrays and lists in OCaml API.
This patch eliminates the conversion between OCaml arrays and lists
from Z3's OCaml API.
2016-04-18 17:20:27 +02:00
martin-neuhaeusser 34bf4b1d3c Fix installation of custom error handler during context creation in OCaml bindings
This patch fixes a bug detected by valgrind, where a custom error handler
did not get installed correctly.
2016-04-18 17:20:12 +02:00
Nikolaj Bjorner 0094b36636 fix bounds check to fix segfault reported in issue #565
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-16 12:25:29 -07:00
Nikolaj Bjorner 1c8e0918d8 move to std::vector in replayer
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-16 10:08:29 -07:00
Nikolaj Bjorner d383fd851a move vector<std::string to std::vector<std::string
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-16 09:34:27 -07:00
Nikolaj Bjorner 4ebf392da7 Fixes #564: use std::vector on std::strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-16 09:26:13 -07:00
Nikolaj Bjorner 0f93853a4c remove labels from evaluation result
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-12 13:17:10 -07:00
Nikolaj Bjorner aa7b5d80fe extract array terms for evaluator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-12 09:41:50 -07:00
Nikolaj Bjorner 2033719c14 fix optimization pre-processing reported by Gereon Kremer
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-09 20:58:57 -07:00
Nikolaj Bjorner 6e57015a12 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-04-09 16:51:42 -07:00
Nikolaj Bjorner cc6f72aba7 fix handing of ite conditions that have to be included in projection, thanks to bug report by Zak
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-10 01:48:35 +02:00
Christoph M. Wintersteiger 16e487b32a Bugfix for ackermann helper 2016-04-08 17:20:09 +01:00
Christoph M. Wintersteiger bd0bd08ecf add is_considered_uninterpreted checks into acker_helper 2016-04-08 16:58:11 +01:00
Christoph M. Wintersteiger 0597b579b1 Bugfixes for bvarray2uf conversion. 2016-04-07 19:10:31 +01:00
Christoph M. Wintersteiger 5971c20653 Bugfixes for bv_trailing. 2016-04-07 13:08:17 +01:00
Christoph M. Wintersteiger 3a532c08a6 Bugfix for func_interp else-case compression 2016-04-06 19:24:08 +01:00
Christoph M. Wintersteiger 324fcc6a13 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-04-06 15:40:13 +01:00
Christoph M. Wintersteiger e662427060 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-04-06 15:39:37 +01:00
Christoph M. Wintersteiger e527aca296 Bugfix for unspecified else-case in func_interps. 2016-04-06 15:39:32 +01:00
Nuno Lopes e2b7ad246a bv_trailing: fix compiler warning + use of ast_manager 2016-04-06 15:34:31 +01:00
Christoph M. Wintersteiger 7534b53bae Merge branch 'master' of https://github.com/Z3Prover/z3 2016-04-06 14:51:25 +01:00
martin-neuhaeusser 95454679e2 Another round of pretty printing 2016-04-06 12:45:21 +02:00
martin-neuhaeusser bd9d13279a Pretty printing 2016-04-06 12:39:19 +02:00
martin-neuhaeusser 1662ba8353 Add more comments on comparison functions in the C layer of the OCaml bindings 2016-04-06 12:36:11 +02:00
martin-neuhaeusser b873c6b508 Simplify OCaml API
This patch simplifies the implementation of the OCaml bindings. For example,
the applyX wrapper functions have become unnecessary in the new OCaml API.
It also removes the internal ML2C structure that was used as an intermediate
layer between the C and the OCaml layer.
2016-04-06 12:10:59 +02:00
Mikolas Janota dbffc15b98 Improvements in caching of bv_trailing. 2016-04-06 11:04:15 +01:00
mikolas 9ba5bbfd33 Re-factoring and comments in bv_trailing. 2016-04-06 11:04:13 +01:00
Mikolas Janota 248feace34 fixing the behavior in bv_trailing 2016-04-06 11:04:11 +01:00
mikolas fced47386e More work on trailing 0 analysis. 2016-04-06 11:04:09 +01:00
mikolas ddb6ae4eab More work on trailing 0 analysis. 2016-04-06 11:04:07 +01:00
mikolas 78cb1e3c7b More work on trailing 0 analysis. 2016-04-06 11:04:05 +01:00
mikolas c7f1746321 Starting to work on trailing 0 analysis. 2016-04-06 11:04:03 +01:00
Nikolaj Bjorner 493b86eca7 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-04-05 22:27:11 +02:00
Nikolaj Bjorner b97d694e5e undo model evaluation to BR_FULL pending regression in assertion violation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-05 22:26:57 +02:00
mikolas 05ce886afe Avoiding adding spurious +0 in poly_rewriter::cancel_monomials. 2016-04-05 17:26:48 +01:00
martin-neuhaeusser 71f991c5df Avoid using physical equality checks in OCaml bindings (z3.ml)
This patch avoids the use of physical equality wherever possible
and improves some details of the OCaml implementation.
2016-04-05 12:51:03 +02:00
Nikolaj Bjorner c454b81b2c special case branching
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-05 11:57:49 +02:00
Nikolaj Bjorner ed1a5797fb check that a clause was not removed to fix issue #551
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-04 20:15:49 +02:00
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
Nikolaj Bjorner ec5a4ba63d add documentation comment for evaluation, Issue #536
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-04 12:59:18 +02:00
Nikolaj Bjorner 9667185af0 issue #549, replace BoolVal by False, otherwise creates regression
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-03 12:53:50 +02:00
Nikolaj Bjorner 11e8f06272 issue #549, replace False by BoolVal
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-03 12:52:15 +02:00
Nikolaj Bjorner 33e7640645 disable mb branching pending unit test analysis
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-03 10:53:37 +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
Nikolaj Bjorner 03336ab9f2 add evaluation of array equalities to model evaluator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-04-02 15:07:01 +02:00
Arie Gurfinkel 44d4902bb4 typo: gt -> ge 2016-04-02 10:13:14 +02:00
Christoph M. Wintersteiger ccd18283e7 Moved extension_converter func_interp entry compression to func_interp.
Relates to #547
2016-04-01 15:38:38 +01:00
Christoph M. Wintersteiger 3b82604590 whitespace 2016-04-01 15:37:40 +01:00
Christoph M. Wintersteiger d55a6725c9 Compressed func_interps in extension_model_converter.
Fixes #547.
2016-04-01 15:17:38 +01:00
Christoph M. Wintersteiger eb9c5b7cdb Disabled bogus assertions.
Fixes #489
2016-04-01 13:25:37 +01:00
Christoph M. Wintersteiger 852dc6d190 whitespace 2016-04-01 13:22:16 +01:00
Christoph M. Wintersteiger 405650c183 bugfix for ackr_model_converter (refcounts were off due to func_interps not being copied properly). 2016-04-01 13:17:48 +01:00
Christoph M. Wintersteiger dafda681b2 Bugfix for zero-extend.
Fixes #548
2016-04-01 12:48:06 +01:00
Christoph M. Wintersteiger dcca3a9bb1 whitespace 2016-04-01 12:46:49 +01: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
Christoph M. Wintersteiger bf92e53688 Annotation fix for pattern/quantifier probes 2016-03-30 18:35:49 +01:00
Christoph M. Wintersteiger 1724811e1b qffp tactic cleaned up to be in line with the default behavior of other tactics. 2016-03-30 15:23:46 +01:00
Christoph M. Wintersteiger cb2bf48254 Added has_quantifier probe 2016-03-30 15:22:53 +01:00
Christoph M. Wintersteiger d746b410cf whitespace 2016-03-30 15:22:21 +01:00
Mikolas Janota 217c0419a1 Avoiding adding a superfluous unary AND in lackr. 2016-03-29 19:34:30 +01:00
Mikolas Janota 363f57a2f4 Silently bailing out on quantifiers in lackr. 2016-03-29 19:19:07 +01:00
Christoph M. Wintersteiger 6be24b3201 Bugfix for FPA in solver.to_smt2
Fixes #541
2016-03-29 16:37:24 +01:00
Christoph M. Wintersteiger 19e73fb2ad whitespace 2016-03-29 16:13:31 +01:00
Nikolaj Bjorner 7eec68c954 add handling for distinct to bit-blaster
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-28 11:22:54 -07:00
Nikolaj Bjorner 0870b4a5a0 add length coherence check for length = 0
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-25 17:17:34 -07:00
Nikolaj Bjorner f34a54fea0 fix stats collection over exceptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-24 17:08:13 -07:00
Nikolaj Bjorner 808855ce6b add internalization for auxiliary division functions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-24 16:20:42 -07:00
Nikolaj Bjorner 709a5d9524 fix bug: & -> &&
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-24 16:09:12 -07:00
Nikolaj Bjorner b30b8008b2 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-24 08:48:52 -07:00
Nikolaj Bjorner 29845d037b fix build break on seq evaluation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-24 08:48:42 -07:00
Nuno Lopes 83e34638e6 add support to build with MSVC /Gr (fastcall mode for x86)
not enabled by default nor exposed at the moment
2016-03-24 15:39:18 +00:00
Nikolaj Bjorner 89fad8913f fix issue #535
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-24 08:16:54 -07:00
Nikolaj Bjorner 05a784fa9e fix issue #535
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-24 08:16:19 -07:00
Nikolaj Bjorner fe4f3e7772 fix regressions exposed in QF_LIA: manager got initialized early and Euclidean solver is not safe even with some throttle
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-23 20:38:18 -07:00
Nikolaj Bjorner 87989dd93e Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-23 17:25:23 -07:00
Nikolaj Bjorner 45fdb95f53 fix performance for model construction, recognize concats of values as a value for pre-processing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-23 17:23:57 -07:00
Arie Gurfinkel 4e7b6b6586 proposed fix to compare 2016-03-23 19:20:57 -04:00
Arie Gurfinkel ee125b4fe3 extend model with the value of a fresh variable 2016-03-23 19:07:50 -04:00
Nikolaj Bjorner ec681d7565 some of Arie's fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-23 10:19:16 -07:00
Nikolaj Bjorner fd6fe87c5d enable qe-lite for UFNIA benchmarks
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-22 15:41:21 -07:00
Nikolaj Bjorner 72ec6dc8e1 remove debug code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-21 16:58:48 -07:00
Nikolaj Bjorner 5e737641b7 remove qe-lite pass in quant_tatics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-21 16:57:30 -07:00
Nikolaj Bjorner 701f32471e hardening model checker code against cancellations'
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-21 15:04:20 -07:00
Nikolaj Bjorner 3dc2028925 adding min/max
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-21 09:20:57 -07:00
Nikolaj Bjorner 680c28d083 remove nnf conversion which breaks NRA property
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-20 16:34:04 -07:00
Nikolaj Bjorner 1a5449c3d4 enable new NRA solver for nra benchmarks
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-20 12:35:29 -07:00
Nikolaj Bjorner 73e29c6ee6 fix regression warning on invalid case split strategy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-20 10:20:43 -07:00
Nikolaj Bjorner 92b5aac12a adjusting new tactics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-20 10:13:23 -07:00
Dan Liew 971fd59fbb Fix gcc build broken by f175f864ec.
C++ enums (unless they are class enums) don't define their own
namespace.
2016-03-20 10:18:59 +00:00
Nikolaj Bjorner f0bdcbb3db expose qsat tactic to default tactics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 18:40:59 -07: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 d614fedde2 more merges with qsat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 12:41:41 -07:00
Nikolaj Bjorner 76d637626a include more qsat features
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 12:30:24 -07:00
Nikolaj Bjorner c4472ce717 include more qsat features
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 12:29:23 -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 f951372f03 fix regression in internalizing bit-vectors, reported by Mikolas Janota
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-18 13:54:42 -07:00
Nikolaj Bjorner b0f65335ab update copyright year
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-17 13:07:40 -07:00
Nikolaj Bjorner ab82fee398 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-17 13:06:21 -07:00
Christoph M. Wintersteiger 94054593a4 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-17 17:52:32 +00:00
Christoph M. Wintersteiger cc04fdbd70 Added eager ackermannization to QF_FP, so that small numbers of unspecified operators are eliminated upfront. 2016-03-17 17:52:26 +00:00
Nuno Lopes f5c4800eec reduce-args: last fix for may_be_unique to support quantified variables in arbitrary exprs 2016-03-17 15:29:48 +00:00
Nuno Lopes facb421398 reduce-args: fix unsoundness 2: f(v + 2), where b is quantified 2016-03-17 13:27:07 +00:00
Nuno Lopes aed4619066 reduce-args: fixed unsoundness introduced in my previous commit
skip an UF arg if it's quantified
e.g. forall a . f(a, b) -> f(b) (but not f)
2016-03-17 13:14:43 +00:00
Christoph M. Wintersteiger c8af48d7ef Bugfix for bvurem0 model evaluation (+1 rewriting step) 2016-03-17 13:09:52 +00: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 6b2d84b2be Fixed model evaluation/simplification for to_ieee_bv. 2016-03-16 17:46:52 +00:00
Christoph M. Wintersteiger 7ec70c1686 bug fixes for unspecified FP results 2016-03-16 16:57:20 +00:00
Christoph M. Wintersteiger db6b9faabc Bugfix for FPA rewriter. 2016-03-16 16:35:45 +00: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 99d7a47f82 Bugfixes for unspecified results from fp.to_* (models are still incomplete).
Relates to #507
2016-03-15 21:45:54 +00:00
Christoph M. Wintersteiger 3101d281e4 Removed unused variable 2016-03-15 15:12:54 +00:00
Christoph M. Wintersteiger 371573cbff More implementation of fp.to_ieee_bv for unspecified input/output
Relates to #507
2016-03-15 15:11:37 +00:00
Christoph M. Wintersteiger a9df4a208f More bugfixes for fp.to_ieee_bv for unspecified input/output.
Relates to #507
2016-03-15 14:58:55 +00:00
Christoph M. Wintersteiger ce64999ee2 More bugfixes for fp.to_ieee_bv for unspecified input/output 2016-03-15 14:50:59 +00:00
Christoph M. Wintersteiger 176782d62b Bugfix for fp.to_ieee_bv for unspecified input/output. 2016-03-15 14:38:11 +00:00
Christoph M. Wintersteiger 5463167a84 Bugfix for fp.rem (denormal numbers)
Fixes #508.
2016-03-14 15:52:09 +00:00
Nikolaj Bjorner 55956df8d8 remove critical sections that are now redundant due to different cancellation model
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-13 12:10:14 -04:00
Nikolaj Bjorner 3dfc0a93f6 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-13 12:09:25 -04:00
Christoph M. Wintersteiger badf9e6e67 whitespace 2016-03-11 14:05:32 +00:00
Christoph M. Wintersteiger 3e61ee2331 disabled "hardware interpretation" of fp.min/fp.max because the unspecified, standard-compliant behaviour is cheap anyways. 2016-03-11 12:52:00 +00:00
Christoph M. Wintersteiger b5279d1da8 Bugfix for fp.to_ieee_bv.
Fixes #507.
2016-03-11 12:35:41 +00:00
Christoph M. Wintersteiger 9dd53c091a guard on m_preprocess in inc_sat_solver 2016-03-11 12:02:49 +00:00
mikolas 419e2c4899 Inc sat for ackr. 2016-03-10 17:36:06 +00:00
Mikolas Janota ae9f369574 Fix in lackr_model_constructor. 2016-03-10 17:36:05 +00:00
mikolas a2140085d6 In lazy ackermannization, collect all conflicting terms in one iteration. 2016-03-10 17:36:03 +00:00
Mikolas Janota 2f8465552c additional logging 2016-03-10 17:36:02 +00:00
Nuno Lopes d6c3260db7 reduce_args_tactic: make it aware that 'a + const' may be a unique value in bv theory
it allows us to remove UFs that are of the form f(a + 1), f(a + 2), etc..
2016-03-10 10:15:09 +00:00
Nuno Lopes 0b1b5a4328 fix VS x64 warning 2016-03-10 09:03:24 +00:00
Nikolaj Bjorner 2354e747bf Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-09 21:33:16 -08:00
Nikolaj Bjorner 3d7eb12117 tracking use of assumptions in tactics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-09 21:33:08 -08:00
Nikolaj Bjorner 6ad6998c57 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-09 15:53:16 -08:00
Nikolaj Bjorner 03a0a6f6a1 refactor occurrence utility for common use (to be used in ctx_simplifier) per Nuno's suggestion
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-09 15:53:02 -08:00
Nuno Lopes 8b53628d67 remove a few unused decls 2016-03-09 17:01:06 +00:00
martin-neuhaeusser c7a7cc74fa Fix bug in ufbv tactic that enabled ackermannization even if unsat core or proof generation are requested 2016-03-09 14:06:39 +01:00
Nikolaj Bjorner 71fff8ffa2 fix boundary case according to analysis #477, e.g., size = 252, PTR_ALIGNMENT=2, slot_id = 64 = NUM_SLOTS
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-09 00:42:50 -08:00
Nikolaj Bjorner 5db84575f6 fix regression in o7.smt2
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-08 22:27:47 -08:00
Nikolaj Bjorner 9743c188da add exception handling for making solver-1 discontinuation transparent, thanks to Martin, #497
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-08 17:00:12 -08:00
Nikolaj Bjorner 335a1dba6e guarding bb_rewriter now that it gets reset
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-08 16:50:06 -08:00
Nuno Lopes d0de8fff62 ensure ast_manager::are_equal returns true if expr ptrs are equal
found by Nikolaj
2016-03-08 16:53:09 +00:00
Christoph M. Wintersteiger cfda8e9e03 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-08 14:32:30 +00:00
Nikolaj Bjorner 809fc86ac7 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-07 16:42:39 -08:00
Nikolaj Bjorner 5994c5a948 fix partial model tracking over cancellation/exceptions, reported by August Shi. Fix regression test for fp-to-real, reset the pre-processor in inc_sat_solver on exceptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-07 16:42:29 -08:00
Nikolaj Bjorner 49d0e28621 allow parameters to overwrite logic, fixes bug report by Nuno
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-07 10:44:06 -08:00
Nikolaj Bjorner 8c4d791f01 use std::vector per Nuno's analysis to fix #420
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-07 08:08:17 -08:00
Christoph M. Wintersteiger 027331aef2 resolved merge conflicts 2016-03-07 14:20:10 +00:00
Christoph M. Wintersteiger 3a9b4985e4 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-07 13:35:54 +00:00
Nuno Lopes 9c620376c2 simplify ast::are_equal(), since pointer equality is sufficient 2016-03-07 13:15:12 +00:00
Christoph M. Wintersteiger a9ffc258d0 Merge branch 'cmake_build_system4' of https://github.com/delcypher/z3-1 into delcypher-cmake_build_system4 2016-03-07 13:12:04 +00:00
Andres Nötzli d6ece7e8a5 [Z3py] Add examples for fpToFP 2016-03-07 00:21:26 -08:00
Nikolaj Bjorner 4cd1efc50e address unused variable warnings from OSX build log
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-05 15:33:33 -08:00
Nikolaj Bjorner aa1ddd169a fix bug in offset for shift amount for free bindings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-05 15:25:14 -08:00
Nikolaj Bjorner 640308b546 make proto-model evaluation use model_evaluator instead of legacy evaluator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-05 10:27:19 -08:00
Nikolaj Bjorner 70f13ced33 make proto-model evaluation use model_evaluator instead of legacy evaluator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-05 10:14:15 -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 f34e15f289 whitespace 2016-03-05 16:47:39 +00:00
Christoph M. Wintersteiger 9dfc2bc61e Fixed memory leaks in fpa2bv converter.
Fixes #480
2016-03-05 16:47:08 +00:00
Christoph M. Wintersteiger fedc6d4754 Fixed memory leak in fpa2bv tactic. 2016-03-05 12:54:36 +00:00
Zephyr Pellerin b13db1e82e Bugfix for arith_rewriter single operand division 2016-03-04 18:26:00 -08:00
Christoph M. Wintersteiger 61525b9f5e style 2016-03-04 17:07:20 +00:00
Dan Liew a3e0eae9ec Move CMakeLists.txt files (other than the one in the repository root)
and the cmake directory into a new directory ``contrib/cmake`` that
mirrors the directory structure of the root. This is a comprimise
between me and Christoph Wintersteiger that was suggested by Arie
Gurfinkel that allows the CMake build system to live in the Z3
repository but not impact the Z3 developers that want to avoid the CMake
build system. The build system will not work in its new location
and a bootstrap script will soon be provided that allows a developer
to copy the files back to their correct location.
2016-03-04 15:26:09 +00:00
Dan Liew 849c16c4fc Don't try to remove the CMAKE_INSTALL_PREFIX from the
``python_install_dir``. The implementation was broken because
we would strip off ``/usr`` and then install into
``/lib/python-3.5/site-packages``. We could remove the leading slash
to make sure we install into the CMAKE_INSTALL_PREFIX but doing so
seems unnecessarily complicated given that DESTDIR still seems to
be respected even when given absolute paths to the CMake ``install()``.
2016-03-04 15:26:09 +00:00
Dan Liew 9b48b5ca83 When building with OpenMP make sure libz3 passes extra linker
flags. This is necessary for libz3 to be usable from the Python
bindings when libz3 is built with gcc or clang.
2016-03-04 15:26:09 +00:00
Dan Liew fb449517e3 Teach the CMake build system to build and install the python bindings
The new ``BUILD_PYTHON_BINDINGS`` option (off by default) will enable
building the bindings and the new ``INSTALL_PYTHON_BINDINGS`` option
enables installing them.
2016-03-04 15:26:09 +00:00
Dan Liew f6e946443e Made emission of the API module files `api_log_macros.h`,
``api_log_macros.cpp`` and ``api_commands.cpp`` optional in
``update_api.py``. This is required to implement support for
building and installing Z3's API bindings with CMake.
2016-03-04 15:26:09 +00:00
Dan Liew c9e3332019 Teach the CMake build system to generate the module exports
file ``api_dll.def`` and append the necessary flag to the linker
when using MSVC. The MSVC build with CMake now succeeds and both
the ``c_example`` and ``cpp_example`` work :)
2016-03-04 15:26:09 +00:00
Dan Liew beb21126e2 Move where the Z3 API header files to be scanned by the Python scripts
is declared out of ``src/api/CMakeLists.txt`` and into
``src/CMakeLists.txt``. We will need this list to generate the
``api_dll.def`` module definition file for MSVC. Whilst I'm here
also fix a stray use of ``USES_TERMINAL`` in ``add_custom_command()``.
2016-03-04 15:26:09 +00:00
Dan Liew ce54f6d957 Fix racing MSVC CMake build. The `libz3` target must have a different
OUTPUT_NAME than the ``shell`` target to avoid conflicting file names.
2016-03-04 15:26:09 +00:00
Dan Liew ca6c41e411 Don't append ${OpenMP_CXX_FLAGS} to Z3_DEPENDENT_LIBS. This is wrong
because this is passed to ``target_link_libraries()``. It just so
happens that ``target_link_libraries()`` will interpret arguments
starting with a dash as a flag to pass to the linker (i.e. in this
case ``-fopenmp``). However in the case of MSVC that flag is ``/openmp``
which is the interpreted as a file path which will lead to a linker
failure later because the linker can't find the file ``\openmp.obj``.
2016-03-04 15:26:09 +00:00
Dan Liew 32e51eda2e Only CMake >= 3.2 supports the `USES_TERMINAL` argument to
add_custom_command()
2016-03-04 15:26:09 +00:00
Dan Liew 9f5f8f128f CMake 2.8.12 doesn't support the `continue()` command. 2016-03-04 15:26:09 +00:00
Dan Liew 251527603d Implement a CMake build system.
This is a large rework of my first attempt at this (#459).

This implementation calls into the recently implemented python scripts
to generate the necessary generated ``.h`` and ``.cpp`` files but is
independent from Python building system otherwise.  Unlike the Python
build system, the generated files are emitted into the build tree to
avoid polluting the source tree. The build system is setup to refuse to
configure if it detects generated files in the source tree. If your
source tree is dirty you can run ``git clean -fx`` to clean your working
directory.

Currently the build succeeds on Linux using CMake 3.4.3 using
the "Unix Makefiles" generator with gcc or clang.

The following notable features are implemented:

* Building of the C and C++ examples and the ``test-z3`` executable.
  These are included from the ``all`` target so you have to tell the
  build system (e.g. make) to build them manually.

* Install (``make install``) and uninstall (``make uninstall``) of libz3
  and its header files. This supports ``DESTDIR`` out of the box because
  CMake supports it.

* An option (``BUILD_LIBZ3_SHARED``) to build libz3 as a static or dynamic library.

* Support for using/not using OpenMP (``USE_OPENMP``)

* Support for using/not using libgmp (``USE_LIB_GMP``)

* Setting the SOVERSION for libz3. I'm not sure if I'm setting the
* number correctly though. This is required by Linux distrubtions that
  wills ship libz3. This needs discussion.

The following notable features are currently not implemented
and are left for future work.

* Support for ARM.
* Support for the foci2 library.
* Support for creating/installing/uninstalling the dotnet, java, python and ml
  bindings.
* Full support for MSVC. Although I've tried to write the CMake code
  with MSVC in mind not all the correct flags are passed to it.
* Support for using the git hash.

This new build system has several advantages other the old build system.

* It is easier for outside contributors to contribute to Z3 when the
  build system is something more standard.
* Incremental builds work properly. With the old build system when
  new code is pulled down the old build directory would need to thrown
  out and a new fresh build had to be performed because the build system
  didn't know how to correctly rebuild the project (e.g. couldn't handle
  new sources being added/removed, compiler flags changing, generated
  files changing, etc...). This is a MASSIVE boost to productivity!
* We now have access rich array of features that CMake provides for
  building C/C++ projects. This means less time spent implementing
  custom build system logic in Python that is already supported by
  CMake.
* CMake supports many IDEs out of the box so it should be fairly
  straight forward to build Z3 with Visual Studio (once support for MSVC
  is added), Xcode, Eclipse CDT, CLion, ..etc.
2016-03-04 15:26:09 +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 a51201298c Bugfix for assumptions in inc_sat_solver 2016-03-04 14:42:38 +00:00
Christoph M. Wintersteiger b2eb5b7170 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-04 13:09:50 +00:00
Christoph M. Wintersteiger 8cc3ba5a8b fixed FP Python doctest examples 2016-03-04 13:09:42 +00:00
Christoph M. Wintersteiger bd73bd9177 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-03 17:11:58 +00:00
Nikolaj Bjorner 6fef24edb4 recursive function definitions; combine model-building functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-03 08:07:06 -08:00
Nikolaj Bjorner 50b2389e7f Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-03 07:59:13 -08:00
Nikolaj Bjorner 7c6540e18f recursive function definitions; combine model-building functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-03 07:59:03 -08:00
Christoph M. Wintersteiger 1aeea763ff Assertion fix in inc_sat_solver 2016-03-02 18:39:28 +00:00
Christoph M. Wintersteiger e79960b253 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-02 18:27:30 +00:00
Christoph M. Wintersteiger bf40bb8005 Bugfix for inc_sat_solver 2016-03-02 18:27:01 +00:00
Christoph M. Wintersteiger 68416bf6bc whitespace 2016-03-02 18:25:56 +00:00
Christoph M. Wintersteiger bddf416064 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-02 18:06:22 +00:00