3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-18 14:49:01 +00:00
Commit graph

151 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 7c6540e18f recursive function definitions; combine model-building functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-03 07:59:03 -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
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
Mikolas Janota 470f8bca73 Merge remote-tracking branch 'upstream/master' into lackr 2016-01-26 16:51:57 +00:00
Mikolas Janota c2edf2c5bf Merge remote-tracking branch 'upstream/master' into lackr 2016-01-25 13:04:46 +00:00
Nikolaj Bjorner 924f03c6de fixing bugs in seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-23 10:38:49 -05:00
Nikolaj Bjorner 85d44c5d66 fix axioms for extract, add extensionality checking for shared variables, convert exceptions to unknown status per #419
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-18 11:09:41 +05:30
Nikolaj Bjorner a295dd48dc add seq_rewriter to model_evaluator, remove th_rewriter additional step in validator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-15 04:02:48 +05:30
Nikolaj Bjorner 7cbd59bf06 enhance model validation to invoke rewriter if result isn't true using the simplify-based model evaluator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-01-15 03:40:33 +05:30
Mikolas Janota 5706df30c6 Fixing soft timeout for check-sat-using. 2016-01-08 16:17:34 +00:00
Nikolaj Bjorner 521271e559 moving to resource managed cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 17:46:22 -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 32b6b2da44 moving to resource managed cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 13:13:11 -08:00
Nikolaj Bjorner 58411f64e8 seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-10 20:25:12 -08:00
Nikolaj Bjorner 5eb23e1e7a seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-10 19:20:16 -08:00
Nikolaj Bjorner 75359c580e add basic rewriting to strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-05 12:02:33 -08:00
Nikolaj Bjorner 3f02beb820 reset-assertions resets everything (also declarations, and we take scopes) when global-declarations is false. v2.5
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-03 10:18:40 -08:00
Nikolaj Bjorner 5d61c871b0 add some of the SMT2.5 features
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-02 19:14:47 -08:00
Nikolaj Bjorner e2565d8d82 add some of the SMT2.5 features
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-02 18:41:10 -08:00
Nuno Lopes b26735a887 fix build with gcc
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2015-11-22 11:24:30 +00:00
Nikolaj Bjorner c1a6163bda disable aig tactic in inc_sat_solver (it can blow up the size of formulas significantly without sharing) and fix configuration update bug for optimization context exposed in example by Corina
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-20 14:34:31 -08:00
Nikolaj Bjorner 1575dd06a7 expose labels from optimization. Move printing of objectives to after sat/unsat. Cahnge format to something that is somewhat related to how other output is created. Issue #325.
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-18 09:42:12 -08:00
Christoph M. Wintersteiger 6b5e49c4a1 Added checks for uint parameter values in context_params 2015-11-14 17:25:18 +00:00
Christoph M. Wintersteiger c2aee86e4e Added new SMT logic names 2015-11-06 16:24:44 +00:00
Christoph M. Wintersteiger 20715bbf3b Fixed initialization of interpolation context so it is properly disabled when solving SMT v1 benchmarks. 2015-11-03 12:29:02 +00:00
Christoph M. Wintersteiger 949ad4d2fc Trailing whitespace removed. 2015-11-03 12:28:10 +00:00
Nikolaj Bjorner ac3edbbaaa add line/position information to unsupported command reports per zeph pull request
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-10-30 19:23:31 -07:00
Christoph M. Wintersteiger cab42d2c66 Clarified documentation of par-or tactic.
Relates to #269.
2015-10-28 18:50:22 +00:00
martin-neuhaeusser 99e4b321bd Fixed typo that accidentally prints warning message if a Z3 context is created with the 'timeout' parameter 2015-10-07 17:27:05 +02:00
Nikolaj Bjorner 9b3e242990 adding rlimit resource limit facility to provide platform and architecture independent method for canceling activities
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-09-28 13:37:59 -07:00
Nikolaj Bjorner ef945fbf77 add joinability type checking
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-30 15:15:55 -03:00
Christoph M. Wintersteiger 9d31b64273 Enforced well_sorted_check/type_check by default (to match default parameter settings and to produce better error messages).
Fixes #180

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-07-30 09:32:14 +01:00
Nikolaj Bjorner fc3e1af4a9 add dump_models option per suggestion from Pankaj Chauhan
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-24 09:45:17 -07:00
Ken McMillan e6516f549d fail gracefully on interpolation errors 2015-07-10 14:39:11 -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 940fed16e1 enforce stringstream formatting to avoid default format routine. fixes issue #149
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-06 09:11:52 -07:00
Nikolaj Bjorner 564da787fb add count of memory allocations and way to limit allocations globally. Fix purification in nlsat_smt to fix regressions on QF_UFNRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-06-22 07:45:40 +02:00
Alex Horn e6ffa5d2a5 Enable datalog plugin for AST extensions
Signed-off-by: Alex Horn <t-alexh@microsoft.com>
2015-06-10 19:59:57 +01:00
Nikolaj Bjorner 137b8c8e04 Merge branch 'unstable' of https://github.com/Z3Prover/z3 into unstable 2015-05-29 08:55:53 -07:00
Nikolaj Bjorner a2448be0cd print pareto model in check-sat too
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-05-29 08:55:44 -07:00
Christoph M. Wintersteiger f2f6fc1994 Added QF_BVFP logic alias for QF_FPBV 2015-05-29 13:58:23 +01:00
Christoph M. Wintersteiger 8f86542f26 Added QF_ALIA to supported logics.
Fixes #90
2015-05-19 13:38:26 +01:00
Christoph M. Wintersteiger db411eef25 Improved supported logics checks for FPA logics. 2015-05-19 13:35:19 +01:00
Christoph M. Wintersteiger 32fb679066 tabs 2015-05-19 11:01:15 +01:00
Nikolaj Bjorner 9377779e58 merge with unstable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-04-30 10:40:03 -07:00
Ken McMillan af444beb2e re-indenting interp and duality 2015-04-15 12:22:50 -07:00