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

39 commits

Author SHA1 Message Date
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
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 a7e2fb31e3 updates to resource exceptions, update master possibly handle pull request issue
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-12 11:36:49 -08:00
Nikolaj Bjorner 2a051719d8 cleanup deprecated critical sections, fix cancellation for par_or_else tactic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-12 09:43:00 -08:00
Nikolaj Bjorner 32b6b2da44 moving to resource managed cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 13:13:11 -08:00
Nikolaj Bjorner d121d031e9 fix unintialized memory read exposed by nightly build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-09-06 14:15:08 -07:00
Nikolaj Bjorner 4be3926daa use signed character type declarations for cross platform compilation. Fixes issue #210
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-09-05 16:30:58 -07:00
Nikolaj Bjorner 1257d1d990 fix issue #196 related to resetting qe-sat tactic state over multiple calls
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-09-01 12:36:45 -07:00
Nikolaj Bjorner 4bc044c982 update header guards to be C++ style. Fixes issue #9
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-08 23:18:40 -07:00
Nikolaj Bjorner bf5419d44a move functionality from qe_util to ast_util
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-06-23 14:33:45 +02:00
Nikolaj Bjorner b08ccc7816 added missing Copyright forms
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-06-10 11:54:02 -07:00
Nikolaj Bjorner ffff006945 remove old files
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-06-02 09:15:08 -07:00
Nikolaj Bjorner ed7e0e11a8 n/a
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-05-28 20:55:13 -07:00
Nikolaj Bjorner e47eea2c61 n/a
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-28 17:22:34 -07:00
Nikolaj Bjorner ac732a500c add first file
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-28 15:20:25 -07:00
Nikolaj Bjorner 28f6adf79e disable hybrid relations pending overhaul/deletion of product relations
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-20 09:21:55 -07:00
Nikolaj Bjorner e28701a64c add assertions to simplifier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-01-14 22:09:48 +05:30
Nikolaj Bjorner ce18421a7a fix box
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-15 14:29:39 -07:00
Nikolaj Bjorner 4ea3ed7e27 ensure parameters are updated and ensure that global use of auto-config is not obscured by smt.auto-config scoping
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-07 11:00:45 -07:00
Nikolaj Bjorner 19e291f479 qe fix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-06 08:43:35 -07:00
Nikolaj Bjorner 6d8daacdec fix check for satisfiability before calling final_check
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-06 08:35:05 -07:00
Nikolaj Bjorner 18e77bd539 fix qe for undef scenarios, codeplex issue 130
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-05 18:36:15 -07:00
Nikolaj Bjorner 0ccd56b847 fix qe on undef
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-05 18:33:20 -07:00
Nikolaj Bjorner c09903288f have free variable utility use a class for more efficient re-use
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-09-15 16:14:22 -07:00
Nikolaj Bjorner 19050d1c4c merge Fixedpoint.cs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-07-28 12:20:48 -07:00
Nikolaj Bjorner e4dedbbefc fix quantifier elimination bugs reported by Berdine and Bornat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-07-14 15:38:22 +02:00
Nikolaj Bjorner 84d971b69a working on HS
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-06-17 17:05:05 -07:00
Nikolaj Bjorner 960e8ea1d5 working on hitting sets
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-06-08 14:12:54 +01:00
Nikolaj Bjorner a1ee1ec4cc add virtal destructor to qe_sat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-05-21 12:28:07 -07:00
Nikolaj Bjorner 2c69aa0df1 fix duplicate class
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-03-22 00:06:34 -07:00
Nikolaj Bjorner a594597906 improve equality solving in qe-lite
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-02-12 10:54:00 -08:00
Nikolaj Bjorner 8ab04fb05b testing qe_arith
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-09-12 15:27:09 -07:00
Nikolaj Bjorner 1741671a9c update test in qe_arith
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-09-12 13:32:35 -07:00
Nikolaj Bjorner 196aed785e fixes for qe_arith
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-09-12 13:27:31 -07:00
Nikolaj Bjorner 4af4466821 add qe_arith routine for LW projection on monomomes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-09-12 12:19:46 -07:00
Nikolaj Bjorner 5908e24728 fix bug missing NNF of equality as IFF reported by Sticksel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-09-06 09:36:15 -07:00
Nikolaj Bjorner 06a858ef3d refactor closure code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-09-01 13:43:19 -07:00
Nikolaj Bjorner 9e61820125 re-organizing muz
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-08-28 21:49:53 -07:00
Nikolaj Bjorner 137339a2e1 split muz_qe into two directories
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-08-28 12:08:47 -07:00