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

967 commits

Author SHA1 Message Date
Nikolaj Bjorner afb12fe6c3 move script
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-18 17:22:58 -07:00
Pierre Pronchery 5f7bd993de Add support for NetBSD
Originally from David Holland <dholland@NetBSD.org>.
2018-03-13 21:59:35 +01:00
Nikolaj Bjorner 3d9139f6ef bump revision
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-10 12:07:55 -08:00
Nikolaj Bjorner 0ce2001449 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-10 11:39:22 -08:00
Bruce Mitchener 878a6ca14f Fix typos. 2018-03-09 14:30:43 +07:00
Christoph M. Wintersteiger 0ef33a98c4
Revert "Fix encoding error" 2018-02-13 14:08:55 +00:00
Nikolaj Bjorner ad92bfb1a1 fix python build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-02-01 20:19:24 -08:00
Virgile ROBLES fddc4e311f
Fix encoding error
The encode/decode is not needed and fails if any non-ASCII character is returned by g++ or clang++
2018-01-26 00:30:59 +01:00
Nikolaj Bjorner 1992749e78 to ascii or not to ascii #1447
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-01-07 18:52:00 -08:00
Christoph M. Wintersteiger 63951b815d Bumped version number. 2017-12-18 18:58:21 +00:00
Ivan Gotovchits 49678065bd fixes compilation flags for OCaml plugins
The `-linkall` option is needed for a plugin to be standalone,
otherwise it will miss those dependencies that are not used.
2017-12-13 14:45:06 -05:00
Nikolaj Bjorner b96dacfff2 set version, fix build of test files
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-30 08:42:01 -08:00
Nikolaj Bjorner 161b6a9983 increase minor version, update java/.net apis
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-28 11:51:37 -08:00
Nikolaj Bjorner 89971e2a98 remove smtlib1 dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-28 10:37:30 -08:00
Nikolaj Bjorner 61d149a724 fix java build problem with bool arrays
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-15 16:18:18 -08:00
Nikolaj Bjorner 795e0c641a add method to create bit-vectors directly from an array of Booleans
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-15 14:44:59 -08:00
Christoph M. Wintersteiger 7c63a5cc1d Fixed MSYS/MinGW build. Fixes #1335. 2017-11-11 16:38:53 +00:00
Christoph M. Wintersteiger 45975bec65 Improved support for MSYS/MINGW. Fixes #969. 2017-11-11 15:11:54 +00:00
Christoph M. Wintersteiger 19f43713c9 Fixed Windows build of C example. 2017-11-08 21:16:03 +00:00
Christoph M. Wintersteiger 17bcb37cf1 Fixed error handlers in Python API. 2017-11-08 20:09:18 +00:00
Christoph M. Wintersteiger bec6c3f9e2 Fixed C example build. 2017-11-08 18:22:17 +00:00
Christoph M. Wintersteiger a8b52419f5 Fixed C example build. 2017-11-08 18:14:42 +00:00
Christoph M. Wintersteiger bf563bbd5f Fixed default library path order in Python API. 2017-11-08 17:29:40 +00:00
Christoph M. Wintersteiger ef800d7b93 Fixed library path order in Python API. 2017-11-08 17:20:25 +00:00
Christoph M. Wintersteiger d2c5e0e76a Fixed problems arising from unfortunate object destruction order in the Python API. Fixes #989. 2017-11-08 16:36:47 +00:00
Nikolaj Bjorner fd49a0c89c added facility to persist model transformations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-02 00:05:52 -05:00
Paul Ehrlich 2a459c5ff6 MSYS offers a MINGW shell as well. (uses different os.uname()) 2017-11-01 12:02:48 +01:00
Christoph M. Wintersteiger e50470f2c4 Added support for MSYS2 2017-10-30 18:24:38 +00:00
Nikolaj Bjorner 60b970b9ba add proofs dependency to solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-28 16:23:13 -07:00
Nikolaj Bjorner db65cc007a move more proof utils
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-24 10:27:48 -07:00
Nikolaj Bjorner d67f3c1466 create proofs folder, move proof-post-order utility to proofs directory, fix regression with proofs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-24 03:08:56 -07:00
Nikolaj Bjorner c1b243a8e3 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-07 19:24:30 +01:00
Nikolaj Bjorner a625301a41 expose incremental cubing over API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-28 15:05:10 -07:00
Christoph M. Wintersteiger 9a464dded4 Removed -std=c++11 from OCaml stubs build command. Fixes #1263. 2017-09-27 14:22:59 +01:00
Nikolaj Bjorner 597f77cd77 initial sketch for dominator based simplifiation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-28 20:03:31 -07:00
Nicolas Braud-Santoni 4cb7f72509 First version of the inj. tactic 2017-08-22 17:10:20 +00:00
Nikolaj Bjorner e1d08e9526 remove reinterpret cast occurrences that require disabling strict alias analysis #987 #1210
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-17 20:41:29 -07:00
Dan Liew a2d7b43554 Update header includes to be relative to src/ directory. 2017-08-17 18:26:53 +01:00
Nuno Lopes 4b00bc636b revert the patch to remove no-strict-aliasing
VS 2012 doesnt support C++11 unions..
2017-08-14 23:00:59 +01:00
Nikolaj Bjorner dc4dbdf51e Merge branch 'master' of https://github.com/z3prover/z3 2017-08-14 12:52:41 -07:00
Nikolaj Bjorner 086ea7867e another stab at #989
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-14 12:52:25 -07:00
Nuno Lopes 2473c69679 Drop no-strict-aliasing and fix 2 places where it was violated 2017-08-14 20:09:49 +01:00
Nikolaj Bjorner 5fdea2cb18 use rfind instead of index to avoid prefix clashes #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-03 10:19:07 -07:00
Nikolaj Bjorner 8844112418 update header include generation to use relative paths #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-03 08:50:04 -07:00
Nikolaj Bjorner 2b82fd5d0c updated include directives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-01 10:51:47 -07:00
Christoph M. Wintersteiger 6bc5209e26 Fixed build problems with .vcxproj 2017-08-01 15:53:55 +01:00
Nikolaj Bjorner 0eb2915e83 Merge pull request #1182 from agurfinkel/spacer-z3
Spacer
2017-07-31 17:10:09 -07:00
Nikolaj Bjorner 8fdf3177da add initialization to unused parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 14:06:29 -07:00
Arie Gurfinkel 5b9bf74787 Spacer engine for HORN logic
The algorithms implemented in the engine are described in the following papers

