3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 21:08:46 +00:00
Commit graph

2884 commits

Author SHA1 Message Date
Nikolaj Bjorner db79346ef7 Add new tactic bound-simplifier for integer-based bit-vector reasoning. 2023-01-22 22:07:28 -08:00
Nikolaj Bjorner 021ef699af detect bounds from mod 2023-01-22 14:40:19 -08:00
Nikolaj Bjorner 0f4f32c5d0 apply relevancy filtering on unsupported ops, fix term construction bug in bv2fpa_converter fix #6548 2023-01-20 13:05:01 -08:00
Nikolaj Bjorner f3d6856736 remove msf example, add option to make model converter not reduce models
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-19 20:24:31 -08:00
Nikolaj Bjorner 9290de8223 make euf-egraph resilient to when there are no consumers to literal propagation.
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-18 07:57:19 -08:00
Nikolaj Bjorner 7368f9f7d3 increase build version, better propagation in euf-egraph, handle assumptions in sat.smt
- increase build version to 4.12.1. This prepares updated release for MacOs-11 build on x86
- move literal propagation mode in euf-egraph to a callback and traversal of equivalence class. Track antecedent by newest equality instead of root. This makes equality propagation to literals have similar behavior as in legacy solver and appears to result in a speedup (10% fewer conflicts on QF_UF/QG-classification/qg5/iso_icl478.smt2 in preliminary testing)
- fix interaction of pre-processing and assumptions. Pre-processing has to freeze assumption literals so they don't get eliminated. This is similar to dependencies that are already frozen.
2023-01-17 14:07:07 -08:00
Nikolaj Bjorner d5fde2e578 #6538
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-15 15:58:29 -05:00
Nikolaj Bjorner 4f7f4376b8 fix bug in new core not detecting conflict, fix #6525, add tactic doc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-14 17:20:43 -05:00
Nikolaj Bjorner f1805138e7 missing code signing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-13 16:13:20 -08:00
Nikolaj Bjorner 60fef928cc missing code signing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-13 16:12:48 -08:00
Nikolaj Bjorner 25b0b1430c move bound_manager to simplifiers, add bound manager to extract_eqs for solve-eqs #6532 2023-01-12 12:42:28 -08:00
Nikolaj Bjorner d415f07386 memory leak on proof justifications
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-10 18:58:25 -08:00
Nikolaj Bjorner c3e31149a5 fix #6530
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-10 13:43:17 -08:00
Nikolaj Bjorner 64ec8acd30 fix model reconstruction ordering for elim_unconstrained 2023-01-09 15:18:19 -08:00
Nikolaj Bjorner 30e0f78c16 remove exit
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-09 10:00:36 -08:00
Nikolaj Bjorner 49ee570b09 split into separate function
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-08 19:16:46 -08:00
Nuno Lopes 5899fe3cea
Add rewrite for array selects of chain of stores of a same value (#6526)
* Add rewrite for array selects of chain of stores of a same value

Example:
```smt
(declare-fun mem () (Array (_ BitVec 4) (_ BitVec 4)))
(declare-const x (_ BitVec 4))
(declare-const y (_ BitVec 4))
; simplifies to #x1
(simplify (select (store (store (store mem #x1 #x1) y #x1) x #x1) #x1))
```

* Update array_rewriter.cpp

* Update array_rewriter.cpp
2023-01-08 19:09:01 -08:00
Nikolaj Bjorner 61b90e64b2 disable new simplifcation for multiplier until really understood
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-08 14:17:49 -08:00
Nikolaj Bjorner fcea32344e add missing tactic descriptions, add rewrite for tamagochi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-08 13:32:26 -08:00
Nikolaj Bjorner 95cb06d8cf add quasi macro detection 2023-01-06 19:53:55 -08:00
Nikolaj Bjorner 25112e47b4 bugfix to flatten-clases simplifier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-05 20:59:28 -08:00
Nikolaj Bjorner 21362c0b98 make case-def and recfun-num-rounds re-parsable for logging 2023-01-04 15:00:25 -08:00
Nikolaj Bjorner 8d0d6d8f04 Merge branch 'master' of https://github.com/z3prover/z3 2023-01-04 11:56:38 -08:00
Nikolaj Bjorner 6f95c77023 fix bugs in flatten_clauses simplifier, switch proof/fml
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-04 11:56:28 -08:00
Nuno Lopes e448191212 array rewriter: expand select of store with const array into an ite
This:
(simplify (select (store ((as const (Array (_ BitVec 4) (_ BitVec 4))) #x0) x #x1) y))
=>
(ite (= x y) #x1 #x0)
2023-01-03 11:08:57 +00:00
Nuno Lopes e508ef17f6 fix Alive bug #875: bit blaster not respecting soft memory limit 2023-01-03 10:39:28 +00:00
Nikolaj Bjorner f6d411d54b experimental feature to access congruence closure of SimpleSolver
This update includes an experimental feature to access a congruence closure data-structure after search.
It comes with several caveats as pre-processing is free to eliminate terms. It is therefore necessary to use a solver that does not eliminate the terms you want to track for congruence of. This is partially addressed by using SimpleSolver or incremental mode solving.

```python
from z3 import *
s = SimpleSolver()
x, y, z = Ints('x y z')
s.add(x == y)
s.add(y == z)
s.check()
print(s.root(x), s.root(y), s.root(z))
print(s.next(x), s.next(y), s.next(z))
```
2022-12-30 21:41:27 -08:00
Nikolaj Bjorner 5f6f2fc758 rename bit_blaster class to bit_blaster_simplifier to avoid name clash 2022-12-30 18:39:02 -08:00
Nikolaj Bjorner 2c3ecceb03 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-30 15:47:24 -08:00
Nikolaj Bjorner 293627c889 fix #6513
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-30 09:55:33 -08:00
Nikolaj Bjorner 07ab4d38b6 fix #6513
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-30 09:55:10 -08:00
Nikolaj Bjorner b9c4f5d4fa #6506
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-25 18:33:01 -08:00
Nikolaj Bjorner fe8034731d fix #6501 2022-12-19 21:02:55 -08:00
Nikolaj Bjorner ecf25a4fe2 outline scheme
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-15 14:57:52 -08:00
Nikolaj Bjorner 2d7a38e95e fix #6488
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-13 16:07:41 -08:00
Nikolaj Bjorner aded8e5bf4 fix #6488
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-12 11:40:59 -08:00
Nikolaj Bjorner 4598af70c8 fix #6488
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-12 11:04:46 -08:00
Nikolaj Bjorner a3e6885680 fix #6488 2022-12-12 09:50:44 -08:00
Nikolaj Bjorner 039de6a2c8 build issues
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-11 15:05:13 -08:00
Nuno Lopes cb8603177e fix build 2022-12-11 22:17:11 +00:00
Nuno Lopes d308b8f555 simplify code + remove unused file 2022-12-11 22:11:19 +00:00
Nikolaj Bjorner 2520dcb04b merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-11 14:03:22 -08:00
Nuno Lopes 2d43ccc4c6 Revert "fix crashes in elim-uncnstr2"
This reverts commit a302c2f15e.
2022-12-11 21:37:25 +00:00
Nikolaj Bjorner 6a1b3f7344 move debug output to before state update 2022-12-11 12:51:46 -08:00
Nikolaj Bjorner f7269bb60a update doc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-11 10:16:17 -08:00
Nikolaj Bjorner a9f52b0069 doc fixes 2022-12-11 10:04:01 -08:00
Nikolaj Bjorner 527fb18366 add doc for card2bv 2022-12-11 09:51:49 -08:00
Nuno Lopes a302c2f15e fix crashes in elim-uncnstr2
This would crash before:
(declare-fun x () (_ BitVec 4))
(assert (not (bvule x #x1)))
(apply elim-uncnstr2)

That's because the index_set iterator was querying qtail to compute the end of the iteration
But the problem is that elim-uncnstr2 may add new fmls to the goal, as in this case.
The bvule is replaced with an 'or', but since it's negated, it turns into 2 goals
Solve the issue by freezing the qtail for the iteration loop.
This is the right behavior for elim-uncnstr2, as it can't rewrite exprs that haven't been analyzed before

@NikolajBjorner please check if this the right behavior for the other simplifiers. Thank you
2022-12-11 15:21:23 +00:00
Nuno Lopes c6f9c09d70 cleanup more in dependent_expr_state_tactic to reduce mem consumption 2022-12-09 11:34:53 +00:00
Nikolaj Bjorner 7e69dab8f6 distribute forall cpp code 2022-12-06 18:15:18 -08:00