|
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_kind (self) |
|
def | __eq__ (self, other) |
|
def | __hash__ (self) |
|
def | __ne__ (self, other) |
|
def | params (self) |
|
def | decl (self) |
|
def | num_args (self) |
|
def | arg (self, idx) |
|
def | children (self) |
|
def | __init__ (self, ast, ctx=None) |
|
def | __del__ (self) |
|
def | __deepcopy__ (self, memo={}) |
|
def | __str__ (self) |
|
def | __repr__ (self) |
|
def | __nonzero__ (self) |
|
def | __bool__ (self) |
|
def | sexpr (self) |
|
def | ctx_ref (self) |
|
def | eq (self, other) |
|
def | translate (self, target) |
|
def | __copy__ (self) |
|
def | hash (self) |
|
def | use_pp (self) |
|
Bit-vector expressions.
Definition at line 3255 of file z3py.py.
◆ __add__()
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 3280 of file z3py.py.
3280 def __add__(self, other):
3281 """Create the Z3 expression `self + other`.
3283 >>> x = BitVec('x', 32)
3284 >>> y = BitVec('y', 32)
3290 a, b = _coerce_exprs(self, other)
3291 return BitVecRef(
Z3_mk_bvadd(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __and__()
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 3372 of file z3py.py.
3372 def __and__(self, other):
3373 """Create the Z3 expression bitwise-and `self & other`.
3375 >>> x = BitVec('x', 32)
3376 >>> y = BitVec('y', 32)
3382 a, b = _coerce_exprs(self, other)
3383 return BitVecRef(
Z3_mk_bvand(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __div__()
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 3449 of file z3py.py.
3449 def __div__(self, other):
3450 """Create the Z3 expression (signed) division `self / other`.
3452 Use the function UDiv() for unsigned division.
3454 >>> x = BitVec('x', 32)
3455 >>> y = BitVec('y', 32)
3462 >>> UDiv(x, y).sexpr()
3465 a, b = _coerce_exprs(self, other)
3466 return BitVecRef(
Z3_mk_bvsdiv(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
Referenced by BitVecRef.__truediv__(), and FPRef.__truediv__().
◆ __ge__()
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 3579 of file z3py.py.
3579 def __ge__(self, other):
3580 """Create the Z3 expression (signed) `other >= self`.
3582 Use the function UGE() for unsigned greater than or equal to.
3584 >>> x, y = BitVecs('x y', 32)
3587 >>> (x >= y).sexpr()
3589 >>> UGE(x, y).sexpr()
3592 a, b = _coerce_exprs(self, other)
3593 return BoolRef(
Z3_mk_bvsge(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __gt__()
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 3563 of file z3py.py.
3563 def __gt__(self, other):
3564 """Create the Z3 expression (signed) `other > self`.
3566 Use the function UGT() for unsigned greater than.
3568 >>> x, y = BitVecs('x y', 32)
3573 >>> UGT(x, y).sexpr()
3576 a, b = _coerce_exprs(self, other)
3577 return BoolRef(
Z3_mk_bvsgt(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __invert__()
Create the Z3 expression bitwise-not `~self`.
>>> x = BitVec('x', 32)
>>> ~x
~x
>>> simplify(~(~x))
x
Definition at line 3438 of file z3py.py.
3438 def __invert__(self):
3439 """Create the Z3 expression bitwise-not `~self`.
3441 >>> x = BitVec('x', 32)
3447 return BitVecRef(
Z3_mk_bvnot(self.ctx_ref(), self.as_ast()), self.ctx)
◆ __le__()
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 3531 of file z3py.py.
3531 def __le__(self, other):
3532 """Create the Z3 expression (signed) `other <= self`.
3534 Use the function ULE() for unsigned less than or equal to.
3536 >>> x, y = BitVecs('x y', 32)
3539 >>> (x <= y).sexpr()
3541 >>> ULE(x, y).sexpr()
3544 a, b = _coerce_exprs(self, other)
3545 return BoolRef(
Z3_mk_bvsle(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __lshift__()
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 3625 of file z3py.py.
3625 def __lshift__(self, other):
3626 """Create the Z3 expression left shift `self << other`
3628 >>> x, y = BitVecs('x y', 32)
3631 >>> (x << y).sexpr()
3633 >>> simplify(BitVecVal(2, 3) << 1)
3636 a, b = _coerce_exprs(self, other)
3637 return BitVecRef(
Z3_mk_bvshl(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __lt__()
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 3547 of file z3py.py.
3547 def __lt__(self, other):
3548 """Create the Z3 expression (signed) `other < self`.
3550 Use the function ULT() for unsigned less than.
3552 >>> x, y = BitVecs('x y', 32)
3557 >>> ULT(x, y).sexpr()
3560 a, b = _coerce_exprs(self, other)
3561 return BoolRef(
Z3_mk_bvslt(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __mod__()
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 3492 of file z3py.py.
3492 def __mod__(self, other):
3493 """Create the Z3 expression (signed) mod `self % other`.
3495 Use the function URem() for unsigned remainder, and SRem() for signed remainder.
3497 >>> x = BitVec('x', 32)
3498 >>> y = BitVec('y', 32)
3505 >>> URem(x, y).sexpr()
3507 >>> SRem(x, y).sexpr()
3510 a, b = _coerce_exprs(self, other)
3511 return BitVecRef(
Z3_mk_bvsmod(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __mul__()
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 3303 of file z3py.py.
3303 def __mul__(self, other):
3304 """Create the Z3 expression `self * other`.
3306 >>> x = BitVec('x', 32)
3307 >>> y = BitVec('y', 32)
3313 a, b = _coerce_exprs(self, other)
3314 return BitVecRef(
Z3_mk_bvmul(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __neg__()
Return an expression representing `-self`.
>>> x = BitVec('x', 32)
>>> -x
-x
>>> simplify(-(-x))
x
Definition at line 3427 of file z3py.py.
3428 """Return an expression representing `-self`.
3430 >>> x = BitVec('x', 32)
3436 return BitVecRef(
Z3_mk_bvneg(self.ctx_ref(), self.as_ast()), self.ctx)
◆ __or__()
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 3349 of file z3py.py.
3349 def __or__(self, other):
3350 """Create the Z3 expression bitwise-or `self | other`.
3352 >>> x = BitVec('x', 32)
3353 >>> y = BitVec('y', 32)
3359 a, b = _coerce_exprs(self, other)
3360 return BitVecRef(
Z3_mk_bvor(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __pos__()
Return `self`.
>>> x = BitVec('x', 32)
>>> +x
x
Definition at line 3418 of file z3py.py.
3421 >>> x = BitVec('x', 32)
◆ __radd__()
def __radd__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression `other + self`.
>>> x = BitVec('x', 32)
>>> 10 + x
10 + x
Definition at line 3293 of file z3py.py.
3293 def __radd__(self, other):
3294 """Create the Z3 expression `other + self`.
3296 >>> x = BitVec('x', 32)
3300 a, b = _coerce_exprs(self, other)
3301 return BitVecRef(
Z3_mk_bvadd(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rand__()
def __rand__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression bitwise-or `other & self`.
>>> x = BitVec('x', 32)
>>> 10 & x
10 & x
Definition at line 3385 of file z3py.py.
3385 def __rand__(self, other):
3386 """Create the Z3 expression bitwise-or `other & self`.
3388 >>> x = BitVec('x', 32)
3392 a, b = _coerce_exprs(self, other)
3393 return BitVecRef(
Z3_mk_bvand(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rdiv__()
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 3472 of file z3py.py.
3472 def __rdiv__(self, other):
3473 """Create the Z3 expression (signed) division `other / self`.
3475 Use the function UDiv() for unsigned division.
3477 >>> x = BitVec('x', 32)
3480 >>> (10 / x).sexpr()
3481 '(bvsdiv #x0000000a x)'
3482 >>> UDiv(10, x).sexpr()
3483 '(bvudiv #x0000000a x)'
3485 a, b = _coerce_exprs(self, other)
3486 return BitVecRef(
Z3_mk_bvsdiv(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
Referenced by BitVecRef.__rtruediv__(), and FPRef.__rtruediv__().
◆ __rlshift__()
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 3653 of file z3py.py.
3653 def __rlshift__(self, other):
3654 """Create the Z3 expression left shift `other << self`.
3656 Use the function LShR() for the right logical shift
3658 >>> x = BitVec('x', 32)
3661 >>> (10 << x).sexpr()
3662 '(bvshl #x0000000a x)'
3664 a, b = _coerce_exprs(self, other)
3665 return BitVecRef(
Z3_mk_bvshl(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rmod__()
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 3513 of file z3py.py.
3513 def __rmod__(self, other):
3514 """Create the Z3 expression (signed) mod `other % self`.
3516 Use the function URem() for unsigned remainder, and SRem() for signed remainder.
3518 >>> x = BitVec('x', 32)
3521 >>> (10 % x).sexpr()
3522 '(bvsmod #x0000000a x)'
3523 >>> URem(10, x).sexpr()
3524 '(bvurem #x0000000a x)'
3525 >>> SRem(10, x).sexpr()
3526 '(bvsrem #x0000000a x)'
3528 a, b = _coerce_exprs(self, other)
3529 return BitVecRef(
Z3_mk_bvsmod(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rmul__()
def __rmul__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression `other * self`.
>>> x = BitVec('x', 32)
>>> 10 * x
10*x
Definition at line 3316 of file z3py.py.
3316 def __rmul__(self, other):
3317 """Create the Z3 expression `other * self`.
3319 >>> x = BitVec('x', 32)
3323 a, b = _coerce_exprs(self, other)
3324 return BitVecRef(
Z3_mk_bvmul(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __ror__()
def __ror__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression bitwise-or `other | self`.
>>> x = BitVec('x', 32)
>>> 10 | x
10 | x
Definition at line 3362 of file z3py.py.
3362 def __ror__(self, other):
3363 """Create the Z3 expression bitwise-or `other | self`.
3365 >>> x = BitVec('x', 32)
3369 a, b = _coerce_exprs(self, other)
3370 return BitVecRef(
Z3_mk_bvor(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rrshift__()
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 3639 of file z3py.py.
3639 def __rrshift__(self, other):
3640 """Create the Z3 expression (arithmetical) right shift `other` >> `self`.
3642 Use the function LShR() for the right logical shift
3644 >>> x = BitVec('x', 32)
3647 >>> (10 >> x).sexpr()
3648 '(bvashr #x0000000a x)'
3650 a, b = _coerce_exprs(self, other)
3651 return BitVecRef(
Z3_mk_bvashr(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rshift__()
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 3595 of file z3py.py.
3595 def __rshift__(self, other):
3596 """Create the Z3 expression (arithmetical) right shift `self >> other`
3598 Use the function LShR() for the right logical shift
3600 >>> x, y = BitVecs('x y', 32)
3603 >>> (x >> y).sexpr()
3605 >>> LShR(x, y).sexpr()
3609 >>> BitVecVal(4, 3).as_signed_long()
3611 >>> simplify(BitVecVal(4, 3) >> 1).as_signed_long()
3613 >>> simplify(BitVecVal(4, 3) >> 1)
3615 >>> simplify(LShR(BitVecVal(4, 3), 1))
3617 >>> simplify(BitVecVal(2, 3) >> 1)
3619 >>> simplify(LShR(BitVecVal(2, 3), 1))
3622 a, b = _coerce_exprs(self, other)
3623 return BitVecRef(
Z3_mk_bvashr(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __rsub__()
def __rsub__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression `other - self`.
>>> x = BitVec('x', 32)
>>> 10 - x
10 - x
Definition at line 3339 of file z3py.py.
3339 def __rsub__(self, other):
3340 """Create the Z3 expression `other - self`.
3342 >>> x = BitVec('x', 32)
3346 a, b = _coerce_exprs(self, other)
3347 return BitVecRef(
Z3_mk_bvsub(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __rtruediv__()
def __rtruediv__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression (signed) division `other / self`.
Definition at line 3488 of file z3py.py.
3488 def __rtruediv__(self, other):
3489 """Create the Z3 expression (signed) division `other / self`."""
3490 return self.__rdiv__(other)
◆ __rxor__()
def __rxor__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression bitwise-xor `other ^ self`.
>>> x = BitVec('x', 32)
>>> 10 ^ x
10 ^ x
Definition at line 3408 of file z3py.py.
3408 def __rxor__(self, other):
3409 """Create the Z3 expression bitwise-xor `other ^ self`.
3411 >>> x = BitVec('x', 32)
3415 a, b = _coerce_exprs(self, other)
3416 return BitVecRef(
Z3_mk_bvxor(self.ctx_ref(), b.as_ast(), a.as_ast()), self.ctx)
◆ __sub__()
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 3326 of file z3py.py.
3326 def __sub__(self, other):
3327 """Create the Z3 expression `self - other`.
3329 >>> x = BitVec('x', 32)
3330 >>> y = BitVec('y', 32)
3336 a, b = _coerce_exprs(self, other)
3337 return BitVecRef(
Z3_mk_bvsub(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ __truediv__()
def __truediv__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression (signed) division `self / other`.
Definition at line 3468 of file z3py.py.
3468 def __truediv__(self, other):
3469 """Create the Z3 expression (signed) division `self / other`."""
3470 return self.__div__(other)
◆ __xor__()
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 3395 of file z3py.py.
3395 def __xor__(self, other):
3396 """Create the Z3 expression bitwise-xor `self ^ other`.
3398 >>> x = BitVec('x', 32)
3399 >>> y = BitVec('y', 32)
3405 a, b = _coerce_exprs(self, other)
3406 return BitVecRef(
Z3_mk_bvxor(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
◆ size()
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 3269 of file z3py.py.
3270 """Return the number of bits of the bit-vector expression `self`.
3272 >>> x = BitVec('x', 32)
3275 >>> Concat(x, x).size()
3278 return self.sort().size()
Referenced by ParamDescrsRef.__len__(), Goal.__len__(), and BitVecNumRef.as_signed_long().
◆ sort()
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 3258 of file z3py.py.
3259 """Return the sort of the bit-vector expression `self`.
3261 >>> x = BitVec('x', 32)
3264 >>> x.sort() == BitVecSort(32)
3267 return BitVecSortRef(
Z3_get_sort(self.ctx_ref(), self.as_ast()), self.ctx)
Z3_ast Z3_API Z3_mk_bvshl(Z3_context c, Z3_ast t1, Z3_ast t2)
Shift left.
Z3_ast Z3_API Z3_mk_bvslt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than.
Z3_ast Z3_API Z3_mk_bvmul(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement multiplication.
Z3_ast Z3_API Z3_mk_bvnot(Z3_context c, Z3_ast t1)
Bitwise negation.
Z3_ast Z3_API Z3_mk_bvsge(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than or equal to.
Z3_ast Z3_API Z3_mk_bvadd(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement addition.
Z3_ast Z3_API Z3_mk_bvneg(Z3_context c, Z3_ast t1)
Standard two's complement unary minus.
Z3_ast Z3_API Z3_mk_bvashr(Z3_context c, Z3_ast t1, Z3_ast t2)
Arithmetic shift right.
Z3_ast Z3_API Z3_mk_bvsmod(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed remainder (sign follows divisor).
Z3_ast Z3_API Z3_mk_bvsle(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed less than or equal to.
Z3_ast Z3_API Z3_mk_bvsdiv(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed division.
Z3_ast Z3_API Z3_mk_bvsub(Z3_context c, Z3_ast t1, Z3_ast t2)
Standard two's complement subtraction.
Z3_ast Z3_API Z3_mk_bvand(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise and.
Z3_ast Z3_API Z3_mk_bvxor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise exclusive-or.
Z3_sort Z3_API Z3_get_sort(Z3_context c, Z3_ast a)
Return the sort of an AST node.
Z3_ast Z3_API Z3_mk_bvsgt(Z3_context c, Z3_ast t1, Z3_ast t2)
Two's complement signed greater than.
Z3_ast Z3_API Z3_mk_bvor(Z3_context c, Z3_ast t1, Z3_ast t2)
Bitwise or.