From 42cd0a7bcbe993870d76d8cc9db7acc0a9ae70f9 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Fri, 14 Aug 2020 13:07:17 -0500 Subject: Simplify equality engine notifications (#4896) Previously, there was methods for being informed just before and just after equivalence classes are merged (eqNotifyPreMerge and eqNotifyPostMerge). The purpose of this was to allow e.g. the theory to inspect the equivalence classes in question before the equality engine modified them. However this is no longer used, and moreover is discouraged since Theory should generally buffer their usage of EqualityEngine while it is making internal calls. TheoryStrings was the only theory to use eqNotifyPreMerge (somewhat arbitrarily), all others used eqNotifyPostMerge. This makes post-merge the default, renames it to eqNotifyMerge and removes pre notifications. This will simplify the work of the new theory combination methods as well as leading to fewer spurious calls to callbacks in equality engine. --- src/theory/uf/theory_uf.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/theory/uf/theory_uf.cpp') diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index 02c9cb467..862a906a0 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -657,13 +657,8 @@ void TheoryUF::eqNotifyNewClass(TNode t) { } } -void TheoryUF::eqNotifyPreMerge(TNode t1, TNode t2) { - //if (getLogicInfo().isQuantified()) { - //getQuantifiersEngine()->getEfficientEMatcher()->merge( t1, t2 ); - //} -} - -void TheoryUF::eqNotifyPostMerge(TNode t1, TNode t2) { +void TheoryUF::eqNotifyMerge(TNode t1, TNode t2) +{ if (d_thss != NULL) { d_thss->merge(t1, t2); } -- cgit v1.2.3