3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-22 11:07:51 +00:00
Commit graph

69 commits

Author SHA1 Message Date
Jakob Rath
0b17a14c83 extract/concat plumbing 2023-07-21 10:19:21 +02:00
Jakob Rath
8bde66420a Merge branch 'master' into polysat 2023-06-12 14:02:20 +02:00
Clemens Eisenhofer
82667bd86b
Fix UP's decide callback (#6707)
* Query Boolean Assignment in the UP

* UP's decide ref arguments => next_split

* Fixed wrapper

* More fixes
2023-06-02 09:52:54 +02:00
Nikolaj Bjorner
6c00d40513 polysat fixes
1. ensure that force_push is invoked before polysat updates state.
2. extract conflicts based on dependencies of both new literal that was conflicting with existing literal that had its value assigned based on dependencies.
2023-03-06 17:35:39 -08:00
Nikolaj Bjorner
6450ad82f4 fixup proof logging
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-02-27 14:46:26 -08:00
Nikolaj Bjorner
8be6dcce31 finish adding eqs to bv_solver justifications
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-02-24 10:21:56 -08:00
Nikolaj Bjorner
706d542eeb add propagation justification to bv antecedents 2023-02-23 17:52:34 -08:00
Jakob Rath
645f4620de catch default case 2023-02-23 10:56:12 +01:00
Jakob Rath
20b5455d08 Merge branch 'master' into polysat 2023-02-01 16:28:57 +01:00
Nikolaj Bjorner
85f9c7eefa replace restore_size_trail by more generic restore_vector
other updates:
- change signature of advance_qhead to simplify call sites
- have model reconstruction replay work on a tail of dependent_expr state, while adding formulas to the tail.
2022-11-28 11:45:56 +07:00
Nikolaj Bjorner
1fae3aa152 rename set-flat to set-flat-and-or to allow to differentiate parameters 2022-10-27 11:22:57 -07:00
Nikolaj Bjorner
5c7eaec566 #6364 - remove option of redundant clauses from internalization
gc-ing definitions leads to unsoundness when they are not replayed.
Instead of attempting to replay definitions theory internalization is irredundant by default.
This is also the old solver behavior where TH_LEMMA is essentially never used, but is valid for top-level theory lemmas.
2022-10-24 00:38:31 -07:00
Nikolaj Bjorner
cdfab8cb13 wip - add bit-vector validator plugins and logging 2022-10-18 14:50:21 -07:00
Nikolaj Bjorner
a25247aa7b wip - remove stale skaffolding for retrieving sub-hints. 2022-10-16 17:18:08 -07:00
Nikolaj Bjorner
ac1552d194 wip - updates to proof logging and self-checking
move self-checking functionality to inside sat/smt so it can be used on-line and not just off-line.

when self-validation fails, use vs, not clause, to check. It allows self-validation without checking and maintaining RUP validation.

new options sat.smt.proof.check_rup, sat.smt.proof.check for online validation.

z3 sat.smt.proof.check=true sat.euf=true /v:1 sat.smt.proof.check_rup=true /st file.smt2 sat.smt.proof=p.smt2
2022-10-16 23:33:30 +02:00
Nikolaj Bjorner
9be8fc7857 Add EUF (congruence closure) proof hints and checker to the new core
EUF proofs are checked modulo union-find.
Equalities are added to to union-find if they are assumptions or if they can be derived using congruence closure. The congruence closure assumptions are added as proof-hints.
Note that this proof format does not track equality inferences, symmetry and transitivity. Instead they are handled by assuming a union-find based checker.
2022-09-25 14:26:20 -07:00
Jakob Rath
1df749ad33 Merge branch 'master' into polysat 2022-09-23 17:14:26 +02: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
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
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
Jakob Rath
e168d8a2eb Merge branch 'master' into polysat 2022-07-21 12:56:50 +02:00
Nikolaj Bjorner
580ed31afd fix types and incompleteness for feature #6104 2022-07-06 01:08:54 -07:00
Nikolaj Bjorner
f82ca197d2 #6104 also in the new core 2022-07-05 12:38:07 -07:00
Nikolaj Bjorner
6df23fbce3 add note about a bug
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-26 16:58:00 -08:00
Nikolaj Bjorner
ff93c03972 integrate polysat into bv solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-26 20:20:45 +01:00
Nikolaj Bjorner
c00591daaf finish is-fixed
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-19 16:28:34 +01:00
Nikolaj Bjorner
a48d3fdbb1 #5777 2022-01-16 14:01:49 -08:00
Nikolaj Bjorner
c4d0ded7b7 #5532 2021-09-08 06:19:49 +02:00
Nikolaj Bjorner
6c0a790576 #5445 2021-08-02 09:22:54 -07:00
Nikolaj Bjorner
fb75dac63f #5223 2021-05-31 12:01:33 -07:00
Nikolaj Bjorner
e63e4587a4 build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-21 15:41:12 -07:00
Nikolaj Bjorner
abe3ef2382 #5215 2021-05-19 10:33:23 -07:00
Nikolaj Bjorner
e5892e5e97 #5215
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-27 15:26:56 -07:00
Nikolaj Bjorner
5d49cb5519 #5211 2021-04-22 22:42:05 -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
15a7621e27 remove template dependency for trail objects 2021-03-19 11:15:05 -07:00
Nikolaj Bjorner
8412ecbdbf fixes to new solver, add mode for using nlsat solver eagerly from nla_core 2021-03-14 13:57:04 -07:00
Nikolaj Bjorner
f29a596070 deal with compiler warnings, from MacOS CI build 2021-03-08 17:14:09 -08:00
Nikolaj Bjorner
55cb12e233 build fix 2021-02-08 16:53:30 -08:00
Nikolaj Bjorner
a152bb1e80 remove template Context dependency in every trail object 2021-02-08 15:41:57 -08:00
Nikolaj Bjorner
990aecceb7 change gc strategy for user-push/pop 2021-01-18 16:55:29 -08:00
Nikolaj Bjorner
11477f1ed1 fixes in new solver
fix logging and lemma signs in arith_solver, move logging of drat equalities to euf
2020-12-16 10:40:17 -08:00
Nikolaj Bjorner
12198d13ac fix #4794 2020-12-02 12:24:35 -08:00
Nikolaj Bjorner
9156e355d8 log 2020-11-30 11:57:25 -08:00
Nikolaj Bjorner
d6a5ef4343 add recfuns to Java #4820
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-11-25 12:25:20 -08:00
Nikolaj Bjorner
f6f594e21d fix missing equality propagation in new bv solver 2020-11-16 16:22:56 -08:00
Nikolaj Bjorner
b5aab7ec2a fix clone 2020-11-11 17:37:06 -08:00
Nikolaj Bjorner
89ffb45c4f fixes to bv/dual-solver, 2020-11-08 17:18:18 -08:00
Nikolaj Bjorner
2f756da294
adding dt-solver (#4739)
* adding dt-solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* move mbp to self-contained module

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* Create CMakeLists.txt

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* rename to bool_var2expr to indicate type class

* mbp

* na
2020-10-18 15:28:21 -07:00