Anvesh Komuravelli, Nikolaj Bjørner, Arie Gurfinkel, Kenneth L. McMillan:
Compositional Verification of Procedural Programs using Horn Clauses over Integers and Arrays. FMCAD 2015: 89-96

Nikolaj Bjørner, Arie Gurfinkel:
Property Directed Polyhedral Abstraction. VMCAI 2015: 263-281

Anvesh Komuravelli, Arie Gurfinkel, Sagar Chaki:
SMT-Based Model Checking for Recursive Programs. CAV 2014: 17-34
2017-07-31 17:02:29 -04:00
Nikolaj Bjorner b19f94ae5b make include paths uniformly use path relative to src. #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Nikolaj Bjorner 45e31b0db3 add dummy initialization to unused variables to avoid compiler warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-28 10:17:46 -07:00
Nikolaj Bjorner ca67274519 another round of fix for #989 to avoid problems with doxygen generation (TravisCI build failure)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 12:59:34 -07:00
Nikolaj Bjorner af47aa0120 updated suspenders for #989
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 12:32:44 -07:00
Nikolaj Bjorner b902018373 add suspenders for #989
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 11:56:01 -07:00
Nikolaj Bjorner 2e3a5a2060 attempt at addressing #989 by referencing _lib directly instead of over lib() in function calls
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-27 11:03:18 -07:00
Daniel Perelman d57494395c Add --guardcf flag to mk_make.py to optionally enable Control Flow Guard. 2017-07-06 16:59:20 -07:00
Dan Liew d00892c9a6 [CMake] Fix dependencies for generating mem_initializer.cpp.
Previously CMake was not aware of which headers files the generation
of `mem_initializer.cpp` depended on. Consequently this could result
in broken incremental builds if

* Existing headers that declare memory initializers/finalizers change.
* New headers are added that declare memory initializers/finalizer.

Now the `z3_add_component()` CMake function has been modifed so that
it now takes an optional `MEMORY_INIT_FINALIZER_HEADERS` argument
which allows the headers that declare memory initializers/finalizers
to be explicitly listed.

With this information CMake will now regenerate `mem_initializer.cpp`
correctly.

This required the `mk_mem_initializer_cpp_internal()` function to be
changed to take a list of header files rather than a list of component
source directories. The two consumers (CMake and Python/Makefile build
systems) of this function have been modified to work with this change.

This partially fixes #1030.
2017-06-21 23:56:53 +01:00
Dan Liew 6f48a145aa [CMake] Fix dependencies for generating gparams_register_modules.cpp.
Previously CMake was not aware of which headers files the generation
of `gparams_register_modules.cpp` depended on. Consequently this could result
in broken incremental builds if

* Existing headers that declared module description/parameters change.
* New headers are added that declare module description/parameters.
* `.pyg` files that generate header files that declare module
  description/parameters change

Now the `z3_add_component()` CMake function has been modifed so that

* All header files that are generated from `.pyg` files are added as
dependencies and are scanned from module description/parameter
declarations. This implicit dependency of `gparams_register_modules.cpp`
depending on other generated header files seems unnecessary complex. We
should revisit this design decision once the Python/Makefile build
system is deprecated.

* The function now takes an optional `EXTRA_REGISTER_MODULE_HEADERS`
argument which allows the headers that declare module
description/paramters to be explicitly listed.

With this information CMake will now regenerate `gparams_register_modules.cpp`
correctly.

