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

Convert dep_source to std::variant<dep_eq, dep_mem>

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-17 03:47:48 +00:00
parent af3729ef31
commit 7d78a19f1c
5 changed files with 46 additions and 47 deletions

View file

@ -456,14 +456,15 @@ namespace smt {
vector<seq::dep_source, false> vs;
m_nielsen.dep_mgr().linearize(deps, vs);
for (seq::dep_source const& d : vs) {
if (d.m_kind == seq::dep_source::kind::eq) {
eq_source const& src = m_state.get_eq_source(d.index);
if (std::holds_alternative<seq::dep_eq>(d)) {
eq_source const& src = m_state.get_eq_source(std::get<seq::dep_eq>(d).index);
if (src.m_n1->get_root() == src.m_n2->get_root())
eqs.push_back({src.m_n1, src.m_n2});
}
else {
if (d.index < m_nielsen_to_state_mem.size()) {
unsigned state_mem_idx = m_nielsen_to_state_mem[d.index];
unsigned idx = std::get<seq::dep_mem>(d).index;
if (idx < m_nielsen_to_state_mem.size()) {
unsigned state_mem_idx = m_nielsen_to_state_mem[idx];
mem_source const& src = m_state.get_mem_source(state_mem_idx);
SASSERT(ctx.get_assignment(src.m_lit) == l_true);
lits.push_back(src.m_lit);