d_triggerDatabaseAllocatedSize = 100000;
d_triggerDatabase = (char*) malloc(d_triggerDatabaseAllocatedSize);
- //We can't notify during the initialization because it notifies
- // QuantifiersEngine.AddTermToDatabase that try to access to the uf
- // instantiator that currently doesn't exist.
- ScopedBool sb(d_performNotify, false);
addTermInternal(d_true);
addTermInternal(d_false);
d_masterEqualityEngine(0),
d_context(context),
d_done(context, false),
- d_performNotify(true),
d_notify(s_notifyNone),
d_applicationLookupsCount(context, 0),
d_nodesCount(context, 0),
d_masterEqualityEngine(0),
d_context(context),
d_done(context, false),
- d_performNotify(true),
d_notify(notify),
d_applicationLookupsCount(context, 0),
d_nodesCount(context, 0),
{
// Notify e.g. the theory that owns this equality engine that there is a
// new equivalence class.
- if (d_performNotify)
- {
- d_notify.eqNotifyNewClass(t);
- }
+ d_notify.eqNotifyNewClass(t);
if (d_constantsAreTriggers && d_isConstant[result])
{
// Non-Boolean constants are trigger terms for all tags
}
// notify the theory
- if (d_performNotify) {
- d_notify.eqNotifyDisequal(eq[0], eq[1], reason);
- }
+ d_notify.eqNotifyDisequal(eq[0], eq[1], reason);
Debug("equality::trigger") << d_name << "::eq::addEquality(" << eq << "," << (polarity ? "true" : "false") << ")" << std::endl;
// Determine if we should notify the owner of this class of this merge.
// The second part of this check is needed due to the internal implementation
// of this class. It ensures that we are merging terms and not operators.
- if (d_performNotify && class1Id == cc1.getFind() && class2Id == cc2.getFind())
+ if (class1Id == cc1.getFind() && class2Id == cc2.getFind())
{
doNotify = true;
}
EqualityNodeId tag1id = newSetTriggers[newSetTriggersSize++] =
class1triggers.d_triggers[i1++];
// since they are both tagged notify of merge
- if (d_performNotify) {
- EqualityNodeId tag2id = class2triggers.d_triggers[i2++];
- if (!d_notify.eqNotifyTriggerTermEquality(tag1, d_nodes[tag1id], d_nodes[tag2id], true)) {
- return false;
- }
+ EqualityNodeId tag2id = class2triggers.d_triggers[i2++];
+ if (!d_notify.eqNotifyTriggerTermEquality(
+ tag1, d_nodes[tag1id], d_nodes[tag2id], true))
+ {
+ return false;
}
// Next tags
tag1 = TheoryIdSetUtil::setPop(tags1);
d_assertedEqualities.push_back(Equality(null_id, null_id));
d_assertedEqualitiesCount = d_assertedEqualitiesCount + 1;
// Notify
- if (d_performNotify) {
- d_notify.eqNotifyConstantTermMerge(d_nodes[t1classId], d_nodes[t2classId]);
- }
+ d_notify.eqNotifyConstantTermMerge(d_nodes[t1classId],
+ d_nodes[t2classId]);
// Empty the queue and exit
continue;
}
}
// Notify the triggers
- if (d_performNotify && !d_done) {
+ if (!d_done)
+ {
for (size_t trigger_i = 0, trigger_end = triggers.size(); trigger_i < trigger_end && !d_done; ++ trigger_i) {
const TriggerInfo& triggerInfo = d_equalityTriggersOriginal[triggers[trigger_i]];
if (triggerInfo.d_trigger.getKind() == kind::EQUAL)
TriggerTermSetRef triggerSetRef = d_nodeIndividualTrigger[classId];
if (triggerSetRef != +null_set_id && getTriggerTermSet(triggerSetRef).hasTrigger(tag)) {
// If the term already is in the equivalence class that a tagged representative, just notify
- if (d_performNotify) {
- EqualityNodeId triggerId = getTriggerTermSet(triggerSetRef).getTrigger(tag);
- Debug("equality::trigger") << d_name << "::eq::addTriggerTerm(" << t << ", " << tag << "): already have this trigger in class with " << d_nodes[triggerId] << std::endl;
- if (eqNodeId != triggerId && !d_notify.eqNotifyTriggerTermEquality(tag, t, d_nodes[triggerId], true)) {
- d_done = true;
- }
+ EqualityNodeId triggerId = getTriggerTermSet(triggerSetRef).getTrigger(tag);
+ Debug("equality::trigger")
+ << d_name << "::eq::addTriggerTerm(" << t << ", " << tag
+ << "): already have this trigger in class with " << d_nodes[triggerId]
+ << std::endl;
+ if (eqNodeId != triggerId
+ && !d_notify.eqNotifyTriggerTermEquality(
+ tag, t, d_nodes[triggerId], true))
+ {
+ d_done = true;
}
} else {
// Store the propagation
storePropagatedDisequality(currentTag, myRep, tagRep);
// Notify
- if (d_performNotify) {
- if (!d_notify.eqNotifyTriggerTermEquality(currentTag, d_nodes[myRep], d_nodes[tagRep], false)) {
- d_done = true;
- }
+ if (!d_notify.eqNotifyTriggerTermEquality(
+ currentTag, d_nodes[myRep], d_nodes[tagRep], false))
+ {
+ d_done = true;
}
}
}