3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-16 18:20:00 +00:00

Address code review: fix const-correctness, improve child registration, add comments

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-01 20:25:18 +00:00
parent 2e17bb8767
commit e4f9a517e4
2 changed files with 26 additions and 10 deletions

View file

@ -142,6 +142,8 @@ namespace euf {
}
case snode_kind::s_power: {
// s^n: nullable follows base, consistent with ZIPT's PowerToken
// the exponent n is assumed to be a symbolic integer, may or may not be zero
SASSERT(n->num_args() >= 1);
snode* base = n->arg(0);
n->m_ground = base->is_ground();
@ -278,14 +280,14 @@ namespace euf {
app* a = to_app(e);
unsigned arity = a->get_num_args();
// recursively register children that are sequences or regexes
// recursively register children
// for seq/re children, create classified snodes
// for other children (e.g. integer exponents), create s_other snodes
snode_vector child_nodes;
for (unsigned i = 0; i < arity; ++i) {
expr* ch = a->get_arg(i);
if (m_seq.is_seq(ch) || m_seq.is_re(ch)) {
snode* cn = mk(ch);
child_nodes.push_back(cn);
}
snode* cn = mk(ch);
child_nodes.push_back(cn);
}
return mk_snode(e, k, child_nodes.size(), child_nodes.data());