3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00
Commit graph

17292 commits

Author SHA1 Message Date
Nikolaj Bjorner
850d35b95b fix polarity of antecedents
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-07 10:59:51 -08:00
Nikolaj Bjorner
923fcf4771 attempting to fix display method
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-07 09:51:44 -08:00
CEisenhofer
a32da52350 Revert polarity in justifications 2022-12-07 15:54:58 +01:00
CEisenhofer
b5647f4d35 Justifications 2022-12-07 15:53:17 +01:00
CEisenhofer
7d58a29bd5 Region scoping 2022-12-05 15:37:54 +01:00
CEisenhofer
f22aa0eec5 Bugfix polarity + Bugfix memory allocation 2022-12-05 15:22:59 +01:00
Clemens Eisenhofer
662019ee17 Fixed decision-level (again) 2022-12-05 07:52:56 +01:00
Clemens Eisenhofer
e4d3b4dcc5 Some code cleanup 2022-12-05 07:42:22 +01:00
Clemens Eisenhofer
d2f3981d06 Some more comments + Bugfix decision-level 2022-12-04 21:43:26 +01:00
Clemens Eisenhofer
1bcf2eff02 Sorted assumptions to the end of the matrix + refactoring 2022-12-04 19:34:00 +01:00
Clemens Eisenhofer
4c76e43322 Fixed "external" 2022-12-04 17:16:33 +01:00
Clemens Eisenhofer
c0f44af643 Bugfix + refactoring 2022-12-04 15:46:58 +01:00
Nikolaj Bjorner
a7f3ef2c8c rewrite occurs code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-01 14:32:48 -08:00
Clemens Eisenhofer
aac096c5dd Merged 2022-12-01 20:50:45 +01:00
Clemens Eisenhofer
9585d31613 Merge remote-tracking branch 'upstream/xor' into xor 2022-12-01 20:38:59 +01:00
Clemens Eisenhofer
5ed695bbbe Fixed shrink 2022-12-01 20:13:34 +01:00
CEisenhofer
8a34104101 Refactoring 2022-12-01 20:12:10 +01:00
Clemens Eisenhofer
3586c288ec Fix popcnt64 2022-11-30 12:53:13 +01:00
Clemens Eisenhofer
add66973c5 vector -> set 2022-11-30 12:35:12 +01:00
Clemens Eisenhofer
0b46b61dc3 Fix vector initialization 2022-11-30 12:27:19 +01:00
Clemens Eisenhofer
15a5c97943 Bugfix hashmap insertion 2022-11-30 12:05:42 +01:00
CEisenhofer
dc9069641c Changes 2022-11-30 10:49:41 +01:00
Nikolaj Bjorner
8ee3ca1d7c remove const qualifiers from value types, add code review comment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-15 09:35:50 -08:00
Nikolaj Bjorner
fbd775e5f0 comment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-15 09:27:25 -08:00
Clemens Eisenhofer
b566b5cead
Use Z3's watch-list (#6449)
* Use Z3's watch-list

* Ported clean-up code

* Fixed build

