3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00
Commit graph

197 commits

Author SHA1 Message Date
Dan Liew a1b6316e2e [TravisCI] Try to unbreak running Python regression tests under ASan. 2017-10-16 09:49:54 +01:00
Dan Liew 88fb31ac08 [TravisCI] Add RUN_API_EXAMPLES option so that we can disable
building/running examples in some configurations.
2017-10-16 08:56:17 +01:00
Dan Liew e51ce8bcaf [TravisCI] Try again to not show suppressions by default 2017-10-16 08:56:17 +01:00
Dan Liew ead6e56d15 [TravisCI] Swap run_quiet and run_non_native_binding. In the
previous order `grep` inside `run_quiet` would get ASan LD_PRELOAD'ed
which would sometimes fail.
2017-10-16 08:56:17 +01:00
Dan Liew ecadef6e48 [TravisCI] Try to fix case in run_quiet where the script would fail
with.

```
-ne: unary operator expected
```
2017-10-16 08:56:17 +01:00
Dan Liew ad2a0a0085 [TravisCI] Don't print sanitizer suppressions by default because
that breaks Z3's regression tests.
2017-10-16 08:56:17 +01:00
Dan Liew fd98593a58 [ASan] Ignore Clang OpenMP leaks for now. 2017-10-16 08:56:17 +01:00
Dan Liew 2dd1a4046d [TravisCI] Fix typo 2017-10-16 08:56:17 +01:00
Dan Liew fd391e75a6 [TravisCI] Fix Z3_BUILD_TYPE variable that was not propagated
into the Docker image as an environment variable.
2017-10-16 08:56:17 +01:00
Dan Liew 675a3ae9dd [UBSan] Remove a bunch of suppressions. 2017-10-16 08:56:17 +01:00
Dan Liew db7b2e989d [TravisCI] Try to run the Python and .NET examples under ASan. 2017-10-16 08:56:17 +01:00
Dan Liew 8d600050db [LSan] Remove suppression files. The were fixed on rebase 2017-10-16 08:56:17 +01:00
Dan Liew ff5df20deb [LSan] Don't run c_maxsat_example with LeakSanitizer because
it contains leaks that the Z3 developers don't intend to fix.
2017-10-16 08:56:17 +01:00
Dan Liew f90fe928af [LSan] Suppress another leak until I can figure out what is going on. 2017-10-16 08:56:17 +01:00
Dan Liew bcff86a316 [LSan] Add suppression for part of #1297. 2017-10-16 08:56:17 +01:00
Dan Liew a991e44a25 [TravisCI] Fix typo in created directory for suppression files 2017-10-16 08:56:17 +01:00
Dan Liew 5bcdea1ae5 [TravisCI] For ASan/LSan use larger context so we get larger stack
traces if needed.
2017-10-16 08:56:17 +01:00
Dan Liew 4db5980a23 [TravisCI] Fix getting proper stack traces for ASan/LSan. The
`llvm-symbolizer` tool needs to be installed and ASan/LSan needs
to be told where to find it.
2017-10-16 08:56:17 +01:00
Dan Liew 71dcec3113 [UBSan] Update UBSan suppression file to suppress all undefined
behaviour I have observed running in CI.
2017-10-16 08:56:17 +01:00
Dan Liew 9455391f1f [TravisCI] Don't run the python binding system tests when building
with UBSan.

This is a workaround. We can't fix this unless we build libz3 with
a shared UBSan runtime.
2017-10-16 08:56:17 +01:00
Dan Liew f756bf6c86 [TravisCI] Fix undefined SCRIPT_DIR variable 2017-10-16 08:56:17 +01:00
Dan Liew f15766baee [TravisCI] Don't run the non-native example when building with UBSan.
This a workaround. Right now `libz3` gets linked against a static
UBSan runtime which means none of the non-native language bindings
(e.g. python) can load `libz3` due to undefined symbols. We need
to link `libz3` against a shared UBSan runtime to fix this.
2017-10-16 08:56:17 +01:00
Dan Liew a9fcfc531b [TravisCI][CMake] Add Z3_C_EXAMPLES_FORCE_CXX_LINKER CMake option
and propagate its value into the C API examples.

