Arithmetic. More...
Public Member Functions | |
def | is_real (self) |
def | is_int (self) |
def | subsort (self, other) |
def | cast (self, val) |
![]() | |
def | as_ast (self) |
def | get_id (self) |
def | kind (self) |
def | subsort (self, other) |
def | cast (self, val) |
def | name (self) |
def | __eq__ (self, other) |
def | __ne__ (self, other) |
def | __hash__ (self) |
![]() | |
def | __init__ (self, ast, ctx=None) |
def | __del__ (self) |
def | __str__ (self) |
def | __repr__ (self) |
def | __eq__ (self, other) |
def | __hash__ (self) |
def | __nonzero__ (self) |
def | __bool__ (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) |
Data Fields | |
ctx | |
![]() | |
ast | |
ctx | |
def cast | ( | self, | |
val | |||
) |
Try to cast `val` as an Integer or Real. >>> IntSort().cast(10) 10 >>> is_int(IntSort().cast(10)) True >>> is_int(10) False >>> RealSort().cast(10) 10 >>> is_real(RealSort().cast(10)) True
def is_int | ( | self | ) |
Return `True` if `self` is of the sort Integer. >>> x = Int('x') >>> x.is_int() True >>> (x + 1).is_int() True >>> x = Real('x') >>> x.is_int() False
Definition at line 1939 of file z3py.py.
Referenced by ArithSortRef.cast().
def is_real | ( | self | ) |
Return `True` if `self` is of the sort Real. >>> x = Real('x') >>> x.is_real() True >>> (x + 1).is_real() True >>> x = Int('x') >>> x.is_real() False
Definition at line 1925 of file z3py.py.
Referenced by ArithSortRef.cast().
def subsort | ( | self, | |
other | |||
) |
ctx |
Definition at line 1973 of file z3py.py.
Referenced by Probe.__call__(), Fixedpoint.__del__(), Optimize.__del__(), ApplyResult.__del__(), Tactic.__del__(), Probe.__del__(), Probe.__eq__(), Probe.__ge__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), ApplyResult.__len__(), Probe.__lt__(), Probe.__ne__(), Fixedpoint.add_cover(), Fixedpoint.add_rule(), Optimize.add_soft(), Tactic.apply(), ApplyResult.as_expr(), Fixedpoint.assert_exprs(), Optimize.assert_exprs(), Optimize.assertions(), Optimize.check(), ApplyResult.convert_model(), Optimize.from_file(), Optimize.from_string(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_num_levels(), Fixedpoint.get_rules(), Fixedpoint.help(), Optimize.help(), Tactic.help(), Optimize.maximize(), Optimize.minimize(), Optimize.model(), Optimize.objectives(), Fixedpoint.param_descrs(), Optimize.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Fixedpoint.pop(), Optimize.pop(), Fixedpoint.push(), Optimize.push(), Fixedpoint.query(), Fixedpoint.reason_unknown(), Optimize.reason_unknown(), Fixedpoint.register_relation(), Fixedpoint.set(), Optimize.set(), Fixedpoint.set_predicate_representation(), Fixedpoint.sexpr(), Optimize.sexpr(), ApplyResult.sexpr(), Tactic.solver(), Fixedpoint.statistics(), Optimize.statistics(), Solver.to_smt2(), Fixedpoint.to_string(), and Fixedpoint.update_rule().