summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/conjecture_generator.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-08-14 13:07:17 -0500
committerGitHub <noreply@github.com>2020-08-14 13:07:17 -0500
commit42cd0a7bcbe993870d76d8cc9db7acc0a9ae70f9 (patch)
tree1335e7efe55bb0df162c03b37e77c364efde666a /src/theory/quantifiers/conjecture_generator.h
parentee055dddf887ed001fee1834ba845fb81e20e27e (diff)
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.
Diffstat (limited to 'src/theory/quantifiers/conjecture_generator.h')
-rw-r--r--src/theory/quantifiers/conjecture_generator.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/theory/quantifiers/conjecture_generator.h b/src/theory/quantifiers/conjecture_generator.h
index d7c314a9a..1e8099054 100644
--- a/src/theory/quantifiers/conjecture_generator.h
+++ b/src/theory/quantifiers/conjecture_generator.h
@@ -263,17 +263,12 @@ private:
}
void eqNotifyConstantTermMerge(TNode t1, TNode t2) override {}
void eqNotifyNewClass(TNode t) override { d_sg.eqNotifyNewClass(t); }
- void eqNotifyPreMerge(TNode t1, TNode t2) override
+ void eqNotifyMerge(TNode t1, TNode t2) override
{
- d_sg.eqNotifyPreMerge(t1, t2);
- }
- void eqNotifyPostMerge(TNode t1, TNode t2) override
- {
- d_sg.eqNotifyPostMerge(t1, t2);
+ d_sg.eqNotifyMerge(t1, t2);
}
void eqNotifyDisequal(TNode t1, TNode t2, TNode reason) override
{
- d_sg.eqNotifyDisequal(t1, t2, reason);
}
};/* class ConjectureGenerator::NotifyClass */
/** The notify class */
@@ -299,12 +294,8 @@ private:
std::map< Node, EqcInfo* > d_eqc_info;
/** called when a new equivalance class is created */
void eqNotifyNewClass(TNode t);
- /** called when two equivalance classes will merge */
- void eqNotifyPreMerge(TNode t1, TNode t2);
/** called when two equivalance classes have merged */
- void eqNotifyPostMerge(TNode t1, TNode t2);
- /** called when two equivalence classes are made disequal */
- void eqNotifyDisequal(TNode t1, TNode t2, TNode reason);
+ void eqNotifyMerge(TNode t1, TNode t2);
/** are universal equal */
bool areUniversalEqual( TNode n1, TNode n2 );
/** are universal disequal */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback