|
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 3269 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 3294 of file z3py.py.
3294 def __add__(self, other):
3295 """Create the Z3 expression `self + other`.
3297 >>> x = BitVec('x', 32)
3298 >>> y = BitVec('y', 32)
3304 a, b = _coerce_exprs(self, other)
3305 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 3386 of file z3py.py.
3386 def __and__(self, other):
3387 """Create the Z3 expression bitwise-and `self & other`.
3389 >>> x = BitVec('x', 32)
3390 >>> y = BitVec('y', 32)
3396 a, b = _coerce_exprs(self, other)
3397 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 3463 of file z3py.py.
3463 def __div__(self, other):
3464 """Create the Z3 expression (signed) division `self / other`.
3466 Use the function UDiv() for unsigned division.
3468 >>> x = BitVec('x', 32)
3469 >>> y = BitVec('y', 32)
3476 >>> UDiv(x, y).sexpr()
3479 a, b = _coerce_exprs(self, other)
3480 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 3593 of file z3py.py.
3593 def __ge__(self, other):
3594 """Create the Z3 expression (signed) `other >= self`.
3596 Use the function UGE() for unsigned greater than or equal to.
3598 >>> x, y = BitVecs('x y', 32)
3601 >>> (x >= y).sexpr()
3603 >>> UGE(x, y).sexpr()
3606 a, b = _coerce_exprs(self, other)
3607 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 3577 of file z3py.py.
3577 def __gt__(self, other):
3578 """Create the Z3 expression (signed) `other > self`.
3580 Use the function UGT() for unsigned greater than.
3582 >>> x, y = BitVecs('x y', 32)
3587 >>> UGT(x, y).sexpr()
3590 a, b = _coerce_exprs(self, other)
3591 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 3452 of file z3py.py.
3452 def __invert__(self):
3453 """Create the Z3 expression bitwise-not `~self`.
3455 >>> x = BitVec('x', 32)
3461 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 3545 of file z3py.py.
3545 def __le__(self, other):
3546 """Create the Z3 expression (signed) `other <= self`.
3548 Use the function ULE() for unsigned less than or equal to.
3550 >>> x, y = BitVecs('x y', 32)
3553 >>> (x <= y).sexpr()
3555 >>> ULE(x, y).sexpr()
3558 a, b = _coerce_exprs(self, other)
3559 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 3639 of file z3py.py.
3639 def __lshift__(self, other):
3640 """Create the Z3 expression left shift `self << other`
3642 >>> x, y = BitVecs('x y', 32)
3645 >>> (x << y).sexpr()
3647 >>> simplify(BitVecVal(2, 3) << 1)
3650 a, b = _coerce_exprs(self, other)
3651 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 3561 of file z3py.py.
3561 def __lt__(self, other):
3562 """Create the Z3 expression (signed) `other < self`.
3564 Use the function ULT() for unsigned less than.
3566 >>> x, y = BitVecs('x y', 32)
3571 >>> ULT(x, y).sexpr()
3574 a, b = _coerce_exprs(self, other)
3575 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 3506 of file z3py.py.
3506 def __mod__(self, other):
3507 """Create the Z3 expression (signed) mod `self % other`.
3509 Use the function URem() for unsigned remainder, and SRem() for signed remainder.
3511 >>> x = BitVec('x', 32)
3512 >>> y = BitVec('y', 32)
3519 >>> URem(x, y).sexpr()
3521 >>> SRem(x, y).sexpr()
3524 a, b = _coerce_exprs(self, other)
3525 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 3317 of file z3py.py.
3317 def __mul__(self, other):
3318 """Create the Z3 expression `self * other`.
3320 >>> x = BitVec('x', 32)
3321 >>> y = BitVec('y', 32)
3327 a, b = _coerce_exprs(self, other)
3328 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 3441 of file z3py.py.
3442 """Return an expression representing `-self`.
3444 >>> x = BitVec('x', 32)
3450 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 3363 of file z3py.py.
3363 def __or__(self, other):
3364 """Create the Z3 expression bitwise-or `self | other`.
3366 >>> x = BitVec('x', 32)
3367 >>> y = BitVec('y', 32)
3373 a, b = _coerce_exprs(self, other)
3374 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 3432 of file z3py.py.
3435 >>> 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 3307 of file z3py.py.
3307 def __radd__(self, other):
3308 """Create the Z3 expression `other + self`.
3310 >>> x = BitVec('x', 32)
3314 a, b = _coerce_exprs(self, other)
3315 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 3399 of file z3py.py.
3399 def __rand__(self, other):
3400 """Create the Z3 expression bitwise-or `other & self`.
3402 >>> x = BitVec('x', 32)
3406 a, b = _coerce_exprs(self, other)
3407 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 3486 of file z3py.py.
3486 def __rdiv__(self, other):
3487 """Create the Z3 expression (signed) division `other / self`.
3489 Use the function UDiv() for unsigned division.
3491 >>> x = BitVec('x', 32)
3494 >>> (10 / x).sexpr()
3495 '(bvsdiv #x0000000a x)'
3496 >>> UDiv(10, x).sexpr()
3497 '(bvudiv #x0000000a x)'
3499 a, b = _coerce_exprs(self, other)
3500 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 3667 of file z3py.py.
3667 def __rlshift__(self, other):
3668 """Create the Z3 expression left shift `other << self`.
3670 Use the function LShR() for the right logical shift
3672 >>> x = BitVec('x', 32)
3675 >>> (10 << x).sexpr()
3676 '(bvshl #x0000000a x)'
3678 a, b = _coerce_exprs(self, other)
3679 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 3527 of file z3py.py.
3527 def __rmod__(self, other):
3528 """Create the Z3 expression (signed) mod `other % self`.
3530 Use the function URem() for unsigned remainder, and SRem() for signed remainder.
3532 >>> x = BitVec('x', 32)
3535 >>> (10 % x).sexpr()
3536 '(bvsmod #x0000000a x)'
3537 >>> URem(10, x).sexpr()
3538 '(bvurem #x0000000a x)'
3539 >>> SRem(10, x).sexpr()
3540 '(bvsrem #x0000000a x)'
3542 a, b = _coerce_exprs(self, other)
3543 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 3330 of file z3py.py.
3330 def __rmul__(self, other):
3331 """Create the Z3 expression `other * self`.
3333 >>> x = BitVec('x', 32)
3337 a, b = _coerce_exprs(self, other)
3338 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 3376 of file z3py.py.
3376 def __ror__(self, other):
3377 """Create the Z3 expression bitwise-or `other | self`.
3379 >>> x = BitVec('x', 32)
3383 a, b = _coerce_exprs(self, other)
3384 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 3653 of file z3py.py.
3653 def __rrshift__(self, other):
3654 """Create the Z3 expression (arithmetical) right shift `other` >> `self`.
3656 Use the function LShR() for the right logical shift
3658 >>> x = BitVec('x', 32)
3661 >>> (10 >> x).sexpr()
3662 '(bvashr #x0000000a x)'
3664 a, b = _coerce_exprs(self, other)
3665 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 3609 of file z3py.py.
3609 def __rshift__(self, other):
3610 """Create the Z3 expression (arithmetical) right shift `self >> other`
3612 Use the function LShR() for the right logical shift
3614 >>> x, y = BitVecs('x y', 32)
3617 >>> (x >> y).sexpr()
3619 >>> LShR(x, y).sexpr()
3623 >>> BitVecVal(4, 3).as_signed_long()
3625 >>> simplify(BitVecVal(4, 3) >> 1).as_signed_long()
3627 >>> simplify(BitVecVal(4, 3) >> 1)
3629 >>> simplify(LShR(BitVecVal(4, 3), 1))
3631 >>> simplify(BitVecVal(2, 3) >> 1)
3633 >>> simplify(LShR(BitVecVal(2, 3), 1))
3636 a, b = _coerce_exprs(self, other)
3637 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 3353 of file z3py.py.
3353 def __rsub__(self, other):
3354 """Create the Z3 expression `other - self`.
3356 >>> x = BitVec('x', 32)
3360 a, b = _coerce_exprs(self, other)
3361 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 3502 of file z3py.py.
3502 def __rtruediv__(self, other):
3503 """Create the Z3 expression (signed) division `other / self`."""
3504 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 3422 of file z3py.py.
3422 def __rxor__(self, other):
3423 """Create the Z3 expression bitwise-xor `other ^ self`.
3425 >>> x = BitVec('x', 32)
3429 a, b = _coerce_exprs(self, other)
3430 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 3340 of file z3py.py.
3340 def __sub__(self, other):
3341 """Create the Z3 expression `self - other`.
3343 >>> x = BitVec('x', 32)
3344 >>> y = BitVec('y', 32)
3350 a, b = _coerce_exprs(self, other)
3351 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 3482 of file z3py.py.
3482 def __truediv__(self, other):
3483 """Create the Z3 expression (signed) division `self / other`."""
3484 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 3409 of file z3py.py.
3409 def __xor__(self, other):
3410 """Create the Z3 expression bitwise-xor `self ^ other`.
3412 >>> x = BitVec('x', 32)
3413 >>> y = BitVec('y', 32)
3419 a, b = _coerce_exprs(self, other)
3420 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 3283 of file z3py.py.
3284 """Return the number of bits of the bit-vector expression `self`.
3286 >>> x = BitVec('x', 32)
3289 >>> Concat(x, x).size()
3292 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 3272 of file z3py.py.
3273 """Return the sort of the bit-vector expression `self`.
3275 >>> x = BitVec('x', 32)
3278 >>> x.sort() == BitVecSort(32)
3281 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.