我编写了以下Z3 python代码
x, y = Ints('x y')
F = (x == y & 16) # x has the value of (y & 16)
print F但是我得到了下面的错误:
TypeError: unsupported operand type(s) for &: 'instance' and 'int'如何在Z3方程中进行位运算(本例中为&)?
谢谢。
发布于 2012-12-27 13:50:58
x和y应该是位向量:
x, y = BitVecs('x y', 32)
F = (x == y & 16) # x has the value of (y & 16)
print F请参阅http://rise4fun.com/Z3/tutorial/guide下的位向量部分
https://stackoverflow.com/questions/14049877
复制相似问题