3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 08:35:31 +00:00
Commit graph

4069 commits

Author SHA1 Message Date
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