Public Member Functions | |
sort (self) | |
size (self) | |
__add__ (self, other) | |
__radd__ (self, other) | |
__mul__ (self, other) | |
__rmul__ (self, other) | |
__sub__ (self, other) | |
__rsub__ (self, other) | |
__or__ (self, other) | |
__ror__ (self, other) | |
__and__ (self, other) | |
__rand__ (self, other) | |
__xor__ (self, other) | |
__rxor__ (self, other) | |
__pos__ (self) | |
__neg__ (self) | |
__invert__ (self) | |
__div__ (self, other) | |
__truediv__ (self, other) | |
__rdiv__ (self, other) | |
__rtruediv__ (self, other) | |
__mod__ (self, other) | |
__rmod__ (self, other) | |
__le__ (self, other) | |
__lt__ (self, other) | |
__gt__ (self, other) | |
__ge__ (self, other) | |
__rshift__ (self, other) | |
__lshift__ (self, other) | |
__rrshift__ (self, other) | |
__rlshift__ (self, other) | |
Public Member Functions inherited from ExprRef | |
as_ast (self) | |
get_id (self) | |
sort_kind (self) | |
__eq__ (self, other) | |
__hash__ (self) | |
__ne__ (self, other) | |
params (self) | |
decl (self) | |
kind (self) | |
num_args (self) | |
arg (self, idx) | |
children (self) | |
from_string (self, s) | |
serialize (self) | |
Public Member Functions inherited from AstRef | |
__init__ (self, ast, ctx=None) | |
__del__ (self) | |
__deepcopy__ (self, memo={}) | |
__str__ (self) | |
__repr__ (self) | |
__eq__ (self, other) | |
__hash__ (self) | |
__nonzero__ (self) | |
__bool__ (self) | |
sexpr (self) | |
ctx_ref (self) | |
eq (self, other) | |
translate (self, target) | |
__copy__ (self) | |
hash (self) | |
py_value (self) | |
Public Member Functions inherited from Z3PPObject | |
use_pp (self) |
Additional Inherited Members | |
Data Fields inherited from AstRef | |
ast = ast | |
ctx = _get_ctx(ctx) | |
Protected Member Functions inherited from Z3PPObject | |
_repr_html_ (self) |
__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 3597 of file z3py.py.
__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 3689 of file z3py.py.
__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 3766 of file z3py.py.
Referenced by __truediv__().
__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 3896 of file z3py.py.
__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 3880 of file z3py.py.
__invert__ | ( | self | ) |
Create the Z3 expression bitwise-not `~self`. >>> x = BitVec('x', 32) >>> ~x ~x >>> simplify(~(~x)) x
Definition at line 3755 of file z3py.py.
__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 3848 of file z3py.py.
__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 3942 of file z3py.py.
__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 3864 of file z3py.py.
__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 3809 of file z3py.py.
__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 3620 of file z3py.py.
__neg__ | ( | self | ) |
Return an expression representing `-self`. >>> x = BitVec('x', 32) >>> -x -x >>> simplify(-(-x)) x
Definition at line 3744 of file z3py.py.
__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 3666 of file z3py.py.
__pos__ | ( | self | ) |
__radd__ | ( | self, | |
other ) |
Create the Z3 expression `other + self`. >>> x = BitVec('x', 32) >>> 10 + x 10 + x
Definition at line 3610 of file z3py.py.
__rand__ | ( | self, | |
other ) |
Create the Z3 expression bitwise-or `other & self`. >>> x = BitVec('x', 32) >>> 10 & x 10 & x
Definition at line 3702 of file z3py.py.
__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 3789 of file z3py.py.
Referenced by __rtruediv__().
__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 3970 of file z3py.py.
__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 3830 of file z3py.py.
__rmul__ | ( | self, | |
other ) |
Create the Z3 expression `other * self`. >>> x = BitVec('x', 32) >>> 10 * x 10*x
Definition at line 3633 of file z3py.py.
__ror__ | ( | self, | |
other ) |
Create the Z3 expression bitwise-or `other | self`. >>> x = BitVec('x', 32) >>> 10 | x 10 | x
Definition at line 3679 of file z3py.py.
__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 3956 of file z3py.py.
__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 3912 of file z3py.py.
__rsub__ | ( | self, | |
other ) |
Create the Z3 expression `other - self`. >>> x = BitVec('x', 32) >>> 10 - x 10 - x
Definition at line 3656 of file z3py.py.
__rtruediv__ | ( | self, | |
other ) |
__rxor__ | ( | self, | |
other ) |
Create the Z3 expression bitwise-xor `other ^ self`. >>> x = BitVec('x', 32) >>> 10 ^ x 10 ^ x
Definition at line 3725 of file z3py.py.
__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 3643 of file z3py.py.
__truediv__ | ( | self, | |
other ) |
__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 3712 of file z3py.py.
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 3586 of file z3py.py.
Referenced by Goal.__len__(), ParamDescrsRef.__len__(), BitVecNumRef.as_signed_long(), and size().
sort | ( | self | ) |
Return the sort of the bit-vector expression `self`. >>> x = BitVec('x', 32) >>> x.sort() BitVec(32) >>> x.sort() == BitVecSort(32) True
Reimplemented from ExprRef.
Definition at line 3575 of file z3py.py.