3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-28 02:09:22 +00:00
Commit graph

1896 commits

Author SHA1 Message Date
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
10fb71cf93 better error description for configuring restart 2022-11-08 12:18:45 -08:00
Nikolaj Bjorner
1dca6402fb move model and proof converters to self-contained module 2022-11-03 05:23:01 -07:00
Nikolaj Bjorner
90490cb22f make visited_helper independent of literals
re-introduce shorthands in sat::solver for visited and have them convert literals to unsigned.
2022-11-03 03:54:39 -07:00
Clemens Eisenhofer
6790f18132
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
2022-11-03 03:34:52 -07:00
Nikolaj Bjorner
9fc4015c46 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.
2022-10-30 03:57:39 -07:00
Nikolaj Bjorner
b651e57ca2 add CMS xor extension to dimacs front-end
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-29 11:32:39 -07:00
Nikolaj Bjorner
5f45469d9b add way to parse xor into solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-29 11:14:51 -07:00
Nikolaj Bjorner
ea96c10165 importing EGaussian
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 20:34:10 -07:00
Nikolaj Bjorner
31a6992609 more
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 20:27:53 -07:00
Nikolaj Bjorner
47fd9d8e18 more
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 20:18:20 -07:00
Nikolaj Bjorner
ca74f696b5 use z3 conventions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 20:11:30 -07:00
Nikolaj Bjorner
6616a75283 porting more
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 20:06:28 -07:00
Nikolaj Bjorner
d08e61219b porting more
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 19:52:37 -07:00
Nikolaj Bjorner
bfb3db8b13 for loop style
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 19:18:24 -07:00
Nikolaj Bjorner
0697c79582 adding matrix finder
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 19:16:36 -07:00
Nikolaj Bjorner
fcdf220559 parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 18:21:04 -07:00
Nikolaj Bjorner
e4f57a13ba add hook to turn on xor solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-28 16:33:30 -07:00
Nikolaj Bjorner
a409a4a677 enforce flat within QF_BV tactic, cap in-processing var-elim loops 2022-10-27 20:10:55 -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
fe1b4bf5ce disable ternary, fixes to propagation, make bv_rewrites for multiplier n-ary 2022-10-26 23:44:38 -07:00
Nikolaj Bjorner
2258b9b9b6 #6423 2022-10-26 12:06:11 -07:00
Nikolaj Bjorner
a4ece21461 toggle enable-ternary to true 2022-10-25 10:44:23 -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
c672c3a250 fix regression introduced in #6143 2022-10-25 09:39:11 -07:00
Nikolaj Bjorner
e1a00f4917 remove unused experimental feature - diff 2022-10-24 16:13:24 -07:00
Nikolaj Bjorner
280887cc5a remove deprecated theory aware drat functionality
it is handled by the on-clause callback that is owned by the smt solver.
2022-10-24 08:32:10 -07:00
Nuno Lopes
cb3c86736c fix build 2022-10-24 10:23:50 +01:00
Nikolaj Bjorner
a24b5a64e1 #6364 proviso for ignore int 2022-10-24 00:48: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
c8e1e180ea prefix Boolean variables in log with b 2022-10-23 11:05:50 -07:00
Nikolaj Bjorner
6393ed78d7 remove useless log 2022-10-23 11:05:33 -07:00
Nikolaj Bjorner
ddbca68270 minor formatting update 2022-10-23 11:05:09 -07:00
Nikolaj Bjorner
53adc2afee update debugging information for new core 2022-10-21 15:24:44 -07:00
Nikolaj Bjorner
842e8057bc log also quantifier generation (besides binding)
We add also logging for quantifier generation.
It is auxiliary information that is of use for diagnostics (axiom profiler).
2022-10-20 17:49:15 -07:00
Nikolaj Bjorner
c1b355f342 #6364
throttle on upwards propagation of default was too restrictive
2022-10-20 17:48:17 -07:00
Nikolaj Bjorner
6d6752b2aa #6364 2022-10-20 16:39:43 -07:00
Nikolaj Bjorner
5976978062 move std functions up for potential alignment issues
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-20 09:11:15 -07:00
Nikolaj Bjorner
fc30461828 unused variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-20 09:09:06 -07:00
Nikolaj Bjorner
6292b06c67 ensure that initialization order for euf_solver is aligned
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-20 08:48:15 -07:00
Nikolaj Bjorner
2842c27e92 #6364 2022-10-20 04:48:13 -07:00
Nikolaj Bjorner
f6595c161f add examples with proof replay
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-19 17:43:56 -07:00
Nikolaj Bjorner
b084852397 update release notes, fix bug in replay of Boolean variables in new core 2022-10-19 12:12:32 -07:00
Nikolaj Bjorner
07dd1065db added API to monitor clause inferences
See RELEASE_NOTES for more information
examples pending.
2022-10-19 08:34:55 -07:00
Nikolaj Bjorner
77cbd89420 remove once pragma from cpp file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-18 14:57:49 -07:00