This required the `mk_gparams_register_modules_internal()` function to be
changed to take a list of header files rather than a list of component
source directories. The two consumers (CMake and Python/Makefile build
systems) of this function have been modified to work with this change.

This partially fixes #1030.
2017-06-21 23:56:46 +01:00
Dan Liew 229fd3dc3e [CMake] Fix dependencies for generating install_tactic.cpp.
Previously CMake was not aware of which headers files the generation
of `install_tactic.cpp` depended on. Consequently this could result
in broken incremental builds if

* Existing headers that declared tactics/probes changed.
* New tactics/probes were added to new header files.

Now the `z3_add_component()` CMake function has been modifed to take an
optional `TACTIC_HEADERS` argument which allows the headers that declare
tactics/probes to be explicitly listed. The necessary component
declarations have been modified to declare their tactic/probe header
files.

With this information CMake will now regenerate `install_tactic.cpp`
correctly.

This required the `mk_install_tactic_cpp_internal()` function to be
changed to take a list of header files rather than a list of component
source directories. The two consumers (CMake and Python/Makefile build
systems) of this function have been modified to work with this change.

This partially fixes #1030.
2017-06-21 23:03:48 +01:00
Nikolaj Bjorner 691788f449 remove stale references to foci
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-19 20:21:08 -07:00
Christoph M. Wintersteiger a258236229 Disabled debug output 2017-05-19 18:51:52 +01:00
Christoph M. Wintersteiger 46791047fa Fixed VS 2017 platform toolset version in .vcxproj 2017-05-12 14:28:55 +01:00
Nikolaj Bjorner a64a73255e make source directory relative to build directory
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 15:46:24 -07:00
Nikolaj Bjorner 7731163d11 use forward slash on src include
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 14:42:43 -07:00
Nikolaj Bjorner 911b24784a merge LRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 10:46:11 -07:00
Christoph M. Wintersteiger 79dcf03a42 Enabled C++11 in GCC and Clang 2017-05-05 15:01:10 +01:00
Christoph M. Wintersteiger 0ebce66c57 Fixed bug with .NET keyfile path containing spaces. Fixes #1003. 2017-05-05 14:22:40 +01:00
Christoph M. Wintersteiger 3bbe5eceeb fix for --get-describe 2017-03-24 15:53:46 +00:00
Christoph M. Wintersteiger 075a56ef02 Merge pull request #924 from cheshire/fix_jni_string_leak
Free allocated char arrays in JNI API
2017-03-01 18:32:54 +00:00
George Karpenkov dbdb0307db Free allocated char arrays in JNI API
Fixes #886
2017-03-01 15:22:15 +01:00
Michael Lowell Roberts 3415672f31 fixed bug where mk_make.py --build=... would fail to handle absolute paths correctly. 2017-02-28 08:24:35 -08:00
Christoph M. Wintersteiger 59db0bc9c4 Merge pull request #829 from legendtang/fix_utf8_conf
Fixed utf-8 version string handling for python2. Resolved #787
2017-02-04 20:38:51 +00:00
martin-neuhaeusser 0e966f21ff Fix off-by-one bug in array indexing in the OCaml bindings
This patch fixes an off-by-one bug that occurred in the construction of output arrays
in the OCaml bindings.
2017-01-30 17:28:24 +01:00
Nikolaj Bjorner a0a81fc2d7 add format #879
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-26 08:37:37 -08:00
Christoph M. Wintersteiger 43d083bafb Windows build fix. 2017-01-19 11:19:29 +00:00
Christoph M. Wintersteiger b9bfd4ddf5 Merge pull request #854 from angr/fix/fpic-arm
Add -fpic to armv7/armv8 build
2017-01-18 21:55:52 +00:00
Christoph M. Wintersteiger 0fae048e3e Windows build fix. 2017-01-17 12:58:32 +00:00
Christoph M. Wintersteiger 6fe1682378 Merge branch 'master' of https://github.com/Z3Prover/z3 2017-01-16 14:08:26 +00:00
Christoph M. Wintersteiger 24e4f19d76 build fix 2017-01-16 14:08:21 +00:00
Nikolaj Bjorner dd0d3d4510 use stirngs for env variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-01-15 11:59:09 -08:00
Christoph M. Wintersteiger 340ba7780e Added MAKEJOBS env var to mk_unix_dist.py 2017-01-14 18:57:10 +00:00
Christoph M. Wintersteiger b30f3a6dbd Separated win32/64 builds 2017-01-14 14:56:25 +00:00
Daniel Perelman f7ebe16046 Omit '.dll' from library name for DllImport. 2017-01-11 16:56:28 -08:00
Christoph M. Wintersteiger d8d869822f Cleaned up #include<iostream> in api* objects. 2017-01-10 21:04:44 +00:00
Andrew Dutcher 1eec0799ca Add -fpic to armv7/armv8 build 2016-12-22 14:26:41 -08:00
Dan Liew 2e74a2c54e Refactor update_api.mk_ml() so that the source and output directories
can be different. This feature will be needed by the CMake build system
to build the OCaml bindings.
2016-12-19 21:05:17 +00:00
Dan Liew 76bbecf4fe Refactor mk_z3consts_ml() code into mk_z3consts_ml_internal()
and move that into `mk_genfile_common.py`. Then adapt `mk_util.py` and
`mk_consts_files.py` to call into the code at its new location.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-12-19 21:05:17 +00:00
Dan Liew 0e03fe9bf2 Fix inconsistent emission of OCaml enumeration files. The ordering of emitted
enum values is not consistent between python 2 or 3. The root cause
of the problem was a dictionary's keys being iterated over which has
no defined order.

