All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 sort
def sort_kind
def __eq__
def __ne__
def decl
def num_args
def arg
def children
- Public Member Functions inherited from AstRef
def __init__
def __del__
def __str__
def __repr__
def sexpr
def as_ast
def ctx_ref
def eq
def translate
def hash
- Public Member Functions inherited from Z3PPObject
def use_pp

Additional Inherited Members

- Data Fields inherited from AstRef

Detailed Description

Integer values.

Definition at line 2371 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

Definition at line 2374 of file z3py.py.

2375  def as_long(self):
2376  """Return a Z3 integer numeral as a Python long (bignum) numeral.
2378  >>> v = IntVal(1)
2379  >>> v + 1
2380  1 + 1
2381  >>> v.as_long() + 1
2382  2L
2383  """
2384  if __debug__:
2385  _z3_assert(self.is_int(), "Integer value expected")
2386  return long(self.as_string())
def as_string (   self)
Return a Z3 integer numeral as a Python string.
>>> v = IntVal(100)
>>> v.as_string()

Definition at line 2387 of file z3py.py.

Referenced by IntNumRef.as_long().

2388  def as_string(self):
2389  """Return a Z3 integer numeral as a Python string.
2390  >>> v = IntVal(100)
2391  >>> v.as_string()
2392  '100'
2393  """
2394  return Z3_get_numeral_string(self.ctx_ref(), self.as_ast())