3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00
Commit graph

1823 commits

Author SHA1 Message Date
Jakob Rath
5e54cd3e44 Add basic support for not, or, xor, nand, nor via rewriting 2022-09-30 13:02:32 +02:00
Jakob Rath
1df749ad33 Merge branch 'master' into polysat 2022-09-23 17:14:26 +02:00
Nikolaj Bjorner
4c6d7158cb extended debugging for sat.euf 2022-09-22 17:05:32 -05:00
Nikolaj Bjorner
20250b200f #6319
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-19 20:31:36 -07:00
Nikolaj Bjorner
7caf6a682b #6319 resolve for unsat core when using assumptions 2022-09-19 20:10:53 -07:00
Nikolaj Bjorner
f4bea58852 #6319
ensure unknown when a lambda is not in beta redex
2022-09-19 03:19:47 -07:00
Nikolaj Bjorner
fce4d2ad90 #6319 2022-09-19 03:07:51 -07:00
Nikolaj Bjorner
d6d34a8962 #6319 2022-09-19 02:32:04 -07:00
Nikolaj Bjorner
13f43ea107 bug fix for #6319
literals that are replayed need to be registered with respective theories, otherwise, they will not propagate with the theories (the enode have to be attached with relevant theory variables).
2022-09-18 17:23:00 -07:00
Nikolaj Bjorner
e54635e0ed rename statistics to something more meaningful: instantiations from MBQI are tagged with mbi 2022-09-18 17:23:00 -07:00
Nikolaj Bjorner
2b4ba5e170 updated header file for arithmetic solver 2022-09-18 17:23:00 -07:00
Nikolaj Bjorner
0b9c9cbbce add a queue head to delay propagation
delay propagation on each disequality/equality should suffice once. It adds relevant inequalities to ensure the arithmetic solver is coherent about disequalities.
2022-09-18 17:23:00 -07:00
Nikolaj Bjorner
d479bd9c53 formatting 2022-09-18 17:22:59 -07:00
Nikolaj Bjorner
c11bd79484 add assertions 2022-09-18 17:22:59 -07:00
Nikolaj Bjorner
9a987237d5 don't rename uint_set but keep the original name 2022-09-18 17:22:59 -07:00
Nikolaj Bjorner
55d5af00cc disable bv delay until it is debugged #6324
regression introduced when filter for when to apply delay was fixed, but then it exercises delay tactic that isn't tested.
2022-09-07 00:04:57 -07:00
Nikolaj Bjorner
fcc6e6c899 doc bug 2022-09-05 03:17:13 -07:00
Nikolaj Bjorner
8dc8de8ccd lazy multiplier experiment
this update provides a use case for and allows testing incremental multiplier compilation.
2022-09-05 03:09:18 -07:00
Nikolaj Bjorner
b49ffb8a87 indentation 2022-09-04 16:23:11 -07:00
Nikolaj Bjorner
60967efd38 fix wrong condition for delayed bit-blasting 2022-09-02 18:39:21 -07:00
Nikolaj Bjorner
7e1e64d027 fix #6313
remaining new issues
2022-09-02 17:48:00 -07:00
Nikolaj Bjorner
e4ef1717e3 fix variable tracking bug in explanations with literals 2022-09-01 23:26:38 -07:00
Nikolaj Bjorner
ac5b190a72 track instantiations from MBQI in proof logging for new solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-01 08:51:53 -07:00
Nikolaj Bjorner
d3e6ba9f98 remove union
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-31 19:09:13 -07:00
Nikolaj Bjorner
3011b34b3b log E-matching based quantifier instantiations as hints 2022-08-31 18:59:02 -07:00
Nikolaj Bjorner
6077c4154a #6116 bv2int bug fix 2022-08-31 17:31:54 -07:00
Nikolaj Bjorner
4abff18e8d fill in missing pieces of proof hint checker for Farkas and RUP
The proof validator based on SMT format proof logs uses RUP to check propositional inferences and has plugins for theory axioms/lemmas.
2022-08-31 05:29:15 -07:00
Nikolaj Bjorner
0f475f45b5 Add RUP checking mode to proof checker. 2022-08-30 09:45:19 -07:00
Nikolaj Bjorner
dd90689339 build fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-28 18:54:36 -07:00
Nikolaj Bjorner
4d29925c3f build fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-28 18:43:50 -07:00
Nikolaj Bjorner
e2f4fc2307 overhaul of proof format for new solver
This commit overhauls the proof format (in development) for the new core.