This has been fixed by iterating over the dictionary's items and
ordering by values.  We could order by key rather than the values but
seeing as these represent an enum, ordering by value makes more sense.
2016-12-19 21:05:16 +00:00
Christoph M. Wintersteiger 251d1ec031 Fix for parallel builds of the OCaml API. Relates to #797. 2016-12-19 16:58:25 +00:00
Christoph M. Wintersteiger 2c32e30fed Build fix for static binaries + shared examples 2016-12-19 16:47:28 +00:00
Kevin Chung e16577ff61 Making z3 python look in its installation directory for the z3 lib 2016-12-18 17:27:55 -05:00
Christoph M. Wintersteiger a1a662b23f Build fix for C/C++ example programs. 2016-12-16 04:51:07 -08:00
Christoph M. Wintersteiger 649d474686 Build fix for C++ example 2016-12-09 19:09:47 +00:00
Wensheng Tang 99d10d1224 Fixed utf-8 version string handling for python2. Resolved #787 2016-12-08 15:09:59 +08:00
Nuno Lopes 1d417f6527 fix warnings in configure script 2016-11-23 09:32:20 +00:00
Christoph M. Wintersteiger dee7c29b19 Added optional synchronization for multi-thread API logs. Relates to #798. 2016-11-22 11:32:25 +00:00
Christoph M. Wintersteiger 014815a640 Fixed Windows distribution script. 2016-11-15 08:59:18 -08:00
Christoph M. Wintersteiger 889e5e9388 Bumped version number. 2016-11-07 23:19:59 +00:00
Christoph M. Wintersteiger d57a2a6dce Bumped version to 4.5.0 2016-11-07 22:02:30 +00:00
Christoph M. Wintersteiger 7f923c6a33 Include Python API files in distributions. 2016-11-07 22:00:28 +00:00
Christoph M. Wintersteiger 7bbdb7714f Added signed .NET assemblies in unix builds 2016-11-03 17:20:39 +00:00
Christoph M. Wintersteiger 6e0369036e fixed log output typo 2016-11-03 17:13:02 +00:00
Christoph M. Wintersteiger 6fb358a432 Build fix for libz3.vcxproj. 2016-10-28 13:45:10 +01:00
Christoph M. Wintersteiger 86285e1641 disabled unnecessary assertion 2016-10-26 12:59:26 +01:00
Christoph M. Wintersteiger 6ea45b4d65 fix for Python API installation 2016-10-25 14:23:55 +01:00
Christoph M. Wintersteiger 009af4455d Refactored and fixed model conversion for fpa2bv conversion of unspecified values via theory_fpa. 2016-10-15 18:35:39 +02:00
Christoph M. Wintersteiger 5dec919217 Remove unnecessary "unsafe" qualifier on internal .NET API class. 2016-10-06 16:36:19 +01:00
Andrew Dutcher 7816c53352 allow python to load libz3 using loader's default search 2016-09-28 21:05:55 -07:00
Nikolaj Bjorner 092c52e5b7 fix for package directory. issue #744
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-09-22 18:29:26 -07:00
Andrew Dutcher 4801a27c2d Fix up z3test to a) exist and b) work 2016-09-21 17:18:10 -07:00
Nikolaj Bjorner ef0dd74c53 try copy instead of cp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-09-21 16:14:27 -07:00
Andrew Dutcher 02217d048b replace all non-portable filepath slashes with os.path.join 2016-09-14 14:19:10 -07:00
Andrew Dutcher 02783d0bfb Minor tweaks to make things more reliable/less obnoxious 2016-09-14 01:49:37 -07:00
Andrew Dutcher cb83c42100 Make python stuff live in a python directory in the build tree 2016-09-14 01:49:16 -07:00
Andrew Dutcher 704105306c FINISH IT 2016-09-14 01:40:01 -07:00
Andrew Dutcher 0bbd172af3 First steps to a sane python build 2016-09-14 01:37:04 -07:00
Andrew Dutcher fa6cc19184 Moved python bindings into package 2016-09-14 01:33:07 -07:00
Christoph M. Wintersteiger 7fd931d480 build fix 2016-07-29 00:55:05 +01:00
Christoph M. Wintersteiger d5954e829b Enabled donet key file in dist scripts 2016-07-28 18:49:57 +01:00
Christoph M. Wintersteiger 7fefe40f21 Added/improved facilities for strong name signing of the .NET assembly. 2016-07-28 18:07:34 +01:00
Christoph M. Wintersteiger 3587baaf24 Added full version strings and associated API functions. 2016-07-28 18:06:02 +01:00
Nikolaj Bjorner 9cab896632 adding sign option if keyfile is present
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-07-26 14:31:29 -07:00
Philipp Wendler c3b8c15f35 Java API: Make enum lookup more efficient.
The existing code causes an allocation of an array with all enum values
on every method call (inside the values() method),
and loops over all enum entries.
2016-07-22 17:32:57 +02:00
Philipp Wendler f325b51213 Java API: In fromInt() methods of enums fail on invalid value.
The existing code just returns one of the enum values if an unknown int
value is passed, silently hiding bugs.
2016-07-22 17:32:57 +02:00
Nikolaj Bjorner b303fd59c0 add some version information (and date) to log file to make it easier to trap version mismatch on log files
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-06-28 18:11:30 -07:00
Christoph M. Wintersteiger 1fb672121c build fix for cygwin/mingw 2016-06-24 13:57:53 +01:00
Christoph M. Wintersteiger e3a41d0d98 Merge pull request #645 from martin-neuhaeusser/cross-mingw64
Extend build scripts to support MinGW64 cross-compilation on Windows.
2016-06-24 13:42:10 +01:00
Christoph M. Wintersteiger d90a575981 Merge pull request #646 from martin-neuhaeusser/ocaml-c89
Make C-layer of OCaml bindings C89 compatible.
2016-06-24 13:40:50 +01:00
Christoph M. Wintersteiger fad1dffbf0 Added PATH info to successful build message 2016-06-22 19:03:42 +01:00
martin-neuhaeusser f069b1c0e9 Make C-layer of OCaml bindings C89 compatible.
This patch ensures that the C code generated for the OCaml stubs complies with C89. It is needed to compile Z3 with OCaml support with Visual Studio versions older than VS2013.
2016-06-10 16:49:06 +02:00
Martin R. Neuhäußer 22097efd4a Extend build scripts to support MinGW64 cross-compilation on Windows. 2016-06-10 16:43:57 +02:00
Teodor Vlasov 886759a58c add DOTNET_ENABLED in parser_options of mk_*_dist 2016-05-15 22:36:12 +03:00
Christoph M. Wintersteiger 86126e2c01 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-05-03 11:52:21 +01:00
Martin R. Neuhaeusser 436113896d Fix typo in OCaml bindings 2016-04-19 12:51:16 +02:00
Martin R. Neuhaeusser 6889767c9a Fix bug in OCaml API where double values have been wrapped incorrectly.
This patch fixes a segmentation fault that occurs due to incorrect
wrapping of double values in the OCaml API.
2016-04-19 10:10:28 +02:00
Martin R. Neuhaeusser 67ac1a003e Avoid conversion between mutable arrays and lists in OCaml API.
This patch eliminates the conversion between OCaml arrays and lists
from Z3's OCaml API.
2016-04-18 17:20:27 +02:00
Dan Liew 3042f0f964 Fix inconsistent emission of Java enumeration files. The ordering of emitted
enum values is not consistent between python 2 or 3. The root cause
of the problem was a dictionary's keys being iterated over which has
no defined order.

