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

4297 commits

Author SHA1 Message Date
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
Christoph M. Wintersteiger dbf9609b4c added assertion 2016-03-02 18:06:14 +00:00
Christoph M. Wintersteiger f128c76f23 whitespace 2016-03-02 18:05:14 +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
Christoph M. Wintersteiger 6fa2338edc Merge pull request #471 from 4tXJ7f/patch-1
[Z3py] Fix documentation in FPSortRef
2016-03-02 14:14:54 +00:00
Nikolaj Bjorner 1a081936ac Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-01 22:31:53 -08:00
Nikolaj Bjorner a25336a899 fix test build, working on rec-functions and automata complementation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-01 22:31:44 -08: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
Nikolaj Bjorner 31c58b0999 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-03-01 08:46:51 -08:00
Nikolaj Bjorner 908f09a9df update logic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-01 08:46:43 -08:00
Christoph M. Wintersteiger c171170bed Fixed FP string input conversions.
Fixes #464
2016-03-01 15:31:33 +00:00
Christoph M. Wintersteiger b6e43b6d7b Merge pull request #468 from 4tXJ7f/fix_fp_neq
[Z3py] Consistent behavior of eq and ne for FP
2016-03-01 14:07:28 +00:00
Nuno Lopes 62e46aacd9 bv_bounds: make may_simplify more precise to skip exprs with just 1 bound expr
speedups up to 3x in selected benchmarks
2016-03-01 11:31:08 +00:00
Nuno Lopes 33431ef922 fix build with gcc 2016-03-01 10:02:24 +00:00
Nuno Lopes 10ea36bfed fix build with gcc 2016-03-01 10:00:58 +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
Nikolaj Bjorner 830a99aab4 finish minimization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-01 00:04:03 -08:00
Nikolaj Bjorner 4a15d756d7 uint64_t -> uint64 for cross platform
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 22:16:03 -08:00
Nikolaj Bjorner b90bc4e685 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 21:15:44 -08:00
Nikolaj Bjorner 3b6eef05c9 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-29 20:23:29 -08:00
Nikolaj Bjorner 6cf76f2113 remove references to _DEBUG use Z3DEBUG instead
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 20:23:20 -08:00
Andres Nötzli c9269c1983 Fix documentation for floating-point comparisons 2016-02-29 19:12:14 -08:00
Nikolaj Bjorner 7ac5e67538 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-29 17:04:32 -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 43202572ee bv_bounds: switch from rational to uint64
this limits the analysis to 64-bit BVs, but gives a speedup of up to one order of magnitude
2016-02-29 17:23:54 +00:00
Nikolaj Bjorner 9efc7f4aea turn on model completion in validation code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 09:06:20 -08:00
Nikolaj Bjorner d89c39cbe2 apply t()
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 08:36:25 -08:00
Nuno Lopes 006dc147a8 fix build with gcc 5 2016-02-29 14:34:48 +00:00
Nikolaj Bjorner 7656adc483 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-28 17:05:52 -08:00
Nikolaj Bjorner df2d7e7628 add intersection using symbolic automata facility
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-28 17:05:12 -08:00
Nuno Lopes c1eb1cc3f2 bv_bounds: improve perf of push/pop 2016-02-28 20:07:39 +00:00
Nuno Lopes e7a360ca08 ctx_simplify: remove virtual push() method 2016-02-28 17:57:40 +00:00
Nuno Lopes 51687b2be7 bv_bounds: ensure (bvule x maxuint) is simplified to true 2016-02-28 10:56:48 +00:00
Nikolaj Bjorner e659845bc0 tune handling of contains, avoid redundant equalities, merge use of indexof.left/right with contains.left/right adding only least-ness constraints in the context of index
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-27 09:56:11 -08:00
Nikolaj Bjorner 1c630ccc9a Merge branch 'master' of https://github.com/Z3Prover/z3 into HEAD 2016-02-26 18:15:57 -08:00
Nikolaj Bjorner ce8862d415 fix bug in conflict clause generation in seq-branch-variable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-26 18:15:45 -08:00
Nuno Lopes 97d6098d00 bv_bounds: make may_simplify() more aggressive for the common case of a single comparison
fix expr_has_bounds to handle cases like (bvadd (ite c t e) ...)
2016-02-25 19:41:01 +00:00
Nuno Lopes 6563e458f0 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-25 16:53:45 +00:00
Nuno Lopes c693c990df bv_bounds: speedup up to 10x in larger formulas
introduce a may_simplify() function to short-circuit evaluation of expression trees that are guaranteed to not be simplifiable
2016-02-25 16:53:35 +00: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
Nuno Lopes c1aa33339d bv_bounds: early exit in is_bound in case the expr is not boolean
~2% speedup
2016-02-25 09:32:10 +00:00
Nikolaj Bjorner 4c408165ab Merge branch 'master' of https://github.com/Z3Prover/z3 into HEAD 2016-02-24 08:55:28 -08:00
Nikolaj Bjorner 5679fb5d6b experimenting with alternative prefix encodings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-24 08:55:22 -08:00
Nikolaj Bjorner 4e7a867cd9 Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-23 18:42:01 -08:00
Nikolaj Bjorner d5383e2387 fix bug in definition of rewrite rule for replace, tighten constraints for tightest-prefix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-23 18:41:56 -08:00
Nikolaj Bjorner 8c68aed69e Merge branch 'master' of https://github.com/Z3Prover/z3 into HEAD 2016-02-23 08:11:09 -08:00
Nuno Lopes 64888b6b19 ctx_simplify: fix bug in simplification of or exprs
this triggered when the or covers the whole space -> true
2016-02-23 10:37:01 +00:00
Nuno Lopes 12458b1a84 remove dead code in qfufbv 2016-02-22 10:22:56 +00:00
Nikolaj Bjorner 63c138c08e add option to enable equality propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-21 11:16:13 -08:00
Nikolaj Bjorner 8c538fd3f0 setting partial equivalence priority lower so that it doesn't intefere with inlining (partial fix to the fact that inlining will remove such implicit relations). Using short-circuit negation in qe to avoid redundant double negations in intermediary results
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-21 10:31:13 -08:00
Nikolaj Bjorner d4f41c0420 add goal context for simplifier, disable equality creation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-20 10:13:24 -08:00
Nikolaj Bjorner c7abc11ce0 Merge branch 'master' of https://github.com/Z3Prover/z3 into HEAD 2016-02-19 08:23:32 -08:00
Nikolaj Bjorner bff10527d1 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-19 08:23:27 -08:00
Nuno Lopes 7d3af70a63 ctx-simplify: fix mem leak of simplifier 2016-02-19 11:08:01 +00:00
Nuno Lopes c618838ed9 bv_bounds: fix crash in push() when realloc happened 2016-02-19 11:06:22 +00:00
Nuno Lopes 121b3b60f3 bv_bounds/ctx_simplify: improve handling of (ite x a b) where (not x) is proved to be false 2016-02-19 09:42:42 +00:00
Nikolaj Bjorner 73f93dbadb Merge branch 'master' of https://github.com/Z3Prover/z3 2016-02-18 18:10:30 -08:00
Nikolaj Bjorner a073b37ce3 fix bugs in seq solver: add relevancy and axiom
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-18 18:10:16 -08:00
Nikolaj Bjorner 5962ca2a62 seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-18 12:08:35 -08:00
Nuno Lopes 73da4dda07 add a bv rewrite pattern:
(bvsle (- x (srem x c1)) c2) -> (bvsle x (+ c1 c2 - 1))
2016-02-18 17:45:55 +00:00
Nuno Lopes d32b4c71d1 [bv_bounds] introduce a tight bit in intervals to denote they are tight (over and under approx)
use this to ensure certain transformations remain sound
2016-02-18 15:53:11 +00:00
Nikolaj Bjorner 67958efed2 add fixed length heuristic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-17 21:20:39 -08:00
Nuno Lopes 8718c1c99f bv_bounds: simplify negated expressions as well 2016-02-17 19:14:02 +00:00
Nikolaj Bjorner 16ced7cda5 Merge pull request #453 from delcypher/fix_clause_allocator_bound_check
Fix incorrect (off by one) bound check in clause_allocator
2016-02-17 08:50:51 -08:00
Nuno Lopes a4cfcd4550 bv_bounds: fix bug in interval intersection for non-wrapping disjoint values 2016-02-17 16:32:43 +00:00
Nuno Lopes ac20d8bc11 bv_bounds: fix intersection of wrapped intervals
e.g., [117, 115] /\ [115, 113] -> [115, 113]
2016-02-17 15:41:12 +00:00
Nuno Lopes 98a92b9255 bv_bounds tactic: change representation to intervals
Code by myself and Nikolaj Bjorner
2016-02-17 10:02:40 +00:00
Dan Liew 6c966bba59 Fix incorrect (off by one) bound check. Also assert that we don't
increment ``m_num_segments`` beyond the maximum value
(``c_max_segments``).

This is related to #436.

When doing an AddressSanitized build and running the ``c_example``
it looks like Z3 tries to create too many segments and index out of
bounds. Fixing the checks here causes them to fail which should help
us narrow down the problem.
2016-02-16 14:04:21 +00:00
Nuno Lopes c05a0dfa61 revert my previous attempt to simplify the destructor of ctx-simplify
there can be assertions at level 0
2016-02-16 13:10:17 +00:00
Christoph M. Wintersteiger 928858452f Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-02-16 12:03:50 +00:00
Nuno Lopes 293566d464 ctx-simplify: simplify destructor 2016-02-16 09:53:04 +00:00