NOTE: this functionality is work in progress with a long way to go.
It is shielded by the sat.euf option, which is off by default and in pre-release state.
It is too early to fuzz or use it. It is pushed into master to shed light on road-map for certifying inferences of sat.euf.

It retires the ad-hoc extension of DRUP used by the SAT solver.
Instead it relies on SMT with ad-hoc extensions for proof terms.
It adds the following commands (consumed by proof_cmds.cpp):

- assume  - for input clauses
- learn   - when a clause is learned (or redundant clause is added)
- del     - when a clause is deleted.

The commands take a list of expressions of type Bool and the
last argument can optionally be of type Proof.
When the last argument is of type Proof it is provided as a hint
to justify the learned clause.

Proof hints can be checked using a self-contained proof
checker. The sat/smt/euf_proof_checker.h class provides
a plugin dispatcher for checkers.
It is instantiated with a checker for arithmetic lemmas,
so far for Farkas proofs.

Use example:
```
(set-option :sat.euf true)
(set-option :tactic.default_tactic smt)
(set-option :sat.smt.proof f.proof)
(declare-const x Int)
(declare-const y Int)
(declare-const z Int)
(declare-const u Int)
(assert (< x y))
(assert (< y z))
(assert (< z x))
(check-sat)
```

Run z3 on a file with above content.
Then run z3 on f.proof

```
(verified-smt)
(verified-smt)
(verified-smt)
(verified-farkas)
(verified-smt)
```
2022-08-28 17:44:33 -07:00
Nikolaj Bjorner
dd91fab6f4 Merge branch 'master' of https://github.com/Z3Prover/z3 2022-08-26 10:44:40 -07:00
Nikolaj Bjorner
159026b5e8 regression fix to ackerman gc and memory smash, perf fix for handling bv2int axioms, perf fix for filtering ackerman
this update addresses some perf regressions introduced when handling axioms for bv2int and a memory smash regression when decoupling bv-ackerman from in-processing. It adds a filter based on bv_eq_axioms for disabling ackerman reductions on disequalities.
2022-08-26 10:44:33 -07:00
Nikolaj Bjorner
458f417f44 move drat functionality into euf 2022-08-25 19:19:13 -07:00
Nikolaj Bjorner
1ffbe23ee3 add virtual destructor to fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-25 18:37:24 -07:00
Nikolaj Bjorner
1894c86ee0 virtual
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-25 18:27:30 -07:00
Nikolaj Bjorner
ca0a82952f add function pointer to class to see how MacOs build reacts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-25 16:15:34 -07:00
Nikolaj Bjorner
0d7b7a417a selectively re-add solver_params
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-25 13:29:42 -07:00
Nikolaj Bjorner
5f2387b3be revert some changes that coincide with breaking macos build 2022-08-25 11:22:35 -07:00
Nikolaj Bjorner
a628e4c4e5 updates to printer to get instantiations, take 1 2022-08-25 11:22:35 -07:00
Nikolaj Bjorner
f0eee41ab9 include depenency 2022-08-25 09:09:04 -07:00
Nikolaj Bjorner
fb8532bf55 succinct logging
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-23 21:06:04 -07:00
Nikolaj Bjorner
74c61f49b4 move std::function to header of sat-drat - alignment?
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-23 20:20:51 -07:00
Nikolaj Bjorner
c6263587c3 fix validator bug returning true for unprocessed case, bug reported in #6116 2022-08-23 20:17:32 -07:00
Nikolaj Bjorner
ce1f3987d9 fix unsoundness in quantifier propagation #6116 and add initial lemma logging 2022-08-23 19:10:01 -07:00
Nikolaj Bjorner
17fc438476 don't have bv-ackerman influence simplification
previous scheme has Ackmerman module instrument main solver to backjump and simplify when reaching a threshold.
This destroys overall performance: simplification does many more things than invoking Ackerman axioms.
Having a dependency between simplification (in-processing) and depleting a priority queue of auxiliary axioms therefore hurts overall performance. It has to be decoupled. The current approach is now to empty the axiom queue on occasion.
It is still not ideal - it should be coupled with the search level - axioms don't survive higher levels where redundant clauses get garbage collected as they don't have a chance of being used.
2022-08-21 15:25:18 -07:00
Nikolaj Bjorner
bb5d81195c use equalities 2022-08-19 18:17:16 -07:00
Nikolaj Bjorner
8e167aa213 #6116
fix unsoundness issue due to book-keeping changes for whether the solver uses assumptions.
2022-08-18 03:58:06 -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
f989521a8c add initial skeleton for xor-solver 2022-08-12 11:54:10 -04:00