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)
 
def __le__ (self, other)
 
def __lt__ (self, other)
 
def __ge__ (self, other)
 
def __gt__ (self, other)
 
- 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)
 
def from_string (self, s)
 
def serialize (self)
 
- Public Member Functions inherited from AstRef
def __init__
 
def __del__ (self)
 
def __deepcopy__
 
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 10822 of file z3py.py.

Member Function Documentation

def __add__ (   self,
  other 
)

Definition at line 10828 of file z3py.py.

10828  def __add__(self, other):
10829  return Concat(self, other)
10830 
def __add__(self, other)
Definition: z3py.py:10828
def Concat(args)
Definition: z3py.py:4074
def __ge__ (   self,
  other 
)

Definition at line 10864 of file z3py.py.

10864  def __ge__(self, other):
10865  return _to_expr_ref(Z3_mk_str_le(self.ctx_ref(), other.as_ast(), self.as_ast()), self.ctx)
10866 
def as_ast(self)
Definition: z3py.py:392
Z3_ast Z3_API Z3_mk_str_le(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if s1 is equal or lexicographically strictly less than s2.
def __ge__(self, other)
Definition: z3py.py:10864
def ctx_ref(self)
Definition: z3py.py:400
def __getitem__ (   self,
  i 
)

Definition at line 10834 of file z3py.py.

10834  def __getitem__(self, i):
10835  if _is_int(i):
10836  i = IntVal(i, self.ctx)
10837  return _to_expr_ref(Z3_mk_seq_nth(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
10838 
def as_ast(self)
Definition: z3py.py:392
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...
def __getitem__(self, i)
Definition: z3py.py:10834
def ctx_ref(self)
Definition: z3py.py:400
def IntVal
Definition: z3py.py:3180
def __gt__ (   self,
  other 
)

Definition at line 10867 of file z3py.py.

10867  def __gt__(self, other):
10868  return _to_expr_ref(Z3_mk_str_lt(self.ctx_ref(), other.as_ast(), self.as_ast()), self.ctx)
10869 
10870 
def as_ast(self)
Definition: z3py.py:392
def ctx_ref(self)
Definition: z3py.py:400
Z3_ast Z3_API Z3_mk_str_lt(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if s1 is lexicographically strictly less than s2.
def __gt__(self, other)
Definition: z3py.py:10867
def __le__ (   self,
  other 
)

Definition at line 10858 of file z3py.py.

10858  def __le__(self, other):
10859  return _to_expr_ref(Z3_mk_str_le(self.ctx_ref(), self.as_ast(), other.as_ast()), self.ctx)
10860 
def as_ast(self)
Definition: z3py.py:392
Z3_ast Z3_API Z3_mk_str_le(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if s1 is equal or lexicographically strictly less than s2.
def __le__(self, other)
Definition: z3py.py:10858
def ctx_ref(self)
Definition: z3py.py:400
def __lt__ (   self,
  other 
)

Definition at line 10861 of file z3py.py.

10861  def __lt__(self, other):
10862  return _to_expr_ref(Z3_mk_str_lt(self.ctx_ref(), self.as_ast(), other.as_ast()), self.ctx)
10863 
def as_ast(self)
Definition: z3py.py:392
def __lt__(self, other)
Definition: z3py.py:10861
def ctx_ref(self)
Definition: z3py.py:400
Z3_ast Z3_API Z3_mk_str_lt(Z3_context c, Z3_ast prefix, Z3_ast s)
Check if s1 is lexicographically strictly less than s2.
def __radd__ (   self,
  other 
)

Definition at line 10831 of file z3py.py.

10831  def __radd__(self, other):
10832  return Concat(other, self)
10833 
def __radd__(self, other)
Definition: z3py.py:10831
def Concat(args)
Definition: z3py.py:4074
def as_string (   self)
Return a string representation of sequence expression.

Definition at line 10850 of file z3py.py.

10850  def as_string(self):
10851  """Return a string representation of sequence expression."""
10852  if self.is_string_value():
10853  string_length = ctypes.c_uint()
10854  chars = Z3_get_lstring(self.ctx_ref(), self.as_ast(), byref(string_length))
10855  return string_at(chars, size=string_length.value).decode("latin-1")
10856  return Z3_ast_to_string(self.ctx_ref(), self.as_ast())
10857 
Z3_string Z3_API Z3_ast_to_string(Z3_context c, Z3_ast a)
Convert the given AST node into a string.
def as_string(self)
Definition: z3py.py:10850
def as_ast(self)
Definition: z3py.py:392
Z3_char_ptr Z3_API Z3_get_lstring(Z3_context c, Z3_ast s, unsigned *length)
Retrieve the string constant stored in s. The string can contain escape sequences. Characters in the range 1 to 255 are literal. Characters in the range 0, and 256 above are escaped.
def is_string_value(self)
Definition: z3py.py:10847
def ctx_ref(self)
Definition: z3py.py:400
def at (   self,
  i 
)

Definition at line 10839 of file z3py.py.

10839  def at(self, i):
10840  if _is_int(i):
10841  i = IntVal(i, self.ctx)
10842  return SeqRef(Z3_mk_seq_at(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
10843 
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 as_ast(self)
Definition: z3py.py:392
def at(self, i)
Definition: z3py.py:10839
def ctx_ref(self)
Definition: z3py.py:400
def IntVal
Definition: z3py.py:3180
def is_string (   self)

Definition at line 10844 of file z3py.py.

10844  def is_string(self):
10845  return Z3_is_string_sort(self.ctx_ref(), Z3_get_sort(self.ctx_ref(), self.as_ast()))
10846 
def as_ast(self)
Definition: z3py.py:392
bool Z3_API Z3_is_string_sort(Z3_context c, Z3_sort s)
Check if s is a string sort.
def is_string(self)
Definition: z3py.py:10844
def ctx_ref(self)
Definition: z3py.py:400
Z3_sort Z3_API Z3_get_sort(Z3_context c, Z3_ast a)
Return the sort of an AST node.
def is_string_value (   self)

Definition at line 10847 of file z3py.py.

Referenced by SeqRef.as_string().

10847  def is_string_value(self):
10848  return Z3_is_string(self.ctx_ref(), self.as_ast())
10849 
def as_ast(self)
Definition: z3py.py:392
bool Z3_API Z3_is_string(Z3_context c, Z3_ast s)
Determine if s is a string constant.
def is_string_value(self)
Definition: z3py.py:10847
def ctx_ref(self)
Definition: z3py.py:400
def sort (   self)

Definition at line 10825 of file z3py.py.

10825  def sort(self):
10826  return SeqSortRef(Z3_get_sort(self.ctx_ref(), self.as_ast()), self.ctx)
10827 
def as_ast(self)
Definition: z3py.py:392
Strings, Sequences and Regular expressions.
Definition: z3py.py:10773
def ctx_ref(self)
Definition: z3py.py:400
Z3_sort Z3_API Z3_get_sort(Z3_context c, Z3_ast a)
Return the sort of an AST node.
def sort(self)
Definition: z3py.py:10825