This flag forces the C API examples to use the C++ compiler as the
linker rather than the C compiler. This a workaround to avoid linking
errors when building with UBSan.
2017-10-16 08:56:17 +01:00
Dan Liew 64ee9f168d [TravisCI] Add ASan/LSan/UBSan suppression files and use them in
CI.
2017-10-16 08:56:17 +01:00
Nikolaj Bjorner c1b243a8e3 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-07 19:24:30 +01:00
Dan Liew 0be28b66fe [TravisCI] Update out of date README.md file. 2017-10-06 12:57:46 +01:00
Dan Liew 2519719d3f Fix typo 2017-10-06 12:57:46 +01:00
Dan Liew d47aea3987 [TravisCI] Workaround slow unit test execution for Debug builds.
Unit tests execute very slowly in Debug (i.e. unoptimized) builds.  This
causes TravisCI to terminate the job due to no console output being
seen.

To workaround this for the debug builds the tests are just compiled
but not executed. To implement this the `RUN_UNIT_TESTS` environment
variable now can take on the values `BUILD_ONLY`, `BUILD_AND_RUN`,
and `SKIP` rather than `0` or `1`.
2017-10-06 12:57:42 +01:00
Dan Liew 0633d5819f [TravisCI] Fix bug. PYTHON_EXECUTABLE should not be in common
defaults. The location is dependent on the implementation.

This triggered a build failure on TravisCI because the location
of the default Python binary is different to what is in the Docker
container.
2017-10-05 15:09:16 +01:00
Dan Liew eb975a49d6 [TravisCI] Fix bug where Z3_BUILD_TYPE was not being passed as
a Docker build argument.

Also update an out of date comment.
2017-10-05 14:56:31 +01:00
Dan Liew 53fc6ac11b [TravisCI] Refactor as many CI default options as possible so that
the Docker and "TravisCI macOS" builds share most of the same defaults
by sourcing the `ci_defaults.sh` file.
2017-10-05 14:56:15 +01:00
Nikolaj Bjorner 651587ce01 merge with master branch
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-19 09:39:22 -07:00
Dan Liew 850c2ebc0c [TravisCI] Add scripts to build and test Z3 on macOS (OSX) and
add a single configuration to TravisCI to test.

TravisCI is very slow at running macOS jobs so just have one
configuration for now.
2017-08-12 19:14:06 +01:00
Nikolaj Bjorner 6dbfdf3e9c Merge branch 'master' of https://github.com/z3prover/z3 into opt 2017-07-27 17:03:04 -07:00
Dan Liew cbca609af4 [TravisCI] Fix running unit tests.
Previously the `test-z3` executable was run without arguments which
appears to run no tests. To fix this the `/a` argument is passed
which will run all tests that don't require arguments.

This was noticed in #1159 when @KarenHuang2016 reported a failing
test.
2017-07-26 08:57:46 +01:00
Nikolaj Bjorner 30b0d5ba13 Merge branch 'master' of https://github.com/z3prover/z3 2017-07-24 10:49:54 -07:00
Dan Liew 630863619b [TravisCI] Add Z3_WARNINGS_AS_ERRORS environment variable to
control the `WARNINGS_AS_ERRORS` CMake option.
2017-07-09 14:44:20 +01:00
Dan Liew 8310fed528 [TravisCI] Implement TravisCI build and testing infrastructure for Linux
The Linux builds rely on Docker (using Ubuntu 16.04LTS and Ubuntu
14.04LTS) to build and test Z3 so that builds are easily reproducible.

A build status button has been added to `README.md` so that it is
easy to see the current build status.

More documentation can be found in `contrib/ci/README.md`.

This implementation currently tests 13 different configurations. If
build times become too long we can remove some of them.

