3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00

add parameter validation to sequence expressions

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-15 10:39:21 +05:30
parent 150c5c283d
commit 14c19fe928

View file

@ -9095,6 +9095,10 @@ def _coerce_seq(s, ctx=None):
if isinstance(s, str):
ctx = _get_ctx(ctx)
s = StringVal(s, ctx)
if not is_expr(s):
raise Z3Exception("Non-expression passed as a sequence")
if not is_seq(s):
raise Z3Exception("Non-sequence passed as a sequence")
return s
def _get_ctx2(a, b, ctx=None):