3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00
Commit graph

130 commits

Author SHA1 Message Date
Nikolaj Bjorner
d975886cdc fix #6300
several boundary cases with repeated rows being retired twice and non-termination for K = 1 where decomposition is just identity.
2022-08-24 17:16:47 -07:00
Nikolaj Bjorner
540e36e6cb roll version number
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-18 15:47:08 -07:00
Nikolaj Bjorner
cb272bd7a8 fix missing removal of x in solve_mod 2022-08-17 07:31:26 -07:00
Nikolaj Bjorner
b169292743 add parameter descriptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-16 08:26:53 -07:00
Nikolaj Bjorner
1d87592b13 fixes to mod/div elimination
elimination of mod/div should be applied to all occurrences of x under mod/div at the same time. It affects performance and termination to perform elimination on each occurrence since substituting in two new variables for eliminated x doubles the number of variables under other occurrences.

Also generalize inequality resolution to use div.

The new features are still disabled.
2022-08-14 11:34:03 -07:00
Nikolaj Bjorner
f014e30d46 disable case1
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-13 08:53:19 -07:00
Nikolaj Bjorner
d80e2fb61d fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-13 08:49:07 -07:00
Nikolaj Bjorner
5669cf65bc bug fixes to mod/div quantifier elimination features 2022-08-13 06:18:13 -07:00
Nikolaj Bjorner
550d6914b1 updates to div/mod handling in quantifier projection
note: the new code remains disabled at this point.
2022-08-12 14:39:33 -04:00
Nikolaj Bjorner
d272becade fixes for division 2022-08-12 11:54:26 -04:00
Nikolaj Bjorner
03385bf78d improve quantifier elimination for arithmetic
This update changes the handling of mod and adds support for nested div terms.

Simple use cases that are handled using small results are given below.

```
(declare-const x Int)
(declare-const y Int)
(declare-const z Int)
(assert (exists ((x Int)) (and (<= y (* 10 x)) (<= (* 10 x) z))))
(apply qe2)
(reset)

(declare-const y Int)
(assert (exists ((x Int)) (and (> x 0) (= (div x 41) y))))
(apply qe2)
(reset)

(declare-const y Int)
(assert (exists ((x Int)) (= (mod x 41) y)))
(apply qe2)
(reset)
```

The main idea is to introduce definition rows for mod/div terms.
Elimination of variables under mod/div is defined by rewriting the variable to multiples of the mod/divisior and remainder.

The functionality is disabled in this push.
2022-08-12 10:20:43 -04:00
Bruce Mitchener
5014b1a34d Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
Arie Gurfinkel
aa0719abae model_based_opt: fix enabling complete resolution
a bug prevented an optimization to be enabled
2022-08-05 18:11:23 +03:00
Jakob Rath
9275d1e57a sparse_matrix iterators 2022-08-01 18:37:11 +03:00
Nuno Lopes
73a24ca0a9 remove '#include <iostream>' from headers and from unneeded places
It's harmful to have iostream everywhere as it injects functions in the compiled files
2022-06-17 14:10:19 +01:00
Nikolaj Bjorner
35db0ae58b workaround manylinux build failure (it is advertized as a compiler bug)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-28 14:34:58 -07:00
Nikolaj Bjorner
186a3c58e5 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-15 12:00:25 -07:00
Arie Gurfinkel
7f62fa2b66
Sparse matrix kernel (#6035)
* Subtle bug in kernel computation

Coefficient was being passed by reference and, therefore, was
being changed indirectly.

In the process, updated the code to be more generic to avoid rational
computation in the middle of matrix manipulation.

* sparse_matrix: fixed handling of 0 in add_var() and add()

particularly in add_var(), without the fix the user is responsible for checking
coefficients for 0.
2022-05-13 17:30:35 -07:00
Nikolaj Bjorner
6deb4dee37 disable normalize
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 13:30:50 -07:00
Nikolaj Bjorner
5aec9b32bd check zero
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 10:13:07 -07:00
Nikolaj Bjorner
860d904699 check zero
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 10:11:17 -07:00
Nikolaj Bjorner
361155685c ensure abs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 09:09:00 -07:00
Nikolaj Bjorner
cbaa16df57 lcm normalization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 09:03:57 -07:00
Nikolaj Bjorner
5ca3bc3212 kernel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 15:48:06 -07:00
Nikolaj Bjorner
2928cc261c fix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 13:17:25 -07:00
Nikolaj Bjorner
805443c8ab wip
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 11:17:34 -07:00
Nikolaj Bjorner
0557d72d1c na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 07:42:32 -07:00
Nikolaj Bjorner
6a8ac5f9b1 adding K
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-09 16:47:26 -07:00
Nikolaj Bjorner
ad2445e423 gauss jordan
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-09 16:33:15 -07:00
Nikolaj Bjorner
3036b88f09 support threading for TRACE mode 2021-10-25 13:35:32 +02:00
Nikolaj Bjorner
da60abd84b #5445 2021-08-03 11:19:42 -07:00
Nikolaj Bjorner
202ed79a24 #5445 2021-08-03 11:17:23 -07:00
Nikolaj Bjorner
a4cc9e7895 #5429 #5445 2021-08-01 12:49:36 -07:00
Nikolaj Bjorner
16413b4f9a #5429 2021-07-27 17:18:22 -07:00
Nikolaj Bjorner
005d35f9c9 #5422 2021-07-21 07:39:39 -07:00
Nikolaj Bjorner
ca8f914dd8 #5422 2021-07-21 07:22:05 -07:00
Nikolaj Bjorner
b0a22105d6 na 2021-07-19 13:28:20 -07:00
Nikolaj Bjorner
188a478214 #5417
strict inequality (over reals) require solving for least-upper/greatest-lower bounds that may coincide with non-strict inequalities (be epsilon stronger). Instead of using the coefficient 'a' to turn the inequality into an equality, add the slack value as a constant.
2021-07-19 13:19:03 -07:00
Nikolaj Bjorner
cab1076514 #5336 2021-07-11 21:00:58 +02:00
Nikolaj Bjorner
c1ab7987f6 #5324 2021-06-07 11:41:35 -07:00
Nikolaj Bjorner
9afc59d5b4 #5324 2021-06-06 15:39:23 -07:00
Nikolaj Bjorner
7cd901019f #5324 2021-06-05 17:14:51 -07:00
Nuno Lopes
f1e0d5dc8a remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00
Nikolaj Bjorner
c03fac8390 Investigating std::vector and #5178 2021-04-24 14:50:59 -07:00
Nikolaj Bjorner
4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Nikolaj Bjorner
d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00
Nuno Lopes
e844aef896 remove a few more copy constructors, though still not enough to enable the assertion in vector
I give up for now; there are too many copies left for little return..
2020-06-03 20:32:13 +01:00
Nuno Lopes
98b5abb1d4 buffer: require a move constructor to avoid copies
remove unneded copy constructors from several classes
2020-06-03 11:57:49 +01:00
Nuno Lopes
6a45c5d17c fix build with prehistorical compilers because of pip/manylinux 2020-05-30 11:42:27 +01:00
Nikolaj Bjorner
4f462925a0 fix #4116
delta has to be computed based on Simplex tableau not on difference graph.
2020-04-27 17:07:12 -07:00