This has been fixed by iterating over the dictionary's items and
ordering by values.  We could order by key rather than the values but
seeing as these represent an enum, ordering by value makes more sense.
2016-04-17 19:03:17 +01:00
Dan Liew b3713e7496 Refactor `mk_z3consts_java() code into mk_z3consts_java_internal()`
and move that into ``mk_genfile_common.py``. Then adapt ``mk_util.py`` and
``mk_consts_files.py`` to call into the code at its new location.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-04-17 19:03:17 +01:00
martin-neuhaeusser b873c6b508 Simplify OCaml API
This patch simplifies the implementation of the OCaml bindings. For example,
the applyX wrapper functions have become unnecessary in the new OCaml API.
It also removes the internal ML2C structure that was used as an intermediate
layer between the C and the OCaml layer.
2016-04-06 12:10:59 +02:00
martin-neuhaeusser f133f478c8 Translate correctly between OCaml option values and NULL pointers
This patch refactors the update_api script and the z3.ml implementation
to properly translate between OCaml options and NULL pointers. Some
unifications and simplifications (avoidance of unnecessary value allocation)
in the script that creates the native bindings.
2016-04-04 17:16:15 +02:00
martin-neuhaeusser b85516c271 Fix reference counting in the C layer of the OCaml bindings
The Z3 context and its reference counters are stored in a structure which is allocated
by the C layer outside the OCaml heap, whenever a Z3 context is created. The structure
and its Z3 context are disposed, once the last reference counter reaches zero. Reference
counters are decremented by C-level finalizers.

The OCaml representations for a Z3 context wrap only a pointer to the corresponding structure.
2016-04-03 09:41:06 +02:00
Christoph M. Wintersteiger b178420797 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-31 18:11:30 +01:00
Martin R. Neuhaeusser feae0e8277 Use a custom block for storing a Z3_config in the ML bindings. 2016-03-31 18:31:59 +02:00
Christoph M. Wintersteiger 2eced4676f Merge pull request #539 from delcypher/cmake_dotnet_bindings
[CMake] Teach CMake to build .NET bindings
2016-03-29 13:56:35 +01:00
martin-neuhaeusser 28f9c61d76 Include *.cmx files during installation of OCaml bindings.
The *.cmx files are now installed using ocamlfind. They contain information from the
compiler that can be used during optimization (the upcoming OCaml 4.03.0 issues
warning 58 if those files are missing from a package).
2016-03-28 17:08:22 +02:00
Dan Liew 23ac66ef42 Fix inconsistent emission of `Enumerations.cs`. The ordering of emitted
enum values is not consistent between python 2 or 3. The root cause
of the problem was a dictionary's keys being iterated over which has
no defined order.

This has been fixed by iterating over the dictionary's items and
ordering by values.  We could order by key rather than the values but
seeing as these represent an enum, ordering by value makes more sense.
2016-03-26 17:59:11 +00:00
Dan Liew d3f87e44a2 Refactor `mk_z3consts_dotnet() code into mk_z3consts_dotnet_internal()`
and move that into ``mk_genfile_common.py``. Then adapt ``mk_util.py`` and
``mk_consts_files.py`` to call into the code at its new location.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-26 17:59:11 +00:00
Bobby Powers 7bb085a565 build: allow overriding of 'ar' in mk_config
This will still use 'ar' if AR isn't set in the environment, but lets
us override the default archive tool at configure time.

Just like CC and CXX, this doesn't apply to a ./configure for Windows.
2016-03-22 10:47:51 -04:00
Nikolaj Bjorner 67dc5ce2b5 fix cmake issues
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 15:51:31 -07:00
Nikolaj Bjorner 20bbdfe31a moving remaining qsat functionality over
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 15:35:26 -07:00
Dan Liew 4814555c46 Fix inconsistent emission of `gparams_register_modules.cpp`,
``install_tactics.cpp`` and ``mem_initialiszer.cpp`` files between
the CMake and Python build systems.

The problem was that the generated files were

* Senstive to the order component directories were traversed
* For CMake there are two directories (a source and build directory)
  for every component rather than a single directory like the
  Python build system has.

To fix this a new function ``sorted_headers_by_component()`` has been
added which defines a order that is consistent between both build
systems. This function is then used on lists of paths to discovered
header files.
2016-03-13 23:00:40 +00:00
Dan Liew 75af362b25 Fix inconsistent emission of `z3consts.py`. The ordering of emitted
enum values is not consistent between python 2 or 3. The root cause
of the problem was a dictionary's keys being iterated over which has
no defined order.

This has been fixed by iterating over the dictionary's items and
ordering by values.  We could order by key rather than the values but
seeing as these represent an enum, ordering by value makes more sense.
2016-03-12 23:27:26 +00:00
Dan Liew a2376b1016 Try to fix #510. The breakage was caused by #498.
The issue here is that in Python2 ``exec`` is a statement and
``exec`` is a function in Python3. For the ``exec`` statement to
work we would need to write

```
exec line.strip(' \n') in  exec_globals, None
```

We could write a wrapper function to do the right thing depending
on the Python version but a better approach is to actually just
use ``eval()`` rather than ``exec()`` because

* ``eval()`` is less "evil" than ``exec()`` because it only evaluates
  a single expression. My testing so far seems to indicate that this is
  sufficient.

* ``eval()`` is function in both Python 2 and 3 so we don't need
  to specialise the code based on Python version.
2016-03-12 22:22:20 +00:00
Dan Liew b3f6a3c4af Remove use of global data structures in
``mk_install_tactic_cpp_internal()``
2016-03-09 11:22:49 +00:00
Dan Liew 87e99cd734 Move the code for generating `*.hpp files from *.pyg from mk_util.py` to
``mk_genfile_common.py``. A new function ``mk_hpp_from_pyg()`` has been added
which provides a more sensible interface (hides the nasty ``exec()`` stuff)
to create the ``*.hpp`` files from ``*.pyg`` files.

Both ``mk_util.py`` and ``pyg2hpp.py`` have been modified to use the new
interface.

Whilst I'm here reindent ``pyg2hpp.py``.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.

I've tested this change by making sure that the all the ``*.hpp``
files generated from ``*.pyg`` files match the files generated
before this change.
2016-03-09 11:22:49 +00:00
Dan Liew 8840e5a00f Move `mk_pat_db_internal() from mk_util.py` to
``mk_genfile_common.py`` and adapt ``mk_util.py`` and
``mk_pat_db.py`` to use the code at its new location.

