3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-10 21:20:52 +00:00
crash due to not checking for dead rows.
non-termination due to solving div and mod separately.
To ensure termination one needs to at least process them simultaneously, otherwise the metric of number-of-terms x under number of mod/div does not decrease. Substituting in K*y + z under either a mod or div increases the number of terms under a mod/div when eliminating only one of the kinds.
Currently handling divides constraints separately because pre-existing solution uses the model to determine z as a constant between 0 and K-1. The treatment of mod/div is supposed to be more general and use a variable while at the same time reducing the mod/div terms where the eliminated variable is used (the variable z is not added under the mod/div terms, but instead the model is used to determine cut-offs to calculate mod/div directly.
This commit is contained in:
Nikolaj Bjorner 2022-08-29 14:32:13 -07:00
parent dd90689339
commit cd0af999a8
2 changed files with 125 additions and 169 deletions

View file

@ -166,9 +166,7 @@ namespace opt {
def solve_divides(unsigned x, unsigned_vector const& divide_rows, bool compute_def);
def solve_mod(unsigned x, unsigned_vector const& divide_rows, bool compute_def);
def solve_div(unsigned x, unsigned_vector const& divide_rows, bool compute_def);
def solve_mod_div(unsigned x, unsigned_vector const& mod_rows, unsigned_vector const& divide_rows, bool compute_def);
bool is_int(unsigned x) const { return m_var2is_int[x]; }