Although it would be nice to test macOS builds that requires
significantly more work so I have left this as future work.
2017-07-01 11:51:30 +01:00
Nikolaj Bjorner a28a8304b7 Dev (#56)
* introduce int_solver.h

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* add int_solver class

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* track which var is an integer

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add queries for integrality of vars

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* resurrect lp_tst in its own director lp

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add file

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add_constraint has got a body

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* fix add_constraint and substitute_terms_in_linear_expression

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* after merge with Z3Prover

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* adding stub check_int_feasibility()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Dev (#50)

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* small fix in lar_solver.cpp

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* adding some content to the new check_int_feasibility()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Dev (#51)

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding more nlsat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* nlsat integration

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding constraints

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add missing initialization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* test

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* Dev (#53)

* change in a comment

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Disabled debug output

* removing FOCI2 interface from interp

* remove foci reference from cmakelist.txt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding more nlsat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* nlsat integration

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding constraints

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add missing initialization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* debugging nra

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* updates to nra_solver integration to call it directly from theory_lra instead of over lar_solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* n/a

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* integrate nlsat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* tidy

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* preserve is_int flag

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* remove a debug printout

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Dev (#54)

* change in a comment

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Disabled debug output

* removing FOCI2 interface from interp

* remove foci reference from cmakelist.txt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* initial skeletons for nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding more nlsat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* nlsat integration

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding constraints

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add missing initialization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding nra

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* debugging nra

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* updates to nra_solver integration to call it directly from theory_lra instead of over lar_solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* n/a

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* integrate nlsat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* tidy

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* use integer test from lra solver, updated it to work on term variables

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix equality check in assume-eq

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix model_is_int_feasible

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* untested gcd_test()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* call fill_explanation_from_fixed_columns()

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add the call to pivot_fixed_vars_from_basis() to int_solver.cpp::check()

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* port more of theory_arith_int.h

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* use statistics of lar_solver by theory_lra.cpp

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* port more code to int_solver.cpp

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add an assert

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* more int porting

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* fix a bug in pivot_fixed_vars_from_basis

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* small change

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* implement find_inf_int_base_column()

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* catch unregistered vars in add_var_bound

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add a file

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* compile for vs2012

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* fix asserts in add_var_bound

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* fix the lp_solver init when workig on an mps file

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* towards int_solver::check()

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* change in int_solver::check() signature

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>

* add handlers for lia moves

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* spacing

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-06-28 13:12:12 -07:00
Dan Liew 5c3b11f034 [CMake] Modify contrib/cmake/bootstrap.py to do nothing except
print a warning.

Now that the CMake files have been moved into their intended location
it is no longer necessary for this script to exist.

However we do not want to break out-of-tree scripts that build Z3 using
CMake to suddenly break. So the script has been modified to do nothing
except print a warning.

Eventually we should remove this script.
2017-06-12 11:59:39 +01:00
Dan Liew 4b517b96df [CMake] Move CMake files into their intended location so the
`contrib/cmake/bootstrap.py` script no longer needs to be executed.

The previous location of the CMake files was a compromise proposed
by @agurfinkel in #461. While this has served us well (allowing progress
to be made) over time limitations of this approach have appeared.

The main problem is that doing many git operations (e.g. pull, rebase)
means the CMake files don't get updated unless the user remembers to
run the script. This can lead to broken and confusing build system
behaviour.

This commit only does the file moving and necessary changes to
`.gitignore`. Other changes will be done in subsequent commits.
2017-06-12 11:59:00 +01:00
Nikolaj Bjorner edb164587f get rid of a simplifier dependency
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-23 10:12:32 -07:00
Nikolaj Bjorner f1f0f78617 remove foci reference from cmakelist.txt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-19 18:31:34 -07:00
Nikolaj Bjorner 64f3b3e316 remove lp_main from test branch to ensure test build only builds a single entry point
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-12 07:59:16 -07:00
Nikolaj Bjorner 905cf08e5d missing files
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 14:11:33 -07:00
Nikolaj Bjorner 911b24784a merge LRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 10:46:11 -07:00
Nikolaj Bjorner 8eb26e25c2 add new files to cmakelist.txt files
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-05 17:03:03 -04:00
Dan Liew 1db07f1189 [CMake] Remove BYPRODUCTS declaration for api_docs target.
This breaks the `clean` rule when using Ninja as the CMake
generator. Unfortunately this means `clean` doesn't try to
remove the generated documentation anymore when using Ninja.
2017-05-04 15:29:47 +01:00
Dan Liew 6e07d6dd2d [CMake] Override CMake's default flags for GCC/Clang as we were doing
before 4cc2b292c0.

It's useful to be able to control the defaults and CMake's internal
logic for GCC/Clang is simple enough that doing this makes sense.

It would be nice to do the same for MSVC but CMake's internal
logic is more complicated so for now it's better that we just use
CMake's default.
2017-04-29 17:45:02 +01:00
Dan Liew 2a919cf16e [CMake] Duplicate the remaining linker flags from the old build system. 2017-04-29 16:22:46 +01:00
Dan Liew d032dbcbb2 [CMake] When using MSVC set the /SUBSYSTEM: argument given to
the linker. This mimics the behaviour of the old build system.
2017-04-29 16:22:46 +01:00
Dan Liew 364bcde6c1 [CMake] When building with MSVC pass the /STACK: argument to the
linker like the old build system does.
2017-04-29 16:22:46 +01:00
Dan Liew c9aac0ba77 [CMake] When building with MSVC try to disable incremental linking
for all builds.
2017-04-29 16:22:46 +01:00
Dan Liew 5893aea602 [CMake] When building with MSVC and without WARNINGS_AS_ERRORS
pass `/WX-` to MSVC. Although this is not necessary this duplicates
the behaviour of the old build system.
2017-04-29 16:22:46 +01:00
Dan Liew 870be706e9 [CMake] Try to do a better job of matching the old build system's
compiler defines and flags when using MSVC.

There are lots of defines and flags that I'm unsure about so in
some cases I've changed the behaviour slightly (if I'm confident
the behaviour in the old build system is wrong) or not added the
flag/define at all but just left comments noting what the old build
system did and why I disagree with the old build system's choices.
2017-04-29 16:22:46 +01:00
Dan Liew 0e1343e78d [CMake] Add support for link time optimization (LTO).
This analogous to the `--optimize` flag in the Python/Makefile
build system except that we now support doing LTO with Clang/GCC
as well. However it is probably best to avoid doing LTO with
Clang or GCC for now because I see a bunch of warnings about
ODR violations when building with LTO.

LTO can be enabled with the new `LINK_TIME_OPTIMIZATION` option
which is off by default.
2017-04-29 16:22:46 +01:00
Dan Liew fb403229bd [CMake] CMake's default value for CMAKE_CXX_FLAGS includes /W3
remove this so we can have fine grained control of warnings.
2017-04-29 16:22:46 +01:00
Dan Liew fe1af4bcdb [CMake] Teach build system to pass /fp:precise to compiler when
using MSVC. This is set by the old build system but we weren't setting
it. This actually MSVC's default but in an effort to try to behave
more like the old build system we will set it anyway.
2017-04-29 16:22:46 +01:00
Dan Liew 4cc2b292c0 [CMake] Remove compiler flag overrides and support for C language.
The setting of overrides was broken (the CXX flags were not set but
the C flags were) and we aren't even using the C compiler any more.

The C compiler is used by the example C project but that is built
as an external project now so we don't need C support anymore.

The setting of defaults was also very fragile. CMake has quite
complicated support here (e.g. MSVC with a clang based tool chain) which
would likely not work properly with the override approach as it existed.

This means we loose some of the custom linker flags we were setting for
MSVC but we were never doing a great job of replicating the exact set of
flags used in the old build system anyway. Subsequent commits will
gradually fix this.
2017-04-29 16:22:46 +01:00
Nikolaj Bjorner 69aa5ca877 Merge pull request #984 from delcypher/cmake_doxygen
[CMake][Doxygen] Support building/installing API documentation and fix lots of bugs
2017-04-27 06:58:32 -07:00
Nikolaj Bjorner 8032217fd1 tuning and fixing consequence finding, adding dimacs evaluation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-04-26 13:53:37 -07:00
Dan Liew d4b7b489d0 [CMake] Teach CMake to build the documentation for the API bindings
and install them. The target for building the documentation is
`api_docs`.

This is off by default but can be enabled with the
`BUILD_DOCUMENTATION` option. The C and C++ API documentation
is always built but the Python, ".NET", and Java documentation are
only built if they are enabled in the build system. The rationale
for this is that it would be confusing to install documentation
for API bindings that are not installed.

By default `ALWAYS_BUILD_DOCS` is on which will slow down builds
significantly but will ensure that when the `install` target is
invoked the documentation is up-to-date. Unfortunately I couldn't
find a better way to do this. `ALWAYS_BUILD_DOCS` can be disabled
to get faster builds and still have the `api_docs` target available.
2017-04-26 11:02:36 +01:00
Christoph M. Wintersteiger 95cf1447ea Added maintainers.txt for qprofdiff 2017-04-10 13:18:45 +01:00
Christoph M. Wintersteiger 9a757ffffe Result ordering fix for qprofdiff 2017-04-07 18:12:33 +01:00
Christoph M. Wintersteiger 23f4a0c332 Build fix for qprofdiff 2017-04-07 18:12:26 +01:00
Christoph M. Wintersteiger f3c990d356 Fixes for qprofdiff 2017-04-07 18:12:16 +01:00
Christoph M. Wintersteiger d390885757 Added utility to compare quantifier instantiation profiles generated via smt.qi.profile=true 2017-04-06 18:37:29 +01:00
Dan Liew 28493622c2 [CMake] On Windows when building the examples copy the Z3 library
into the directory of the example executable so that it works "out
of the box".
2017-03-13 12:37:29 +00:00
Dan Liew ac85c68ccb [CMake] Fix examples linking against libz3 when it is built as a
static library on Linux.
2017-03-13 11:53:33 +00:00
Dan Liew db5520c71d [CMake] Build c_example, cpp_example and z3_tptp5 as external
projects.

This works by giving each example it's own CMake build system and
then consuming Z3 via the Z3 CMake config package from the build
tree.
2017-03-13 11:53:33 +00:00
Dan Liew d9617841e0 [CMake] Python examples should only be copied over if python bindings
are being built.
2017-03-13 11:53:33 +00:00
Dan Liew 73614abf37 [CMake] Implement generation of Z3Config.cmake and Z3Target.cmake
file for the build and install tree.

These files allow users of CMake to use Z3 via a CMake config package.
Clients can do `find_package(Z3 CONFIG)` to get use the package from
their projects.

When generating the files for the install tree we try to generate
the files so that they are relocatable so that it shouldn't matter
if the installed files aren't in the CMAKE_INSTALL_PREFIX when
a user consumes them. As long as the relative locations of the files
aren't changed things should still work.

A new CMake cache variable `CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR` has been
added so that the install location of the Z3 CMake package files can be
controlled.

This addresses #915 .
2017-03-13 11:53:27 +00:00
Dan Liew 2cb4223979 [CMake] Support including Git hash and description into the build.
CMake will automatically pick up changes in git's HEAD so that
the necessary code is rebuilt when the build system is invoked.

Two new options `INCLUDE_GIT_HASH` and `INCLUDE_GIT_DESCRIBE` have been
added that enable/disable including the git hash and the output of `git
describe` respectively. By default if the source tree is a git
repository both options are on, otherwise they are false by default.

To support the `Z3GITHASH` macro a different implementation is used from
the old build system. In that build system the define is passed on the
command line. This would not work well for CMake because CMake
conservatively (and correctly) rebuilds *everything* if the flags given
to the compiler change. This would result in the entire project being
rebuilt everytime git's `HEAD` changed.  Instead in this implementation
a CMake specific version of `version.h.in` (named `version.h.cmake.in`)
is added that uses the `#cmakedefine` feature of CMake's
`configure_file()` command to define `Z3GITHASH` if it is available and
not define it otherwise. This way only object files that depend on
`version.h` get re-built rather than the whole project.

It is unfortunate that the build systems now have different `version.h`
file templates. However they are very simple and I don't want to
modify how templates are handled in the python/Makefile build system.
2017-03-12 22:11:59 +00:00
Christoph M. Wintersteiger c5fe591dbc Merge pull request #739 from angr/fix/soname_version
Set soname version correctly in cmake build
2017-02-04 20:39:50 +00:00
Christoph M. Wintersteiger c56edc63d2 Merge pull request #882 from dwoos/sine-filter
Add basic Sine Qua Non filtering
2017-02-04 20:24:09 +00:00
Nikolaj Bjorner 37ee4c95c3 adding parallel threads
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-30 02:09:08 -08:00
Doug Woos a9d61d48ae Add basic Sine Qua Non filtering 2017-01-27 11:22:39 -08:00
Christoph M. Wintersteiger 625681f82f Updated cmake build 2017-01-16 15:59:16 +00:00
Nikolaj Bjorner bc6b3007de remove unused features related to weighted check-sat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-13 20:53:22 -08:00
Nikolaj Bjorner dda1774fa1 update CMakeList to remove polynomial-factorization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-10 08:21:49 -08:00
Nikolaj Bjorner 331658f208 remove polynomial factorization as suggested by issue #852
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-09 21:30:54 -08:00
Andrew Dutcher 657b0de2fc cmake build: set SOVERSION to include the minor version number 2016-12-11 08:27:35 -08:00
Andrew Dutcher aca3d0545c Set soname version correctly in cmake build 2016-12-11 08:22:24 -08:00
Nikolaj Bjorner ea601dd403 fix and coallesce clique functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-11-19 03:55:48 -08:00
Nikolaj Bjorner 51a4085910 check for logic in solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-11-04 15:19:11 +00:00
Nikolaj Bjorner fa1a0aa7ba remove buggy and unused equivalence relation plugin. Github issue #770
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-31 22:59:56 +01:00
Nikolaj Bjorner 461e88e34c additional robustness check for incremental sat solver core when it recieves interpreted constants, added PB equality to interface and special handling of equalities to adddress performance gap documented in #755
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-25 20:32:13 -07:00
Nikolaj Bjorner 3778048eb4 add bounded-int and pb2bv solvers to fd_solver, use sorting networks for pb2bv rewriter when applicable, hoist to pb2bv_rewriter module and remove it from the pb2bv_tactic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-23 20:31:59 -07:00
Nikolaj Bjorner d060359f01 add fd solver for finite domain queries
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-18 22:34:34 -04:00
Dan Liew 289e51f455 [CMake] Fix building the Java bindings.
This was broken due to 495ef0f055
and a914822346 adding and removing
source files without updating the CMake build.
2016-10-17 18:30:49 +01:00
Dan Liew 462d3e8e8b [CMake] Unbreak building the .NET bindings.
7fefe40f21 broke building the .NET
bindings by renaming the signing key without updating the CMake build.
2016-10-17 18:19:31 +01:00
Dan Liew 03071db3ed [CMake] Fix building the examples when libz3 is built as a static library. 2016-10-17 18:19:31 +01:00
Dan Liew 4ef55505e7 [CMake] Fix #763 reported by @jirislaby.
`INTERFACE` was the not appropriate usage requirement to use. However
it only caused a problem when USE_LIB_GMP was enabled. With `INTERFACE`
`-lgmp` was not specified on the link line so `libz3.so` did not have a
reference to the library and linking against `libz3.so` by clients
would fail with missing references to symbols in `libgmp`.
2016-10-17 18:19:25 +01:00
Christoph M. Wintersteiger 12c47348bc Merge pull request #761 from delcypher/bv2fpa_unbreak_cmake_build
Unbreak the CMake build broken by 009af4455d
2016-10-17 11:47:01 +01:00
Nikolaj Bjorner aec59e4ff7 add consequence finding to inc-sat-solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-10-16 15:43:28 -04:00
Dan Liew b2381acceb Unbreak the CMake build broken by 009af4455d
The commit added an additional source file and dependency but the
corresponding changes weren't added to the CMake build.
2016-10-15 21:42:20 +01:00
Nikolaj Bjorner cf56da8482 add z3test to cmakelists.txt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-09-21 16:33:30 -07:00
Nikolaj Bjorner 14668b4d44 Merge pull request #735 from angr/new-build
New packaging for and ability to distribute python bindings
2016-09-21 15:55:22 -07:00
Andrew Dutcher f451363a8f use copy instead of create_symlink when not on unix 2016-09-21 15:15:21 -07:00
Nikolaj Bjorner 7f29674842 add option to bypass compression of unbound tails, issue #738
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-09-16 14:56:10 -07:00