Whilst I'm here reindent ``mk_mem_initializer_cpp.py``.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-09 11:22:48 +00:00
Dan Liew 114e165fad Move `mk_mem_initializer_cpp_internal() from mk_util.py` to
``mk_genfile_common.py`` and adapt ``mk_util.py`` and
``mk_mem_initializer_cpp.py`` to use the code at its new location. The interface
has been changed slightly so that ``mk_mem_initializer_cpp_internal()`` now
returns the path the generated file. The motivation behind this is so that
clients of the function know the path of the generated file.

Whilst I'm here reindent ``mk_mem_initializer_cpp.py`` and the relevant
code in ``mk_util.py``.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-09 11:22:48 +00:00
Dan Liew f4e98a4fe5 Move `mk_install_tactic_cpp_internal() from mk_util.py` to
``mk_genfile_common.py`` and adapt ``mk_util.py`` and
``mk_install_tactic_cpp.py`` to use the code at its new location. The interface
has been changed slightly so that ``mk_install_tactic_cpp_internal()`` now
returns the path the generated file. The motivation behind this is so that
clients of the function know the path of the generated file.

Whilst I'm here reindent ``mk_install_tactic_cpp.py`` and the relevant
code in ``mk_util.py``.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-09 11:22:48 +00:00
Dan Liew 404aa2a5a0 Move `mk_gparams_register_modules_internal() from mk_util.py`
to ``mk_genfile_common.py`` and adapt ``mk_util.py`` and
``mk_gparams_register_modules_cpp.py`` to use the code at its new
location. The interface has been changed slightly so that
``mk_gparams_register_modules_internal()`` now returns the path
to the generated file. The motivation behind this so that clients
of the function know the path to the generated file.

Whilst I'm here reindent ``mk_gparams_register_modules_cpp.py``
and the relevant code in ``mk_util.py``.

Also remove duplicated code that is now available in
``mk_genfile_common.py``.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-09 11:22:48 +00:00
Dan Liew 8a35f744c7 Move `mk_def_file_internal() out of mk_util.py` into
``mk_genfile_common.py`` and adapt ``mk_util.py`` and
``mk_def_file.py`` to use the code at its new location.

Whilst I'm here also reindent ``mk_def_file.py`` and make it
use some of the code in ``mk_genfile_common.py`` to avoid code
duplication.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-09 11:22:48 +00:00
Dan Liew 2b64729b21 Move `mk_z3consts_py_internal() out of mk_util.py` into
``mk_genfile_common.py`` and adapt ``mk_util.py`` and
``mk_consts_files.py`` to use the code at its new location. The
interface has been changed slightly so that
``mk_z3consts_py_internal()`` now returns the path to the generated
file. The motivation behind this is so that clients of the function
know the path to the generated file.

Whilst I'm here also reindent ``mk_consts_files.py`` and move some of
its code into ``mk_genfile_common.py`` so it can be shared.

Also update Z3_GENERATED_FILE_EXTRA_DEPENDENCIES in the CMake build
so it knows about ``mk_genfile_common.py``.

The purpose of this change is to have Python code common to the Python
and CMake build systems separate from Python code that is only used for
the Python build system.
2016-03-09 11:22:48 +00:00
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
Dan Liew 589227235e Try to improve some of the comments in `scripts/update_api.py`
based on discussion in #461.
2016-03-07 18:45:34 +00:00
Christoph M. Wintersteiger 3968423c26 build fix for ML API 2016-03-07 15:35:25 +00:00
Christoph M. Wintersteiger 0ea2ac3f28 API script fix 2016-03-07 14:21:33 +00:00
Christoph M. Wintersteiger 027331aef2 resolved merge conflicts 2016-03-07 14:20:10 +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
Christoph M. Wintersteiger eccf03aaac build fix for non-windows platforms 2016-03-07 11:21:06 +00:00
Christoph M. Wintersteiger 03a8ef2795 Fixed non-Windows preprocessor options.
Fixes #463
2016-03-05 17:14:19 +00:00
Christoph M. Wintersteiger 09832ca807 Fixed static Windows binary build. 2016-03-05 13:58:28 +00:00
Christoph M. Wintersteiger 40c5152075 Added --staticbin option.
Relates to #456
2016-03-04 18:32:45 +00:00
Dan Liew 1d9a7dcf47 Add missing shebang in `scripts/update_api.py`. The script
was already marked as executable but it wasn't possible to execute
from a shell due to the missing shebang.
2016-03-04 15:31:56 +00:00
Dan Liew d54d6b50f0 Teach the Python build system to use the `version.h.in` template file used
by the CMake build and use the existing ``configre_file()`` function
to generate the ``version.h`` file needed by the build.
2016-03-04 15:26:09 +00:00
Dan Liew 8bc7d319c7 Refactor `mk_z3consts_py()` to that is usable externally via a new
function ``mk_z3consts_py_internal()`` which called by a new
``mk_consts_files.py`` script. This will script will allow the const
declarations for the different Z3 language bindings to be generated.
Right now only support for python is implemented but more can be added
in the future.
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 46ac368f86 Refactor `mk_def_file()` so that it is usable externally via a new
function ``mk_def_file_internal()`` which is called by a
new ``mk_def_file.py`` script. This will allow other build systems to
generate the ``api_dll.def`` file.
2016-03-04 15:26:09 +00:00
Dan Liew db34baa979 Partially refactor the code in `update_api.py` so that it can
be used as a script for other build systems and is callable via
a new ``generate_files()`` function from ``mk_util.py``. This removes
the horrible ``_execfile()`` hack that was previously in ``mk_util.py``.

