Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions
IntNumRef Class Reference
+ Inheritance diagram for IntNumRef:

Public Member Functions

def as_long
 
def as_string
 
- Public Member Functions inherited from ArithRef
def sort
 
def is_int
 
def is_real
 
def __add__
 
def __radd__
 
def __mul__
 
def __rmul__
 
def __sub__
 
def __rsub__
 
def __pow__
 
def __rpow__
 
def __div__
 
def __truediv__
 
def __rdiv__
 
def __rtruediv__
 
def __mod__
 
def __rmod__
 
def __neg__
 
def __pos__
 
def __le__
 
def __lt__
 
def __gt__
 
def __ge__
 
- Public Member Functions inherited from ExprRef
def as_ast
 
def get_id
 
def sort
 
def sort_kind
 
def __eq__
 
def __hash__
 
def __ne__
 
def params
 
def decl
 
def num_args
 
def arg
 
def children
 
- Public Member Functions inherited from AstRef
def __init__
 
def __del__
 
def __deepcopy__
 
def __str__
 
def __repr__
 
def __eq__
 
def __hash__
 
def __nonzero__
 
def __bool__
 
def sexpr
 
def as_ast
 
def get_id
 
def ctx_ref
 
def eq
 
def translate
 
def __copy__
 
def hash
 
- Public Member Functions inherited from Z3PPObject
def use_pp
 

Additional Inherited Members

- Data Fields inherited from AstRef
 ast
 
 ctx
 

Detailed Description

Integer values.

Definition at line 2733 of file z3py.py.

Member Function Documentation

def as_long (   self)
Return a Z3 integer numeral as a Python long (bignum) numeral.

>>> v = IntVal(1)
>>> v + 1
1 + 1
>>> v.as_long() + 1
2

Definition at line 2736 of file z3py.py.

Referenced by BitVecNumRef.as_signed_long().

2737  def as_long(self):
2738  """Return a Z3 integer numeral as a Python long (bignum) numeral.
2739 
2740  >>> v = IntVal(1)
2741  >>> v + 1
2742  1 + 1
2743  >>> v.as_long() + 1
2744  2
2745  """
2746  if z3_debug():
2747  _z3_assert(self.is_int(), "Integer value expected")
2748  return int(self.as_string())
def is_int
Definition: z3py.py:2189
def z3_debug
Definition: z3py.py:58
def as_long
Definition: z3py.py:2736
def as_string
Definition: z3py.py:2749
def as_string (   self)
Return a Z3 integer numeral as a Python string.
>>> v = IntVal(100)
>>> v.as_string()
'100'

Definition at line 2749 of file z3py.py.

Referenced by IntNumRef.as_long(), BitVecNumRef.as_long(), and FiniteDomainNumRef.as_long().

2750  def as_string(self):
2751  """Return a Z3 integer numeral as a Python string.
2752  >>> v = IntVal(100)
2753  >>> v.as_string()
2754  '100'
2755  """
2756  return Z3_get_numeral_string(self.ctx_ref(), self.as_ast())
Z3_string Z3_API Z3_get_numeral_string(Z3_context c, Z3_ast a)
Return numeral value, as a string of a numeric constant term.
def as_ast
Definition: z3py.py:344
def ctx_ref
Definition: z3py.py:352
def as_string
Definition: z3py.py:2749