2
理想情況下,可能'或'兩個數字表示爲位矢量,但我不能夠。請告訴我們,如果沒有在代碼中的一些錯誤或別的東西或位矢量z3Py
line1 = BitVec('line1', 1)
line2 = BitVec('line2', 1)
s = Solver()
s.add(Or(line1, line2) == 0)
print s.check()
給出的錯誤是
error: 'type error'
WARNING: invalid function application for or, sort mismatch on argument at position 1, expected Bool but given (_ BitVec 1)
WARNING: (declare-fun or (Bool Bool) Bool) applied to:
line1 of sort (_ BitVec 1)
line2 of sort (_ BitVec 1)
從這個錯誤我明白,或者可用於布爾變量只是做。我的問題是如何或爲BitVectors