Unfortunately lots of bad code is still in ``update_api.py`` but
fixing all of its problems is too much work right now.
2016-03-04 15:26:09 +00:00
Dan Liew 2b3fe3d02c Refactor `mk_gparams_register_modules()` so that it is usable externally via a new
function ``mk_gparams_register_modules_internal()`` which is called by a
new ``mk_gparams_register_modules_cpp.py`` script. This will allow other build systems to
generate the ``gparams_register_modules.cpp`` files.
2016-03-04 15:22:00 +00:00
Dan Liew 2f7f022605 Refactor `mk_mem_initializer_cpp()` so that it is usable externally via a new
function ``mk_mem_initializer_cpp_internal()`` which is called by a
new ``mk_mem_initializer_cpp.py`` script. This will allow other build systems to
generate the ``mem_initializer.cpp`` files.
2016-03-04 15:22:00 +00:00
Dan Liew a13438818f Refactor `mk_install_tactic_cpp()` so that it is usable externally via a new
function ``mk_install_tactic_cpp_internal()`` which is called by a
new ``mk_install_tactic_cpp.py`` script. This will allow other build systems to
generate the ``install_tactic.cpp`` files.
2016-03-04 15:22:00 +00:00
Dan Liew ef58179462 Refactor `mk_pat_db()` so that it is usable externally via a new function
``mk_pat_db_internal()`` which is called by a new ``mk_pat_db.py`` script. This
will allow other build systems to generate the ``database.h`` file.
2016-03-04 15:22:00 +00:00
Dan Liew 9558dc14fb Refactor `exec_pyg_scripts()` so that it is usable externally
via a new ``pyg2hpp.py`` script. This will allow other build systems to
take ``pyg`` files and generate the corresponding ``hpp`` files.
2016-03-04 15:22:00 +00:00
Christoph M. Wintersteiger c9a5676346 Merge branch 'master' of https://github.com/Z3Prover/z3 into new-ml-api 2016-03-04 15:15:16 +00:00
Christoph M. Wintersteiger cf5910e041 typos 2016-03-04 15:08:03 +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 4fe4db6657 build fix for static libray on Windows 2016-03-01 17:34:45 +00:00
Nikolaj Bjorner 4cf72e23e6 fix python 3 compat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-27 09:58:45 -08:00
Nikolaj Bjorner ce8862d415 fix bug in conflict clause generation in seq-branch-variable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-26 18:15:45 -08:00
Christoph M. Wintersteiger 0930cfc53f ML API build fixes for cygwin 2016-02-15 15:44:46 +00:00
Christoph M. Wintersteiger 62cae4186b ML API bug fixes 2016-02-15 12:54:05 +00:00
Christoph M. Wintersteiger 18c0a3bfaf removed comments 2016-02-14 19:57:21 +00:00
Christoph M. Wintersteiger b99fcb9c8a More new OCaml API 2016-02-14 19:56:22 +00:00
Christoph M. Wintersteiger 824169da0a New OCaml API 2016-02-13 22:09:45 +00:00
Nikolaj Bjorner e484fc365d add outline of bv bounds tactic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-12 22:57:47 +00:00
Christoph M. Wintersteiger c01f0323c3 Merge branch 'lackr' of https://github.com/MikolasJanota/z3 into MikolasJanota-lackr 2016-02-10 14:26:04 +00:00
Christoph M. Wintersteiger a16f524eae Install target fix for ocamlfind_install on Windows.
Relates to #409
2016-02-09 19:58:52 +00:00
Mikolas Janota b614e7732b Merge remote-tracking branch 'upstream/master' into lackr 2016-02-08 12:54:22 +00:00
Dan Liew 508d2e32c8 Fix a bug in Python build scripts where an extra ending slash in the
build directory would cause REV_BUILD_DIR to be set incorrectly and
would lead to a broken Makefile being generated.

What would happen before:

```
$ python scripts/mk_make.py --build FOO_1
...
REV_BUILD_DIR='..'
```

```
$ python scripts/mk_make.py --build FOO_1/
...
REV_BUILD_DIR='../..'
```
^^^^^ that's wrong. It should be REV_BUILD_DIR='..'

To fix this the ``reverse_path()`` function has been taught to ignore empty
components in ``p.split(os.sep)``.
2016-02-05 14:51:15 +00:00
Dan Liew 33f676ef6b Do not hardcode default build directory name. 2016-02-05 14:39:27 +00:00
Dan Liew 6112ea2ec7 Fix typo 2016-02-05 14:38:41 +00:00