3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-17 01:46:39 +00:00
Commit graph

475 commits

Author SHA1 Message Date
Nikolaj Bjorner
fe1b4bf5ce disable ternary, fixes to propagation, make bv_rewrites for multiplier n-ary 2022-10-26 23:44:38 -07:00
Nikolaj Bjorner
154fed7783 introduce globally visible macro for controlling use of ternary, turn them off 2022-10-25 10:30:18 -07:00
Nikolaj Bjorner
ddbca68270 minor formatting update 2022-10-23 11:05:09 -07:00
Nikolaj Bjorner
7b3a634b8d wip - features and bug-fixes to proof logging 2022-10-18 07:54:49 -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
9f78a96c1d wip - trim 2022-10-06 18:19:03 +02:00
Nikolaj Bjorner
1f150ecd52 #6319
#6319 - fix incompleteness in propagation of default to all array terms in the equivalence class.

Fix bug with q_mbi where domain restrictions are not using values because the current model does not evaluate certain bound variables to values. Set model completion when adding these bound variables to the model to ensure their values are not missed.

Add better propagation of diagnostics when tactics and the new solver return unknown. The reason for unknown can now be traced to what theory was culprit (currently no additional information)
2022-09-23 22:22:34 -05:00
Nikolaj Bjorner
7caf6a682b #6319 resolve for unsat core when using assumptions 2022-09-19 20:10:53 -07:00
Nikolaj Bjorner
c11bd79484 add assertions 2022-09-18 17:22:59 -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
ce1f3987d9 fix unsoundness in quantifier propagation #6116 and add initial lemma logging 2022-08-23 19:10:01 -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
61f5489223 fix #6107 2022-06-27 16:53:18 -07:00
Clemens Eisenhofer
2fa60aa43c
Added function to select the next variable to split on (User-Propagator) (#6096)
* Added function to select the next variable to split on

* Fixed typo

* Small fixes

* uint -> int
2022-06-19 10:49:25 -07:00
Nikolaj Bjorner
25ad5cb073 prepare ground for drup trim
By not deleting justifications in base level unit literals it is possible for drup-trim to inspect the trail for dependencies - which clauses were used to derive a literal.
2022-06-14 09:51:06 -07:00
Nikolaj Bjorner
5db133f875 add a way to supress lambdas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 14:35:20 -07:00
Nikolaj Bjorner
3cc9d7f443 improve pre-processing 2022-04-15 12:55:26 +02:00
Nikolaj Bjorner
a634876180 sort muxes 2022-04-15 12:55:26 +02:00
Nikolaj Bjorner
405a26c585 allow adding constraints during on_model 2022-04-09 09:55:02 +02:00
Nikolaj Bjorner
6d836e7e2f expose model update 2022-03-19 09:23:08 -07:00
Nikolaj Bjorner
1e0d49512b call mux finder 2022-01-31 12:00:16 -08:00
Nikolaj Bjorner
d777306bb6 #5778 2022-01-17 10:43:15 -08:00
Nikolaj Bjorner
ea93345b75 #5777 2022-01-16 10:52:25 -08:00
Nikolaj Bjorner
8e3185ffe3 remove dual solver approach
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-03 14:08:01 -08:00
Nikolaj Bjorner
2944449884 #5641 2022-01-03 11:12:09 -08:00
Nikolaj Bjorner
d50bfc6a50 #5641 2021-11-25 18:01:35 +01:00
Henrich Lauko
96671cfc73
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
2021-10-29 15:42:32 +02:00
Nikolaj Bjorner
b016465ad2 #5454 2021-08-11 20:31:53 -07:00
Nikolaj Bjorner
46107022f7 #5454 2021-08-11 17:06:42 -07:00
Nikolaj Bjorner
f3f83d0445 #5429 2021-07-30 13:43:02 -07:00
Nikolaj Bjorner
ed49c1eae3 #5324 2021-06-06 15:14:38 -07:00
Nikolaj Bjorner
c388d99c35 #5324 2021-06-06 10:58:47 -07:00
Nikolaj Bjorner
fb75dac63f #5223 2021-05-31 12:01:33 -07:00
Nikolaj Bjorner
30e904bfa4 disable threads for extensions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-27 21:46:56 -07:00
Nikolaj Bjorner
892e6d9ed5 build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-14 05:06:46 -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
38737db802 fixes and more porting seq_eq_solver to self-contained module 2021-03-04 16:23:22 -08:00
Nikolaj Bjorner
69070a7486 align translation cache with scopes and variable elimination 2021-03-03 11:22:17 -08:00
Nikolaj Bjorner
13f05ae9dc enable wcnf output for weighted maxsat problems 2021-02-28 09:59:36 -08:00
Nikolaj Bjorner
083d09aa81 fix #5016 2021-02-14 13:52:10 -08:00
Nikolaj Bjorner
25f53c0467 deal with warnings reported in https://launchpadlibrarian.net/522361319/buildlog_ubuntu-groovy-s390x.z3_4.8.10-1ubuntu4ppa1_BUILDING.txt.gz
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-02-11 13:49:47 -08:00
Nikolaj Bjorner
0ec567fe15 integrate v2 of lns 2021-02-04 15:47:40 -08:00
Nikolaj Bjorner
4455f6caf8 move to get_sort as method, add opt_lns pass, disable xor simplification unless configured, fix perf bug in model converter update trail 2021-02-02 03:58:19 -08:00
Nikolaj Bjorner
b87405cc92 tune user-pop 2021-01-18 16:51:34 -08:00
Nikolaj Bjorner
374ae52d70 testing mbi 2020-12-26 13:49:59 -08:00
Nikolaj Bjorner
12198d13ac fix #4794 2020-12-02 12:24:35 -08:00
Nikolaj Bjorner
9f34af5e18 update justifications only at level 0 2020-11-20 11:12:55 -08:00
Nikolaj Bjorner
ab199dedf9 debug arith/mbi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-11-02 12:13:19 -08:00
Nikolaj Bjorner
a764d528a1 'clean
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-10-30 13:14:48 -07:00