I found this post that gives a way of checking for overflow in solutions when adding bitVecs z3 bitvector overflow checking from python?
However, it only works when only adding 2 bitVecs, is there any way of extending it so it works for adding an arbitrary number of bitVecs? As far as I can tell, the problem is that "z3._coerce_exprs(x, y)" in
def bvadd_no_overflow(x, y, signed=False):
assert x.ctx_ref()==y.ctx_ref()
a, b = z3._coerce_exprs(x, y)
return BoolRef(Z3_mk_bvadd_no_overflow(a.ctx_ref(), a.as_ast(),
b.as_ast(), signed))
Only can take 2 inputs.