Z3
Public Member Functions
SeqRef Class Reference
+ Inheritance diagram for SeqRef:

Public Member Functions

def sort (self)
 
def __add__ (self, other)
 
def __radd__ (self, other)
 
def __getitem__ (self, i)
 
def at (self, i)
 
def is_string (self)
 
def is_string_value (self)
 
def as_string (self)
 
- Public Member Functions inherited from ExprRef
def as_ast (self)
 
def get_id (self)
 
def sort (self)
 
def sort_kind (self)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __ne__ (self, other)
 
def params (self)
 
def decl (self)
 
def num_args (self)
 
def arg (self, idx)
 
def children (self)
 
- Public Member Functions inherited from AstRef
def __init__ (self, ast, ctx=None)
 
def __del__ (self)
 
def __deepcopy__ (self, memo={})
 
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 __copy__ (self)
 
def hash (self)
 
- Public Member Functions inherited from Z3PPObject
def use_pp (self)
 

Additional Inherited Members

- Data Fields inherited from AstRef
 ast
 
 ctx
 

Detailed Description

Sequence expression.

Definition at line 9958 of file z3py.py.

Member Function Documentation

◆ __add__()

def __add__ (   self,
  other 
)

Definition at line 9964 of file z3py.py.

9964  def __add__(self, other):
9965  return Concat(self, other)
9966 
def Concat(args)
Definition: z3py.py:3796

◆ __getitem__()

def __getitem__ (   self,
  i 
)

Definition at line 9970 of file z3py.py.

9970  def __getitem__(self, i):
9971  if _is_int(i):
9972  i = IntVal(i, self.ctx)
9973  return SeqRef(Z3_mk_seq_nth(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
9974 
def IntVal(val, ctx=None)
Definition: z3py.py:2937
Z3_ast Z3_API Z3_mk_seq_nth(Z3_context c, Z3_ast s, Z3_ast index)
Retrieve from s the element positioned at position index. The function is under-specified if the inde...

◆ __radd__()

def __radd__ (   self,
  other 
)

Definition at line 9967 of file z3py.py.

9967  def __radd__(self, other):
9968  return Concat(other, self)
9969 
def Concat(args)
Definition: z3py.py:3796

◆ as_string()

def as_string (   self)
Return a string representation of sequence expression.

Definition at line 9986 of file z3py.py.

9986  def as_string(self):
9987  """Return a string representation of sequence expression."""
9988  if self.is_string_value():
9989  return Z3_get_string(self.ctx_ref(), self.as_ast())
9990  return Z3_ast_to_string(self.ctx_ref(), self.as_ast())
9991 
9992 
Z3_string Z3_API Z3_ast_to_string(Z3_context c, Z3_ast a)
Convert the given AST node into a string.
Z3_string Z3_API Z3_get_string(Z3_context c, Z3_ast s)
Retrieve the string constant stored in s.

◆ at()

def at (   self,
  i 
)

Definition at line 9975 of file z3py.py.

9975  def at(self, i):
9976  if _is_int(i):
9977  i = IntVal(i, self.ctx)
9978  return SeqRef(Z3_mk_seq_at(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
9979 
Z3_ast Z3_API Z3_mk_seq_at(Z3_context c, Z3_ast s, Z3_ast index)
Retrieve from s the unit sequence positioned at position index. The sequence is empty if the index is...
def IntVal(val, ctx=None)
Definition: z3py.py:2937

◆ is_string()

def is_string (   self)

Definition at line 9980 of file z3py.py.

9980  def is_string(self):
9981  return Z3_is_string_sort(self.ctx_ref(), Z3_get_sort(self.ctx_ref(), self.as_ast()))
9982 
def is_string(a)
Definition: z3py.py:10021
bool Z3_API Z3_is_string_sort(Z3_context c, Z3_sort s)
Check if s is a string sort.
Z3_sort Z3_API Z3_get_sort(Z3_context c, Z3_ast a)
Return the sort of an AST node.

◆ is_string_value()

def is_string_value (   self)

Definition at line 9983 of file z3py.py.

9983  def is_string_value(self):
9984  return Z3_is_string(self.ctx_ref(), self.as_ast())
9985 
def is_string_value(a)
Definition: z3py.py:10028
bool Z3_API Z3_is_string(Z3_context c, Z3_ast s)
Determine if s is a string constant.

◆ sort()

def sort (   self)

Definition at line 9961 of file z3py.py.

9961  def sort(self):
9962  return SeqSortRef(Z3_get_sort(self.ctx_ref(), self.as_ast()), self.ctx)
9963 
Z3_sort Z3_API Z3_get_sort(Z3_context c, Z3_ast a)
Return the sort of an AST node.