* Cleanup
2022-11-14 07:39:00 -08:00
CEisenhofer
2ef27064c7 Cleanup 2022-11-14 15:31:24 +01:00
CEisenhofer
1a5231fbf2 Fixed build 2022-11-14 14:25:27 +01:00
Clemens Eisenhofer
51ea347a4a Ported clean-up code 2022-11-14 09:32:57 +01:00
Clemens Eisenhofer
e7cf789969 Use Z3's watch-list 2022-11-11 10:28:41 +01:00
Nikolaj Bjorner
07e2343c10 fix regression introduced when editing xor_gaussian
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 14:33:06 -08:00
Nikolaj Bjorner
02f011c1e8 fingers starting on xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 14:06:49 -08:00
Nikolaj Bjorner
56507d2dd4 fingers starting on xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 14:04:00 -08:00
Nikolaj Bjorner
da457e3fb9 fingers starting on xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 13:56:22 -08:00
Nikolaj Bjorner
303fd664c5 fingers starting on xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 13:53:08 -08:00
Nikolaj Bjorner
574f897f93 fingers over xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 13:39:46 -08:00
Nikolaj Bjorner
0ad2b54404 fingers starting on xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 13:08:31 -08:00
Nikolaj Bjorner
12be80524d fingers starting on xor_gaussian.cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 13:06:31 -08:00
Nikolaj Bjorner
130432370f fingers over xor_gaussian.h
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 12:47:50 -08:00
Nikolaj Bjorner
bf39b2b103 merge with current master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 10:46:42 -08:00
Nikolaj Bjorner
08a925323c Merge branch 'master' of https://github.com/z3prover/z3 into xor 2022-11-10 10:42:38 -08:00
Clemens Eisenhofer
002d166f72
Xor (#6448)
* Added function to select the next variable to split on

* Fixed typo

* Small fixes

* uint -> int

* Fixed missing assignment for binary clauses

* Memory leak in .NET user-propagator
The user-propagator object has to be manually disposed (IDisposable), otherwise it stays in memory forever, as it cannot be garbage collected automatically

* Throw an exception if variable passed to decide is already assigned instead of running in an assertion violation

* Update (not compiling yet)

* #6429

* remove ternary clause optimization

Removing ternary clause optimization from sat_solver simplifies special case handling of ternary clauses throughout the sat solver and dependent solvers (pb_solver). Benchmarking on QF_BV suggests the ternary clause optimization does not have any effect. While removing ternary clause optimization two bugs in unit propagation were also uncovered: it missed propagations when the only a single undef literal remained in the non-watched literals and it did not update blocked literals in cases where it could in the watch list. These performance bugs were for general clauses, ternary clause propagation did not miss propagations (and don't use blocked literals), but fixing these issues for general clauses appear to have made ternary clause optimization irrelevant based on what was measured.

* Update: Missing data-structures (still not compiling)

* Nearly compiling

* Some missing arguments

* Polishing

* Only conflicts/propagations/justifications are missing for making it compile

* Added propagation (justifications for them are still missing)

* Use the right deallocation

* Use Z3's memory allocation system

* Ported "seen"

* Polishing

* Added 64-bit "1" counting

* More polishing

* minor fixes

- ensure mk_extract performs simplification to distribute over extract and removing extract if the range is the entire bit-vector
- ensure bool_rewriter simplifeis disjunctions when applicable.

* adding simplifiers layer

simplifiers layer is a common substrate for global non-incremental and incremental processing.
The first two layers are new, but others are to be ported form tactics.

- bv::slice - rewrites equations to cut-dice-slice bit-vector extractions until they align. It creates opportunities for rewriting portions of bit-vectors to common sub-expressions, including values.
- euf::completion - generalizes the KB simplifcation from asserted formulas to use the E-graph to establish a global and order-independent canonization.

The interface dependent_expr_simplifier is amenable to forming tactics. Plugins for asserted-formulas is also possible but not yet realized.

* Create bv_slice_tactic.cpp

missing file

* adding virtual destructor

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

* Added 64-bit "1" counting (#6434)

* Memory leak in .NET user-propagator
The user-propagator object has to be manually disposed (IDisposable), otherwise it stays in memory forever, as it cannot be garbage collected automatically

* Throw an exception if variable passed to decide is already assigned instead of running in an assertion violation

* Added 64-bit "1" counting

* remove incorrect assertion

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

* Added limit to "visit" to allow detecting multiple visits (#6435)

* Memory leak in .NET user-propagator
The user-propagator object has to be manually disposed (IDisposable), otherwise it stays in memory forever, as it cannot be garbage collected automatically

* Throw an exception if variable passed to decide is already assigned instead of running in an assertion violation

* Added limit to "visit" to allow detecting multiple visits

* Putting visit in a separate class
(Reason: We will probably need two of them in the sat::solver)

* Bugfix

* init solve_eqs

* working on solve_eqs

* Update .gitignore

* wip - converting the equation solver as a simplifier

* make visited_helper independent of literals

re-introduce shorthands in sat::solver for visited and have them convert literals to unsigned.

* build fix

* move model and proof converters to self-contained module

* Create solve_eqs2_tactic.h

* add converters module to python build

* move tactic_params to params

* move more converters

* move horn_subsume_model_converter to ast/converters

* add initial stubs for model reconstruction trail

* fixing build

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

* fixes #6439 #6436

* It's compiling (However, two important functions are commented out)

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-10 09:05:17 -08:00
Nikolaj Bjorner
15be80c954 remove dependency on hash_compare 2022-11-09 09:06:34 -08:00
Nikolaj Bjorner
8da13ae24a add statistics to verbose output of asserted formulas 2022-11-08 18:37:30 -08:00
Nikolaj Bjorner
9a656772b4 fix #6446 2022-11-08 18:37:16 -08:00
Nikolaj Bjorner
4d86d73942 disable also tests for Windows x86, does not work with CI pipeline 2022-11-08 17:15:59 -08:00
Nikolaj Bjorner
ff68df3451 update output of z3 doc 2022-11-08 16:10:50 -08:00
Nikolaj Bjorner
254f7b97ef cleanup state to clear model trail during calls. 2022-11-08 15:56:10 -08:00
Nikolaj Bjorner
823cd23ecc building x64 windows tests during ci is too slow, skipping tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-08 15:37:56 -08:00
Nikolaj Bjorner
3faca52c40 re-enable new solve_eqs with bug fixes 2022-11-08 14:17:17 -08:00
Nikolaj Bjorner
9ef78fcfa7 revert new solve-eqs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-08 13:57:58 -08:00