How do I add an offset to a value obtained from an IndexOf
expression? That is, how do I do this?
> import z3
> s = 'hello'
> t = 'e'
> z3.simplify(z3.IndexOf(s, t, 0) + z3.IntVal(1))
z3.z3types.Z3Exception: Non-sequence passed as a sequence
I want to get the location after than of e
.
On the other hand, switching the order works as expected
> z3.simplify(z3.IntVal(1) + z3.IndexOf(s, t, 0))
2