3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00
Commit graph

1650 commits

Author SHA1 Message Date
Nikolaj Bjorner
959f150e4a Merge branch 'master' of http://github.com/z3prover/z3 into polysat 2021-09-20 17:39:04 -07:00
Nikolaj Bjorner
1e3ff3179e handle empty clauses created as lemmas as unsat state.
add unit tests
2021-09-19 15:43:47 -04:00
Nikolaj Bjorner
fa3886136b adding Boolean propagation, watch; and factoring 2021-09-18 22:18:15 -04:00
Nikolaj Bjorner
50375df8dc enforce idempotency
bug reported by Clemens
2021-09-15 15:36:20 +01:00
Nikolaj Bjorner
f13ccf8969 bv2char and char2bv with Clemens
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-13 16:09:03 +02:00
CEisenhofer
47fdd6c060
Added 16 bit string-encoding (#5540) 2021-09-09 11:35:16 +02:00
Nikolaj Bjorner
20a259cfaa throw less #5519 2021-09-03 10:40:08 -07:00
Jakob Rath
dde8fb0c37
Polysat updates (#5524)
* Move boolean resolution into conflict_core

* Move store() into dedup functionality

* comments

* Call gc()

* Add inference_engine sketch
2021-08-31 08:16:45 -07:00
Nikolaj Bjorner
7ea1bf12b6 add code review to constraint
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-30 11:11:55 -07:00
Nikolaj Bjorner
39f50d46cc Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-08-30 10:00:58 -07:00
Nuno Lopes
9b5ec6d004 logging cleanup
move everything out-of-line as common path doesn't log
fix some race conditions on file ptr vs enable_logging vars
2021-08-29 12:24:19 +01:00
Nikolaj Bjorner
23b995d3b5 #5499
throw exception when dividing by a small 0
2021-08-24 08:52:20 -07:00
Nikolaj Bjorner
11a048d5f9 add auxiliary propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-14 17:55:48 -07:00
Nikolaj Bjorner
524ebed44f Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-08-11 09:21:58 -07:00
Margus Veanes
225204e2f4
updates related to issue #5140 (#5463)
* updates related to issue #5140

* updated/simplified some cases

* fixing feedback comments

* fixed comments and added missing case for get_re_head_tail_reversed

* two bug fixes and some other code improvements
2021-08-09 10:48:56 -07:00
Nikolaj Bjorner
0249d009f1 Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-08-04 14:02:41 -07:00
Nikolaj Bjorner
202ed79a24 #5445 2021-08-03 11:17:23 -07:00
Nikolaj Bjorner
123c446395 fix #5449 2021-08-01 13:03:40 -07:00
Nikolaj Bjorner
4c6e2acd45 add colors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-15 00:03:56 +02:00
Nikolaj Bjorner
5bd900a7e1 fix include dependencies for tbv
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-02 03:36:17 -07:00
Nikolaj Bjorner
f18dccebc2 move tbv
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-21 21:12:46 -07:00
Nikolaj Bjorner
4a0a678e3f #5336 2021-06-19 22:21:45 -07:00
Nikolaj Bjorner
57df45dc16 Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-06-18 10:02:33 -07:00
Nikolaj Bjorner
3da9d91866 #5333 2021-06-06 16:45:50 -07:00
Jakob Rath
46f8b15c14
ref/ref_vector minor convenience changes (#5322)
* Add ref_vector_core::push_back(ref<T>&&)

* Make operator bool() explicit
2021-05-31 10:27:46 -07:00
Jakob Rath
8757f04d20
Polysat: disjunctive lemmas (#5311)
* Add macro to disable linear solver for development

* Move new_* and add_* to header

* Add ref_vector_core::push_back(ref<T>&&)

* Attempt to simplify lifetime handling

* Make operator bool() explicit

* clause improvements

* display boolean assignment

* clause::resolve

* bug fixes

* more fixes

* final case of backtrack
2021-05-28 13:53:08 -07:00
Nuno Lopes
f1545b04d2 optimize symbol table for single-threaded mode
remotes a bunch of mem allocs + unnecessary computations on every string lookup
2021-05-23 16:35:44 +01:00
Nuno Lopes
aef38099bf vector.h: add assert to fail compilation if alignment isn't ok
let's see if all buildbots are happy with this..
2021-05-23 15:57:56 +01:00
Nuno Lopes
8fd7226b6f typo 2021-05-23 14:28:42 +01:00
Nuno Lopes
f1e0d5dc8a remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00
Nuno Lopes
9eb566b401 simplify some constructors/destructors 2021-05-23 12:39:49 +01:00
Nuno Lopes
79201e5ce6 buffer.h c++17 improvements
1) ensure data is properly aligned
2) add move constructor (useful for zstrings)
2021-05-23 12:11:12 +01:00
Nuno Lopes
34e8a2f0f6 simplify 2021-05-23 12:01:04 +01:00
Nikolaj Bjorner
147b3600d9 keep
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-22 14:36:49 -07:00
Nikolaj Bjorner
20a67e47ca remove symbol -> zstring -> symbol round-trips
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-22 13:12:49 -07:00
Nikolaj Bjorner
5cb0bac41d patch
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-22 12:26:54 -07:00
Nikolaj Bjorner
a10de2e975 #5140 2021-05-22 10:15:06 -07:00
Jakob Rath
28996429df
Polysat disjunctive lemmas (WIP) (#5275)
* Extend search state by boolean literals

* Only resolve against positive equality

* mk_dep_ref

* Make clause non-owning

* scoped_clause

* Use scoped_clause

* minor

* scoped_ptr move assignment

* WIP: internal handling of disjunctive constraints

* leaf_value

* disjunctive constraints continued

* Fix bool_lit

* Actually add constraints to storage

* Some fixes

* more fixes

* constraint should have a bool_lit instead of a bool_var

* propagate(bool_lit)

* updates

* interface changes

* small fixes

* Make sat::dimacs_lit's constructor explicit

(otherwise, calling operator<< with sat::literal is ambiguous)

* Use sat::literal

* Print test name at the beginning

* Convention: constraint corresponds to the positive boolean literal

* Make constraint ownership more explicit

* clause stores literals
2021-05-21 13:50:25 -07:00
Jakob Rath
089015b250
Minor fix in sat::literal (#5293) 2021-05-21 13:50:01 -07:00
Nikolaj Bjorner
26893005c7 Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-05-20 15:28:32 -07:00
Nikolaj Bjorner
03d2c5f3d0 consolidate literals 2021-05-20 12:58:27 -07:00
Nikolaj Bjorner
ec034679ce #5215
memory leaks
2021-05-19 12:42:38 -07:00
Nikolaj Bjorner
dc879dc3fb merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-03 12:41:14 -07:00
Jakob Rath
f7e476a4a0
Polysat: fixes in solver, forbidden intervals for eq_constraint (#5240)
* Rename to neg_cond

* Add some logging utilities

* Implement case of forbidden interval covering the whole domain

* Implement diseq_narrow

* Do not activate constraint if we are in a conflict state

* comments

* Assert that lemma isn't undefined

* Update revert_decision to work in the case where narrowing causes propagation

* Fix case of non-disjunctive lemma from forbidden intervals

* Conflict should not leak outside user scope

* Add guard to decide(), some notes

* Add test case

* Add constraints to watchlist of unassigned variable during propagation

* Move common propagation functionality into base class

* Combine eq/diseq narrow

* Compute forbidden interval for equality constraints by considering them as p <=u 0 (or p >u 0 for disequalities)
2021-05-03 09:30:17 -07:00
Jakob Rath
0c4824f194
Polysat: forbidden intervals updates (#5230)
* Pop assign_eh

* Fix scoped_ptr_vector constructors, add detach()

* Need to copy the returned lemma

* Add test

* Basic inequality tests

* Return disjunctive lemma to caller
2021-04-30 08:41:50 -07:00
Nikolaj Bjorner
decbf4be11 fix undo record for lblset
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-29 14:06:18 -07:00
Nikolaj Bjorner
e5892e5e97 #5215
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-27 15:26:56 -07:00
Nikolaj Bjorner
c03fac8390 Investigating std::vector and #5178 2021-04-24 14:50:59 -07:00
Nikolaj Bjorner
36cd80748f working on pivot
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-20 17:42:01 -07:00
Nikolaj Bjorner
831edba1c8 fixplex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-20 12:03:28 -07:00