diff --git a/src/tsolvers/egraph/EnodeStore.cc b/src/tsolvers/egraph/EnodeStore.cc index c1afb2106..2bed3302b 100644 --- a/src/tsolvers/egraph/EnodeStore.cc +++ b/src/tsolvers/egraph/EnodeStore.cc @@ -71,9 +71,8 @@ ERef EnodeStore::addTerm(PTRef term, bool ignoreChildren) { }(); ERef newEnode = ea.alloc(symref, argSpan, term); + assert(not termToERef.has(term)); termToERef.insert(term, newEnode); - assert(not ERefToTerm.has(newEnode)); - ERefToTerm.insert(newEnode, term); termEnodes.push(newEnode); return newEnode; } diff --git a/src/tsolvers/egraph/EnodeStore.h b/src/tsolvers/egraph/EnodeStore.h index 3b296e47c..14e799223 100644 --- a/src/tsolvers/egraph/EnodeStore.h +++ b/src/tsolvers/egraph/EnodeStore.h @@ -78,7 +78,6 @@ class EnodeStore { uint32_t dist_idx; Map > termToERef; - Map > ERefToTerm; vec index_to_dist; // Table distinction index --> proper term vec termEnodes; @@ -108,7 +107,7 @@ class EnodeStore { * @return true if tr is in the store, false if not. */ bool peekERef(PTRef tr, ERef& er) const { return termToERef.peek(tr, er); } - PTRef getPTRef(ERef er) const { return ERefToTerm[er]; } + PTRef getPTRef(ERef er) const { return ea[er].getTerm(); } vec constructTerm(PTRef tr);