Public Member Functions | |
def | sort (self) |
def | size (self) |
def | __add__ (self, other) |
def | __radd__ (self, other) |
def | __mul__ (self, other) |
def | __rmul__ (self, other) |
def | __sub__ (self, other) |
def | __rsub__ (self, other) |
def | __or__ (self, other) |
def | __ror__ (self, other) |
def | __and__ (self, other) |
def | __rand__ (self, other) |
def | __xor__ (self, other) |
def | __rxor__ (self, other) |
def | __pos__ (self) |
def | __neg__ (self) |
def | __invert__ (self) |
def | __div__ (self, other) |
def | __truediv__ (self, other) |
def | __rdiv__ (self, other) |
def | __rtruediv__ (self, other) |
def | __mod__ (self, other) |
def | __rmod__ (self, other) |
def | __le__ (self, other) |
def | __lt__ (self, other) |
def | __gt__ (self, other) |
def | __ge__ (self, other) |
def | __rshift__ (self, other) |
def | __lshift__ (self, other) |
def | __rrshift__ (self, other) |
def | __rlshift__ (self, other) |
![]() | |
def | as_ast (self) |
def | get_id (self) |
def | sort (self) |
def | sort_kind (self) |
def | __eq__ (self, other) |
def | __ne__ (self, other) |
def | decl (self) |
def | num_args (self) |
def | arg (self, idx) |
def | children (self) |
![]() | |
def | __init__ (self, ast, ctx=None) |
def | __del__ (self) |
def | __str__ (self) |
def | __repr__ (self) |
def | sexpr (self) |
def | as_ast (self) |
def | get_id (self) |
def | ctx_ref (self) |
def | eq (self, other) |
def | translate (self, target) |
def | hash (self) |
![]() | |
def | use_pp (self) |
Additional Inherited Members | |
![]() | |
ast | |
ctx | |
def __add__ | ( | self, | |
other | |||
) |
Create the Z3 expression `self + other`. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x + y x + y >>> (x + y).sort() BitVec(32)
Definition at line 2989 of file z3py.py.
def __and__ | ( | self, | |
other | |||
) |
Create the Z3 expression bitwise-and `self & other`. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x & y x & y >>> (x & y).sort() BitVec(32)
Definition at line 3081 of file z3py.py.
def __div__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) division `self / other`. Use the function UDiv() for unsigned division. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x / y x/y >>> (x / y).sort() BitVec(32) >>> (x / y).sexpr() '(bvsdiv x y)' >>> UDiv(x, y).sexpr() '(bvudiv x y)'
Definition at line 3158 of file z3py.py.
def __ge__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) `other >= self`. Use the function UGE() for unsigned greater than or equal to. >>> x, y = BitVecs('x y', 32) >>> x >= y x >= y >>> (x >= y).sexpr() '(bvsge x y)' >>> UGE(x, y).sexpr() '(bvuge x y)'
Definition at line 3288 of file z3py.py.
def __gt__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) `other > self`. Use the function UGT() for unsigned greater than. >>> x, y = BitVecs('x y', 32) >>> x > y x > y >>> (x > y).sexpr() '(bvsgt x y)' >>> UGT(x, y).sexpr() '(bvugt x y)'
Definition at line 3272 of file z3py.py.
def __invert__ | ( | self | ) |
Create the Z3 expression bitwise-not `~self`. >>> x = BitVec('x', 32) >>> ~x ~x >>> simplify(~(~x)) x
Definition at line 3147 of file z3py.py.
def __le__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) `other <= self`. Use the function ULE() for unsigned less than or equal to. >>> x, y = BitVecs('x y', 32) >>> x <= y x <= y >>> (x <= y).sexpr() '(bvsle x y)' >>> ULE(x, y).sexpr() '(bvule x y)'
Definition at line 3240 of file z3py.py.
def __lshift__ | ( | self, | |
other | |||
) |
Create the Z3 expression left shift `self << other` >>> x, y = BitVecs('x y', 32) >>> x << y x << y >>> (x << y).sexpr() '(bvshl x y)' >>> simplify(BitVecVal(2, 3) << 1) 4
Definition at line 3334 of file z3py.py.
def __lt__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) `other < self`. Use the function ULT() for unsigned less than. >>> x, y = BitVecs('x y', 32) >>> x < y x < y >>> (x < y).sexpr() '(bvslt x y)' >>> ULT(x, y).sexpr() '(bvult x y)'
Definition at line 3256 of file z3py.py.
def __mod__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) mod `self % other`. Use the function URem() for unsigned remainder, and SRem() for signed remainder. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x % y x%y >>> (x % y).sort() BitVec(32) >>> (x % y).sexpr() '(bvsmod x y)' >>> URem(x, y).sexpr() '(bvurem x y)' >>> SRem(x, y).sexpr() '(bvsrem x y)'
Definition at line 3201 of file z3py.py.
def __mul__ | ( | self, | |
other | |||
) |
Create the Z3 expression `self * other`. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x * y x*y >>> (x * y).sort() BitVec(32)
Definition at line 3012 of file z3py.py.
def __neg__ | ( | self | ) |
Return an expression representing `-self`. >>> x = BitVec('x', 32) >>> -x -x >>> simplify(-(-x)) x
Definition at line 3136 of file z3py.py.
def __or__ | ( | self, | |
other | |||
) |
Create the Z3 expression bitwise-or `self | other`. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x | y x | y >>> (x | y).sort() BitVec(32)
Definition at line 3058 of file z3py.py.
def __pos__ | ( | self | ) |
def __radd__ | ( | self, | |
other | |||
) |
Create the Z3 expression `other + self`. >>> x = BitVec('x', 32) >>> 10 + x 10 + x
Definition at line 3002 of file z3py.py.
def __rand__ | ( | self, | |
other | |||
) |
Create the Z3 expression bitwise-or `other & self`. >>> x = BitVec('x', 32) >>> 10 & x 10 & x
Definition at line 3094 of file z3py.py.
def __rdiv__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) division `other / self`. Use the function UDiv() for unsigned division. >>> x = BitVec('x', 32) >>> 10 / x 10/x >>> (10 / x).sexpr() '(bvsdiv #x0000000a x)' >>> UDiv(10, x).sexpr() '(bvudiv #x0000000a x)'
Definition at line 3181 of file z3py.py.
def __rlshift__ | ( | self, | |
other | |||
) |
Create the Z3 expression left shift `other << self`. Use the function LShR() for the right logical shift >>> x = BitVec('x', 32) >>> 10 << x 10 << x >>> (10 << x).sexpr() '(bvshl #x0000000a x)'
Definition at line 3362 of file z3py.py.
def __rmod__ | ( | self, | |
other | |||
) |
Create the Z3 expression (signed) mod `other % self`. Use the function URem() for unsigned remainder, and SRem() for signed remainder. >>> x = BitVec('x', 32) >>> 10 % x 10%x >>> (10 % x).sexpr() '(bvsmod #x0000000a x)' >>> URem(10, x).sexpr() '(bvurem #x0000000a x)' >>> SRem(10, x).sexpr() '(bvsrem #x0000000a x)'
Definition at line 3222 of file z3py.py.
def __rmul__ | ( | self, | |
other | |||
) |
Create the Z3 expression `other * self`. >>> x = BitVec('x', 32) >>> 10 * x 10*x
Definition at line 3025 of file z3py.py.
def __ror__ | ( | self, | |
other | |||
) |
Create the Z3 expression bitwise-or `other | self`. >>> x = BitVec('x', 32) >>> 10 | x 10 | x
Definition at line 3071 of file z3py.py.
def __rrshift__ | ( | self, | |
other | |||
) |
Create the Z3 expression (arithmetical) right shift `other` >> `self`. Use the function LShR() for the right logical shift >>> x = BitVec('x', 32) >>> 10 >> x 10 >> x >>> (10 >> x).sexpr() '(bvashr #x0000000a x)'
Definition at line 3348 of file z3py.py.
def __rshift__ | ( | self, | |
other | |||
) |
Create the Z3 expression (arithmetical) right shift `self >> other` Use the function LShR() for the right logical shift >>> x, y = BitVecs('x y', 32) >>> x >> y x >> y >>> (x >> y).sexpr() '(bvashr x y)' >>> LShR(x, y).sexpr() '(bvlshr x y)' >>> BitVecVal(4, 3) 4 >>> BitVecVal(4, 3).as_signed_long() -4 >>> simplify(BitVecVal(4, 3) >> 1).as_signed_long() -2 >>> simplify(BitVecVal(4, 3) >> 1) 6 >>> simplify(LShR(BitVecVal(4, 3), 1)) 2 >>> simplify(BitVecVal(2, 3) >> 1) 1 >>> simplify(LShR(BitVecVal(2, 3), 1)) 1
Definition at line 3304 of file z3py.py.
def __rsub__ | ( | self, | |
other | |||
) |
Create the Z3 expression `other - self`. >>> x = BitVec('x', 32) >>> 10 - x 10 - x
Definition at line 3048 of file z3py.py.
def __rtruediv__ | ( | self, | |
other | |||
) |
def __rxor__ | ( | self, | |
other | |||
) |
Create the Z3 expression bitwise-xor `other ^ self`. >>> x = BitVec('x', 32) >>> 10 ^ x 10 ^ x
Definition at line 3117 of file z3py.py.
def __sub__ | ( | self, | |
other | |||
) |
Create the Z3 expression `self - other`. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x - y x - y >>> (x - y).sort() BitVec(32)
Definition at line 3035 of file z3py.py.
def __truediv__ | ( | self, | |
other | |||
) |
def __xor__ | ( | self, | |
other | |||
) |
Create the Z3 expression bitwise-xor `self ^ other`. >>> x = BitVec('x', 32) >>> y = BitVec('y', 32) >>> x ^ y x ^ y >>> (x ^ y).sort() BitVec(32)
Definition at line 3104 of file z3py.py.
def size | ( | self | ) |
Return the number of bits of the bit-vector expression `self`. >>> x = BitVec('x', 32) >>> (x + 1).size() 32 >>> Concat(x, x).size() 64
Definition at line 2978 of file z3py.py.
Referenced by BitVecNumRef.as_signed_long().
def sort | ( | self | ) |
Return the sort of the bit-vector expression `self`. >>> x = BitVec('x', 32) >>> x.sort() BitVec(32) >>> x.sort() == BitVecSort(32) True
Definition at line 2967 of file z3py.py.
Referenced by BitVecRef.__add__(), BitVecRef.__and__(), BitVecRef.__div__(), BitVecRef.__mod__(), BitVecRef.__mul__(), BitVecRef.__or__(), BitVecRef.__sub__(), and BitVecRef.__xor__().