3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00
Commit graph

1982 commits

Author SHA1 Message Date
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
Jakob Rath
4282cfa148 Remove unused variable 2022-08-04 08:55:04 +02:00
Jakob Rath
014fe4e3fd fallback stats 2022-08-04 08:51:24 +02:00
Jakob Rath
b9588af07a fix output 2022-08-03 10:01:54 +02:00
Jakob Rath
a76f977f85 Change univariate fallback solver to one-shot mode for now 2022-08-02 12:42:34 +02:00
Jakob Rath
e105a91d4a Merge branch 'master' into polysat 2022-08-02 11:31:01 +02:00
Jakob Rath
de6a0ab1a7 PDD operations 2022-08-01 18:37:11 +03:00
Jakob Rath
42233ab5c8 Additional BDD operations; BDD vectors and finite domain abstraction 2022-08-01 18:37:11 +03:00
Jakob Rath
9275d1e57a sparse_matrix iterators 2022-08-01 18:37:11 +03:00
Bruce Mitchener
a89be68050 Use false instead of 0. 2022-08-01 18:28:07 +03:00
Jakob Rath
220a63e8bd Merge branch 'master' into polysat 2022-08-01 11:27:49 +02:00
Bruce Mitchener
5d0dea05aa
Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
Bruce Mitchener
1eb84fe4b9
Mark override methods appropriately. (#6207) 2022-07-29 23:29:15 +02:00
Jakob Rath
d65dc82ef0 bailout state: add premises of assignment 2022-07-25 13:49:21 +02:00
Bruce Mitchener
3e38bbb009
Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
Jakob Rath
1b370727b1 remove redundant subst_val 2022-07-21 13:15:02 +02:00
Jakob Rath
4a3fe8ab82 fix 2022-07-21 13:00:36 +02:00
Jakob Rath
e168d8a2eb Merge branch 'master' into polysat 2022-07-21 12:56:50 +02:00
Jakob Rath
48c6bea331 umul 2 2022-07-21 12:38:00 +02:00
Jakob Rath
d4592f2abf umul 2022-07-21 11:57:27 +02:00
Jakob Rath
8d871bf8b5 dead code 2022-07-21 11:48:41 +02:00
Nikolaj Bjorner
6c5747a80e guard against lemmas that are already true
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-15 10:03:31 -07:00
Nikolaj Bjorner
4ecb61aeaa neatify
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-15 09:53:56 -07:00
Nikolaj Bjorner
2696775088 remove stale assertion
with support for substitutions we allow the simplifier to change the state of equations.
2022-07-15 04:03:25 -07:00
Nikolaj Bjorner
b29cdca936 integrate factorization to Grobner 2022-07-14 21:24:27 -07:00
Nikolaj Bjorner
7c177584f3 add propagators to grobner 2022-07-14 15:45:07 -07:00
Nikolaj Bjorner
4a192850f2 add var_factors
Add routine to partially factor polynomials. It factors out variables.
2022-07-14 11:06:53 -07:00
Jakob Rath
c31503f67d improve output 2022-07-14 10:47:35 +02:00
Nikolaj Bjorner
981c82c814 fix initialization order 2022-07-13 18:11:18 -07:00
Nikolaj Bjorner
894fb836e2 fix build break (debug assertion) and isolate gomory functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-13 17:26:56 -07:00
Nikolaj Bjorner
b81f70f6fc split nla_grobner to separate file 2022-07-13 13:05:57 -07:00
Nikolaj Bjorner
8900db527f add diagnostics for grobner 2022-07-12 20:49:54 -07:00
Nikolaj Bjorner
d5779bf99c handle trivial equalities in simplify_leaf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-11 21:05:26 -07:00
Nikolaj Bjorner
316ed778e0 Tune Grobner equations
\brief convert p == 0 into a solved form v == r, such that
   v has bounds [lo, oo) iff r has bounds [lo', oo)
   v has bounds (oo,hi]  iff r has bounds (oo,hi']

   The solved form allows the Grobner solver identify more bounds conflicts.
   A bad leading term can miss bounds conflicts.
   For example for x + y + z == 0 where x, y : [0, oo) and z : (oo,0]
   we prefer to solve z == -x - y instead of x == -z - y
   because the solution -z - y has neither an upper, nor a lower bound.

The Grobner solver is augmented with a notion of a substitution that is applied before the solver is run.
2022-07-11 16:14:26 -07:00