You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python expression Const('s', SeqSort(IntSort()))[0] generates the correct expression AST, but wraps it with a SeqRef, while its actual sort is IntSort() (in general, the sort of the Seq's elements).
The following patch fixes it.
diff --git a/src/api/python/z3/z3.py b/src/api/python/z3/z3.py
index 3a1f3d5fe..f8df8f003 100644
--- a/src/api/python/z3/z3.py+++ b/src/api/python/z3/z3.py@@ -9988,7 +9988,7 @@ class SeqRef(ExprRef):
def __getitem__(self, i):
if _is_int(i):
i = IntVal(i, self.ctx)
- return SeqRef(Z3_mk_seq_nth(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)+ return _to_expr_ref(Z3_mk_seq_nth(self.ctx_ref(), self.as_ast(), i.as_ast()), self.ctx)
def at(self, i):
if _is_int(i):
The text was updated successfully, but these errors were encountered:
The Python expression
Const('s', SeqSort(IntSort()))[0]
generates the correct expression AST, but wraps it with aSeqRef
, while its actual sort isIntSort()
(in general, the sort of the Seq's elements).The following patch fixes it.
The text was updated successfully, but these errors were encountered: