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 py_value (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 kind (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)
 
def py_value (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 11014 of file z3py.py.

Member Function Documentation

def __add__ (   self,
  other 
)

Definition at line 11020 of file z3py.py.

11020  def __add__(self, other):
11021  return Concat(self, other)
11022 
def __add__(self, other)
Definition: z3py.py:11020
def Concat(args)
Definition: z3py.py:4172
def __ge__ (   self,
  other 
)

Definition at line 11059 of file z3py.py.

11059  def __ge__(self, other):
11060  return _to_expr_ref(Z3_mk_str_le(self.ctx_ref(), other.as_ast(), self.as_ast()), self.ctx)
11061 
def as_ast(self)
Definition: z3py.py:402
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:11059
def ctx_ref(self)
Definition: z3py.py:410
def __getitem__ (   self,
  i 
)

Definition at line 11026 of file z3py.py.

11026  def __getitem__(self, i):
11027  if _is_int(i):
11028  i = IntVal(i, self.ctx)
11029  return _to_expr_ref(Z3_mk_seq_nth(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
11030 
def as_ast(self)
Definition: z3py.py:402
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:11026
def ctx_ref(self)
Definition: z3py.py:410
def IntVal
Definition: z3py.py:3271
def __gt__ (   self,
  other 
)

Definition at line 11062 of file z3py.py.

11062  def __gt__(self, other):
11063  return _to_expr_ref(Z3_mk_str_lt(self.ctx_ref(), other.as_ast(), self.as_ast()), self.ctx)
11064 
11065 
def as_ast(self)
Definition: z3py.py:402
def ctx_ref(self)
Definition: z3py.py:410
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:11062
def __le__ (   self,
  other 
)

Definition at line 11053 of file z3py.py.

11053  def __le__(self, other):
11054  return _to_expr_ref(Z3_mk_str_le(self.ctx_ref(), self.as_ast(), other.as_ast()), self.ctx)
11055 
def as_ast(self)
Definition: z3py.py:402
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:11053
def ctx_ref(self)
Definition: z3py.py:410
def __lt__ (   self,
  other 
)

Definition at line 11056 of file z3py.py.

11056  def __lt__(self, other):
11057  return _to_expr_ref(Z3_mk_str_lt(self.ctx_ref(), self.as_ast(), other.as_ast()), self.ctx)
11058 
def as_ast(self)
Definition: z3py.py:402
def __lt__(self, other)
Definition: z3py.py:11056
def ctx_ref(self)
Definition: z3py.py:410
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 11023 of file z3py.py.

11023  def __radd__(self, other):
11024  return Concat(other, self)
11025 
def __radd__(self, other)
Definition: z3py.py:11023
def Concat(args)
Definition: z3py.py:4172
def as_string (   self)
Return a string representation of sequence expression.

Definition at line 11042 of file z3py.py.

11042  def as_string(self):
11043  """Return a string representation of sequence expression."""
11044  if self.is_string_value():
11045  string_length = ctypes.c_uint()
11046  chars = Z3_get_lstring(self.ctx_ref(), self.as_ast(), byref(string_length))
11047  return string_at(chars, size=string_length.value).decode("latin-1")
11048  return Z3_ast_to_string(self.ctx_ref(), self.as_ast())
11049 
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:11042
def as_ast(self)
Definition: z3py.py:402
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:11039
def ctx_ref(self)
Definition: z3py.py:410
def at (   self,
  i 
)

Definition at line 11031 of file z3py.py.

11031  def at(self, i):
11032  if _is_int(i):
11033  i = IntVal(i, self.ctx)
11034  return SeqRef(Z3_mk_seq_at(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
11035 
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:402
def at(self, i)
Definition: z3py.py:11031
def ctx_ref(self)
Definition: z3py.py:410
def IntVal
Definition: z3py.py:3271
def is_string (   self)

Definition at line 11036 of file z3py.py.

11036  def is_string(self):
11037  return Z3_is_string_sort(self.ctx_ref(), Z3_get_sort(self.ctx_ref(), self.as_ast()))
11038 
def as_ast(self)
Definition: z3py.py:402
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:11036
def ctx_ref(self)
Definition: z3py.py:410
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 11039 of file z3py.py.

Referenced by SeqRef.as_string().

11039  def is_string_value(self):
11040  return Z3_is_string(self.ctx_ref(), self.as_ast())
11041 
def as_ast(self)
Definition: z3py.py:402
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:11039
def ctx_ref(self)
Definition: z3py.py:410
def py_value (   self)

Definition at line 11050 of file z3py.py.

11050  def py_value(self):
11051  return self.as_string()
11052 
def as_string(self)
Definition: z3py.py:11042
def py_value(self)
Definition: z3py.py:11050
def sort (   self)

Definition at line 11017 of file z3py.py.

11017  def sort(self):
11018  return SeqSortRef(Z3_get_sort(self.ctx_ref(), self.as_ast()), self.ctx)
11019 
def as_ast(self)
Definition: z3py.py:402
Strings, Sequences and Regular expressions.
Definition: z3py.py:10965
def ctx_ref(self)
Definition: z3py.py:410
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:11017