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

Refactor mk_concat call sites to use std::initializer_list (#8494)

* Initial plan

* Refactor mk_concat call sites to use std::initializer_list

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-02-04 13:45:20 -08:00 committed by Nikolaj Bjorner
parent 3b8825f619
commit 73f6dae095
6 changed files with 16 additions and 37 deletions

View file

@ -418,16 +418,13 @@ namespace mbp {
lhs = e;
unsigned sz = m_bv.get_bv_size(e);
if (lo > 0 && hi + 1 < sz) {
expr* args[3] = { m_bv.mk_extract(sz-1, hi + 1, e), rhs, m_bv.mk_extract(lo - 1, 0, e)};
rhs = m_bv.mk_concat(3, args);
rhs = m_bv.mk_concat({m_bv.mk_extract(sz-1, hi + 1, e), rhs, m_bv.mk_extract(lo - 1, 0, e)});
}
else if (lo == 0 && hi + 1 < sz) {
expr* args[2] = { m_bv.mk_extract(sz-1, hi + 1, e), rhs };
rhs = m_bv.mk_concat(2, args);
rhs = m_bv.mk_concat({m_bv.mk_extract(sz-1, hi + 1, e), rhs});
}
else if (lo > 0 && hi + 1 == sz) {
expr* args[2] = { rhs, m_bv.mk_extract(lo - 1, 0, e) };
rhs = m_bv.mk_concat(2, args);
rhs = m_bv.mk_concat({rhs, m_bv.mk_extract(lo - 1, 0, e)});
}
else {
return false;