diff options
Diffstat (limited to 'src/theory/bv/slicer.cpp')
-rw-r--r-- | src/theory/bv/slicer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/theory/bv/slicer.cpp b/src/theory/bv/slicer.cpp index 87295e8f6..f41612df3 100644 --- a/src/theory/bv/slicer.cpp +++ b/src/theory/bv/slicer.cpp @@ -220,10 +220,13 @@ void UnionFind::merge(TermId t1, TermId t2) { d_statistics.d_numRepresentatives += -1; } -TermId UnionFind::find(TermId id) const { +TermId UnionFind::find(TermId id) { TermId repr = getRepr(id); - if (repr != UndefinedId) - return find(repr); + if (repr != UndefinedId) { + TermId find_id = find(repr); + setRepr(id, find_id); + return find_id; + } return id; } /** |