All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Data Fields
BitVecSortRef Class Reference

Bit-Vectors. More...

+ Inheritance diagram for BitVecSortRef:

Public Member Functions

def size
def subsort
def cast
- Public Member Functions inherited from SortRef
def as_ast
def kind
def subsort
def cast
def name
def __eq__
def __ne__
- 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

Data Fields


Detailed Description


Bit-vector sort.

Definition at line 2789 of file z3py.py.

Member Function Documentation

def cast (   self,
Try to cast `val` as a Bit-Vector.

>>> b = BitVecSort(32)
>>> b.cast(10)
>>> b.cast(10).sexpr()

Definition at line 2804 of file z3py.py.

2805  def cast(self, val):
2806  """Try to cast `val` as a Bit-Vector.
2808  >>> b = BitVecSort(32)
2809  >>> b.cast(10)
2810  10
2811  >>> b.cast(10).sexpr()
2812  '#x0000000a'
2813  """
2814  if is_expr(val):
2815  if __debug__:
2816  _z3_assert(self.ctx == val.ctx, "Context mismatch")
2817  # Idea: use sign_extend if sort of val is a bitvector of smaller size
2818  return val
2819  else:
2820  return BitVecVal(val, self)
def size (   self)
Return the size (number of bits) of the bit-vector sort `self`.

>>> b = BitVecSort(32)
>>> b.size()

Definition at line 2792 of file z3py.py.

2793  def size(self):
2794  """Return the size (number of bits) of the bit-vector sort `self`.
2796  >>> b = BitVecSort(32)
2797  >>> b.size()
2798  32
2799  """
2800  return int(Z3_get_bv_sort_size(self.ctx_ref(), self.ast))
def subsort (   self,

Definition at line 2801 of file z3py.py.

2802  def subsort(self, other):
2803  return is_bv_sort(other) and self.size() < other.size()

Field Documentation


Definition at line 2815 of file z3py.py.

Referenced by Probe.__eq__(), Probe.__ge__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), Probe.__lt__(), Probe.__ne__(), Tactic.apply(), ApplyResult.as_expr(), ApplyResult.convert_model(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_rules(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Tactic.solver(), and Fixedpoint.statistics().