I am using z3py. My question is, how do I retrieve the bounds of an Extract
node? I thought Extract
would be a function with arity three, but it isn't:
>>> x = BitVecVal(3, 32)
>>> e = Extract(15, 0, x)
>>> e.decl()
Extract
>>> e.decl().arity()
1
>>> e2 = Extract(7, 0, x)
>>> e2.decl()
Extract
>>> e.decl() == e2.decl()
False
Each Extract
operation is typed (apparently) by the first two arguments (I infer this because the decls aren't equal).
If I'm given a BitVecRef
which is an Extract
operation, how can I tell the bounds of the operation? So for Extract(i, j, x)
I want a function that gives me back i
and j
.