3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00
Commit graph

164 commits

Author SHA1 Message Date
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
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
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
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
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
6cf76f2113 remove references to _DEBUG use Z3DEBUG instead
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 20:23: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
df2d7e7628 add intersection using symbolic automata facility
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-28 17:05:12 -08:00
Christoph M. Wintersteiger
4e37821dde "canceled" -> Z3_CANCELED_MSG
Relates to #431
2016-02-04 13:52:43 +00:00
Nikolaj Bjorner
150c5c283d update re simplification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-15 10:11:39 +05:30
Nikolaj Bjorner
3ff97357a3 fix back rewriting for concat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-14 11:22:11 +01:00
Nikolaj Bjorner
9909c056f0 add range / loop handling for re. Fix regression reading mixed numerals reported by Trentin
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-13 00:49:31 -08:00
Nuno Lopes
bc123dc79b fix build with c++98 compilers 2016-01-05 14:10:32 +00:00
Nikolaj Bjorner
a3c4972c85 seq API, tuning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-03 17:16:13 -08:00
Nikolaj Bjorner
e10ecad5dc seq API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-02 22:52:28 -08:00
Nikolaj Bjorner
bd9b5b5735 seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-29 10:13:19 -08:00
Nikolaj Bjorner
e2fab0a555 seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-28 18:15:48 -08:00
Nikolaj Bjorner
739043e273 seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-28 10:28:43 -08:00
Nikolaj Bjorner
31302ec851 automata
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-25 15:22:26 -08:00
Nikolaj Bjorner
659a7ede84 automata
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-25 04:25:23 -08:00
Nikolaj Bjorner
65d147106e automata
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-24 12:01:59 -08:00
Nikolaj Bjorner
1bbf7813b0 automata
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-24 03:30:02 -08:00
Nikolaj Bjorner
2a7f2ab7f8 sequence automaton
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-23 20:33:55 -08:00
Nikolaj Bjorner
f414869456 add symbolic automaton
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-23 19:46:10 -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
96d1066c6a reworking cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 16:43:48 -08:00
Nikolaj Bjorner
baee4225a7 reworking cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 16:21:24 -08:00
Nikolaj Bjorner
981f8226fe moving to resource managed cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 13:36:47 -08:00
Nikolaj Bjorner
61dbb6168e cleanup cancelation logic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 12:35:35 -08:00
Nikolaj Bjorner
6b82b949cf Make Groebner basis computation interruptable. Exponsed in issue #269
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-10-28 11:39:59 -07:00
Christoph M. Wintersteiger
d4b66538f9 Bug/assertion fix for power monomials in nlsat.
Previously triggered an assertion on regressions/smt2/fp-to_real-1.smt2, but only on OSX and FreeBSD
2015-09-17 16:31:51 +01:00
Christoph M. Wintersteiger
f3441c6a9b tabs and indentation 2015-09-17 13:25:22 +01:00
Nikolaj Bjorner
963981b3a6 fix memory alias bug and non-termination bug exposed by issue #184
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-08-31 14:45:10 -07:00
Nikolaj Bjorner
7c9dd6b8a8 fix exception unsafety leading to double free, issues #184 and issue #175. Location and fix strategy suggested by Nuno
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-08-09 00:34:59 +02: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
c09ac5422b fix by anomaly detection, issue #118
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-06-02 10:42:03 -07:00
Nikolaj Bjorner
e483efd3f4 fixes to Euclidean solver, fixes #100
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-27 09:21:20 -07:00
Nikolaj Bjorner
cb00555635 local changes
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-27 09:18:52 -07:00
Christoph M. Wintersteiger
4da7286a7b Fixed various signed/unsigned conversion warnings. 2015-05-23 17:30:19 +01:00
Nuno Lopes
c577ab361b fix assorted undefined behaviors caught by clang
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2015-05-23 11:45:12 +01:00
Nikolaj Bjorner
c969d78042 throw exception instead of debug mode assertion in ast_manager on malformed input
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-21 15:07:01 -07:00
Nikolaj Bjorner
203c5015c8 fix debian amd64 warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-05-18 15:17:21 -07:00
Nuno Lopes
6c22edc988 fix assorted compiler warnings
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2015-05-16 11:44:58 +01:00
Nikolaj Bjorner
9377779e58 merge with unstable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-04-30 10:40:03 -07:00
Nikolaj Bjorner
80a13977fc fix race condition from cancellation exposed by build regression tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-04-15 05:44:10 +01:00
Nikolaj Bjorner
8141dadc89 break on small cores
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-02-08 10:22:06 +01:00