3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

Bugfix for bv*div0 model construction.

This commit is contained in:
Christoph M. Wintersteiger 2016-02-05 13:53:35 +00:00
parent 88f007e9da
commit bb5118acbb
4 changed files with 27 additions and 6 deletions

View file

@ -694,7 +694,7 @@ br_status bv_rewriter::mk_bv_sdiv_core(expr * arg1, expr * arg2, bool hi_div0, e
if (r2.is_zero()) {
if (!hi_div0) {
result = m().mk_app(get_fid(), OP_BSDIV0, arg1);
return BR_DONE;
return BR_REWRITE1;
}
else {
// The "hardware interpretation" for (bvsdiv x 0) is (ite (bvslt x #x0000) #x0001 #xffff)
@ -745,7 +745,7 @@ br_status bv_rewriter::mk_bv_udiv_core(expr * arg1, expr * arg2, bool hi_div0, e
if (r2.is_zero()) {
if (!hi_div0) {
result = m().mk_app(get_fid(), OP_BUDIV0, arg1);
return BR_DONE;
return BR_REWRITE1;
}
else {
// The "hardware interpretation" for (bvudiv x 0) is #xffff
@ -808,7 +808,7 @@ br_status bv_rewriter::mk_bv_srem_core(expr * arg1, expr * arg2, bool hi_div0, e
if (r2.is_zero()) {
if (!hi_div0) {
result = m().mk_app(get_fid(), OP_BSREM0, arg1);
return BR_DONE;
return BR_REWRITE1;
}
else {
// The "hardware interpretation" for (bvsrem x 0) is x