3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-02 20:23:27 +00:00

guard against arity mismatch

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2026-08-01 09:35:52 -07:00
parent 1ba30df028
commit 516a413559
2 changed files with 13 additions and 0 deletions

View file

@ -1695,14 +1695,20 @@ seq_util::rex::info seq_util::rex::mk_info_rec(app* e) const {
//TBD: check if the character predicate contains uninterpreted symbols or is nonground or is unsat
return info(true, l_false, 1, false);
case OP_RE_CONCAT:
if (e->get_num_args() != 2)
return unknown_info;
i1 = get_info_rec(e->get_arg(0));
i2 = get_info_rec(e->get_arg(1));
return i1.concat(i2, u.re.is_concat(e->get_arg(0)));
case OP_RE_UNION:
if (e->get_num_args() != 2)
return unknown_info;
i1 = get_info_rec(e->get_arg(0));
i2 = get_info_rec(e->get_arg(1));
return i1.disj(i2);
case OP_RE_INTERSECT:
if (e->get_num_args() != 2)
return unknown_info;
i1 = get_info_rec(e->get_arg(0));
i2 = get_info_rec(e->get_arg(1));
return i1.conj(i2);
@ -1727,10 +1733,14 @@ seq_util::rex::info seq_util::rex::mk_info_rec(app* e) const {
upper_bound = e->get_decl()->get_parameter(1).get_int();
return i1.loop(lower_bound, upper_bound);
case OP_RE_DIFF:
if (e->get_num_args() != 2)
return unknown_info;
i1 = get_info_rec(e->get_arg(0));
i2 = get_info_rec(e->get_arg(1));
return i1.diff(i2);
case OP_RE_XOR:
if (e->get_num_args() != 2)
return unknown_info;
i1 = get_info_rec(e->get_arg(0));
i2 = get_info_rec(e->get_arg(1));
return i1.xor_(i2);