summaryrefslogtreecommitdiff
path: root/src/theory/uf/equality_engine.cpp
diff options
context:
space:
mode:
authorKshitij Bansal <kshitij@cs.nyu.edu>2014-12-03 11:38:36 -0500
committerKshitij Bansal <kshitij@cs.nyu.edu>2014-12-03 11:39:07 -0500
commit160134dc043c28308865d2b91648ba412d0749d4 (patch)
treeba6977484e7368d6ccdf00273443c101c348746b /src/theory/uf/equality_engine.cpp
parentf70804a7159390fcb01d8c1ec208fbfd8e544fba (diff)
Revert "Disable constants sharing in eq engine, disable hack in theory engine."
This partially reverts commit f70804a7159390fcb01d8c1ec208fbfd8e544fba. In particular, it DOES NOT revert "Changes to strings solver : modify lemmas/splits to avoid constants, minor refactoring. Fix assertion failure in quantifiers engine." which is part of the same commit.
Diffstat (limited to 'src/theory/uf/equality_engine.cpp')
-rw-r--r--src/theory/uf/equality_engine.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/theory/uf/equality_engine.cpp b/src/theory/uf/equality_engine.cpp
index d1f1e9ed3..3b19270a4 100644
--- a/src/theory/uf/equality_engine.cpp
+++ b/src/theory/uf/equality_engine.cpp
@@ -308,6 +308,22 @@ void EqualityEngine::addTermInternal(TNode t, bool isOperator) {
// We set this here as this only applies to actual terms, not the
// intermediate application terms
d_isBoolean[result] = true;
+ } else if (d_isConstant[result]) {
+ // Non-Boolean constants are trigger terms for all tags
+ EqualityNodeId tId = getNodeId(t);
+ // Setup the new set
+ Theory::Set newSetTags = 0;
+ EqualityNodeId newSetTriggers[THEORY_LAST];
+ unsigned newSetTriggersSize = THEORY_LAST;
+ for (TheoryId currentTheory = THEORY_FIRST; currentTheory != THEORY_LAST; ++ currentTheory) {
+ newSetTags = Theory::setInsert(currentTheory, newSetTags);
+ newSetTriggers[currentTheory] = tId;
+ }
+ // Add it to the list for backtracking
+ d_triggerTermSetUpdates.push_back(TriggerSetUpdate(tId, null_set_id));
+ d_triggerTermSetUpdatesSize = d_triggerTermSetUpdatesSize + 1;
+ // Mark the the new set as a trigger
+ d_nodeIndividualTrigger[tId] = newTriggerTermSet(newSetTags, newSetTriggers, newSetTriggersSize);
}
// If this is not an internal node, add it to the master
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback