3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-06 16:01:55 +00:00
Commit graph

2465 commits

Author SHA1 Message Date
Nikolaj Bjorner
8cb118235a add missing status case for cancelation 2022-08-30 09:43:10 -07:00
Nikolaj Bjorner
cd0af999a8 fix #6302
crash due to not checking for dead rows.
non-termination due to solving div and mod separately.
To ensure termination one needs to at least process them simultaneously, otherwise the metric of number-of-terms x under number of mod/div does not decrease. Substituting in K*y + z under either a mod or div increases the number of terms under a mod/div when eliminating only one of the kinds.
Currently handling divides constraints separately because pre-existing solution uses the model to determine z as a constant between 0 and K-1. The treatment of mod/div is supposed to be more general and use a variable while at the same time reducing the mod/div terms where the eliminated variable is used (the variable z is not added under the mod/div terms, but instead the model is used to determine cut-offs to calculate mod/div directly.
2022-08-29 14:32:13 -07:00
Nikolaj Bjorner
6f2a6da600 address unused variable warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-28 18:50:54 -07:00
Jakob Rath
68e313ed24 use unsat_core from viable_fallback 2022-08-26 16:36:26 +02:00
Jakob Rath
acf9976df9 make it compile 2022-08-26 16:28:52 +02:00
Jakob Rath
f819c2bad8 conflict2 stub 2022-08-25 17:04:07 +02:00
Jakob Rath
b31931bb9f disable assertions for now; some notes 2022-08-25 16:40:38 +02:00
Jakob Rath
41b74ab215 newline is implicit 2022-08-25 16:37:38 +02:00
Jakob Rath
e39e1dcc49 Extract inference_logger 2022-08-25 16:03:17 +02:00
Nikolaj Bjorner
f6e151a49c assert 2022-08-24 17:16:47 -07:00
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
437e83f6de fixmul negative case
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-23 08:20:32 -07:00
Nikolaj Bjorner
8128ae8109 generalize subsumption to non-univariate
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-22 10:46:49 -07:00
Jakob Rath
058c5771b9 univariate solver: add_bit 2022-08-22 15:09:11 +02:00
Jakob Rath
d9a63ce786 fix 2022-08-22 15:05:29 +02:00
Jakob Rath
9fcea37625 remove constructor 2022-08-22 15:00:35 +02:00
Jakob Rath
28ddd4ad56 Implement unilinear subsumption as clause simplification 2022-08-22 14:55:02 +02:00
Jakob Rath
c1e2ea80f5 make explicit that we compare the concrete values 2022-08-22 14:17:47 +02:00
Jakob Rath
3a759c1a28 move fi_record 2022-08-22 14:14:30 +02:00
Jakob Rath
26fcfc6ecd Add default constructor to fi_entry 2022-08-22 14:03:43 +02:00
Jakob Rath
3c093e03cf log 2022-08-22 12:46:47 +02:00
Jakob Rath
53f276d225 apply 2022-08-22 12:44:56 +02:00
Jakob Rath
bf1a7914cd Add clause simplification stub 2022-08-22 12:36:05 +02:00
Bruce Mitchener
6ba9ada1e2
Fix typos. (#6291) 2022-08-21 12:40:07 -07:00
Jakob Rath
3e99828c3c start make_asserting for non-unit coeff 2022-08-19 17:06:28 +02:00
Jakob Rath
ee208efdc5 fix 2022-08-19 16:18:13 +02:00
Jakob Rath
c3e7bd34d0 make_asserting for unit coefficients 2022-08-19 16:02:56 +02:00
Jakob Rath
9766ad00b1 Revert "remove overcomplicated search_iterator"
This reverts commit 309473edad.
2022-08-19 14:12:57 +02: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
31ffe89480 normalize more pretty printing 2022-08-17 08:24:41 -07:00
Nikolaj Bjorner
cb272bd7a8 fix missing removal of x in solve_mod 2022-08-17 07:31:26 -07:00
Jakob Rath
309473edad remove overcomplicated search_iterator 2022-08-17 09:37:43 +02:00
Jakob Rath
201d841a90 lit_pp with extra information 2022-08-17 09:29:00 +02: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
Nikolaj Bjorner
a4ea281602 fix #6260 2022-08-06 08:21:52 +03: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
618b3945c1 log 2022-08-05 11:23:02 +02:00
Bruce Mitchener
1d9345c3de Fix typos. 2022-08-05 07:40:50 +03:00
Jakob Rath
bab8d817ef Remove decisions on lemmas 2022-08-04 14:24:20 +02:00
Jakob Rath
d5f20dcf0e No more boolean decisions 2022-08-04 14:12:12 +02:00
Jakob Rath
c67024d88b unused for now 2022-08-04 13:52:29 +02:00
Jakob Rath
a3e8124245 comments; move a section 2022-08-04 11:52:34 +02:00