Public Member Functions | |
| sort (self) | |
| is_int (self) | |
| is_real (self) | |
| __add__ (self, other) | |
| __radd__ (self, other) | |
| __mul__ (self, other) | |
| __rmul__ (self, other) | |
| __sub__ (self, other) | |
| __rsub__ (self, other) | |
| __pow__ (self, other) | |
| __rpow__ (self, other) | |
| __div__ (self, other) | |
| __truediv__ (self, other) | |
| __rdiv__ (self, other) | |
| __rtruediv__ (self, other) | |
| __mod__ (self, other) | |
| __rmod__ (self, other) | |
| __neg__ (self) | |
| __pos__ (self) | |
| __le__ (self, other) | |
| __lt__ (self, other) | |
| __gt__ (self, other) | |
| __ge__ (self, other) | |
| __abs__ (self) | |
| 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) | |
| update (self, *args) | |
| 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) | |
| __abs__ | ( | self | ) |
Return an expression representing `abs(self)`.
>>> x = Int('x')
>>> abs(x)
If(x > 0, x, -x)
>>> eq(abs(x), Abs(x))
True
Definition at line 2835 of file z3py.py.
| __add__ | ( | self, | |
| other ) |
Create the Z3 expression `self + other`.
>>> x = Int('x')
>>> y = Int('y')
>>> x + y
x + y
>>> (x + y).sort()
Int
Definition at line 2589 of file z3py.py.
| __div__ | ( | self, | |
| other ) |
Create the Z3 expression `other/self`.
>>> x = Int('x')
>>> y = Int('y')
>>> x/y
x/y
>>> (x/y).sort()
Int
>>> (x/y).sexpr()
'(div x y)'
>>> x = Real('x')
>>> y = Real('y')
>>> x/y
x/y
>>> (x/y).sort()
Real
>>> (x/y).sexpr()
'(/ x y)'
Definition at line 2688 of file z3py.py.
Referenced by __truediv__(), and BitVecRef.__truediv__().
| __ge__ | ( | self, | |
| other ) |
Create the Z3 expression `other >= self`.
>>> x, y = Ints('x y')
>>> x >= y
x >= y
>>> y = Real('y')
>>> x >= y
ToReal(x) >= y
Definition at line 2822 of file z3py.py.
| __gt__ | ( | self, | |
| other ) |
Create the Z3 expression `other > self`.
>>> x, y = Ints('x y')
>>> x > y
x > y
>>> y = Real('y')
>>> x > y
ToReal(x) > y
Definition at line 2809 of file z3py.py.
| __le__ | ( | self, | |
| other ) |
Create the Z3 expression `other <= self`.
>>> x, y = Ints('x y')
>>> x <= y
x <= y
>>> y = Real('y')
>>> x <= y
ToReal(x) <= y
Definition at line 2783 of file z3py.py.
| __lt__ | ( | self, | |
| other ) |
Create the Z3 expression `other < self`.
>>> x, y = Ints('x y')
>>> x < y
x < y
>>> y = Real('y')
>>> x < y
ToReal(x) < y
Definition at line 2796 of file z3py.py.
| __mod__ | ( | self, | |
| other ) |
Create the Z3 expression `other%self`.
>>> x = Int('x')
>>> y = Int('y')
>>> x % y
x%y
>>> simplify(IntVal(10) % IntVal(3))
1
Definition at line 2736 of file z3py.py.
| __mul__ | ( | self, | |
| other ) |
Create the Z3 expression `self * other`.
>>> x = Real('x')
>>> y = Real('y')
>>> x * y
x*y
>>> (x * y).sort()
Real
Definition at line 2612 of file z3py.py.
| __neg__ | ( | self | ) |
Return an expression representing `-self`.
>>> x = Int('x')
>>> -x
-x
>>> simplify(-(-x))
x
Definition at line 2763 of file z3py.py.
| __pos__ | ( | self | ) |
| __pow__ | ( | self, | |
| other ) |
Create the Z3 expression `self**other` (** is the power operator).
>>> x = Real('x')
>>> x**3
x**3
>>> (x**3).sort()
Real
>>> simplify(IntVal(2)**8)
256
Definition at line 2660 of file z3py.py.
| __radd__ | ( | self, | |
| other ) |
Create the Z3 expression `other + self`.
>>> x = Int('x')
>>> 10 + x
10 + x
Definition at line 2602 of file z3py.py.
| __rdiv__ | ( | self, | |
| other ) |
Create the Z3 expression `other/self`.
>>> x = Int('x')
>>> 10/x
10/x
>>> (10/x).sexpr()
'(div 10 x)'
>>> x = Real('x')
>>> 10/x
10/x
>>> (10/x).sexpr()
'(/ 10.0 x)'
Definition at line 2715 of file z3py.py.
Referenced by __rtruediv__(), and BitVecRef.__rtruediv__().
| __rmod__ | ( | self, | |
| other ) |
Create the Z3 expression `other%self`.
>>> x = Int('x')
>>> 10 % x
10%x
Definition at line 2751 of file z3py.py.
| __rmul__ | ( | self, | |
| other ) |
Create the Z3 expression `other * self`.
>>> x = Real('x')
>>> 10 * x
10*x
Definition at line 2627 of file z3py.py.
| __rpow__ | ( | self, | |
| other ) |
Create the Z3 expression `other**self` (** is the power operator).
>>> x = Real('x')
>>> 2**x
2**x
>>> (2**x).sort()
Real
>>> simplify(2**IntVal(8))
256
Definition at line 2674 of file z3py.py.
| __rsub__ | ( | self, | |
| other ) |
Create the Z3 expression `other - self`.
>>> x = Int('x')
>>> 10 - x
10 - x
Definition at line 2650 of file z3py.py.
| __rtruediv__ | ( | self, | |
| other ) |
| __sub__ | ( | self, | |
| other ) |
Create the Z3 expression `self - other`.
>>> x = Int('x')
>>> y = Int('y')
>>> x - y
x - y
>>> (x - y).sort()
Int
Definition at line 2637 of file z3py.py.
| __truediv__ | ( | self, | |
| other ) |
| is_int | ( | self | ) |
Return `True` if `self` is an integer expression.
>>> x = Int('x')
>>> x.is_int()
True
>>> (x + 1).is_int()
True
>>> y = Real('y')
>>> (x + y).is_int()
False
Reimplemented in RatNumRef.
Definition at line 2564 of file z3py.py.
Referenced by IntNumRef.as_long(), and is_int().
| is_real | ( | self | ) |
Return `True` if `self` is an real expression.
>>> x = Real('x')
>>> x.is_real()
True
>>> (x + 1).is_real()
True
Reimplemented in RatNumRef.
Definition at line 2578 of file z3py.py.
Referenced by is_real().
| sort | ( | self | ) |
Return the sort (type) of the arithmetical expression `self`.
>>> Int('x').sort()
Int
>>> (Real('x') + 1).sort()
Real
Reimplemented from ExprRef.
Reimplemented in ComplexRef.
Definition at line 2554 of file z3py.py.