{
return;
}
- Debug("arrays") << spaces(getSatContext()->getLevel()) << "TheoryArrays::preRegisterTerm(" << node << ")" << std::endl;
+ Debug("arrays") << spaces(getSatContext()->getLevel())
+ << "TheoryArrays::preRegisterTerm(" << node << ")"
+ << std::endl;
Kind nk = node.getKind();
if (nk == kind::EQUAL)
{
d_equalityEngine->addTriggerPredicate(node);
return;
}
- else if (d_equalityEngine->hasTerm(node))
- {
- // Invariant: array terms should be preregistered before being added to the equality engine
- Assert(nk != kind::SELECT
- || d_isPreRegistered.find(node) != d_isPreRegistered.end());
- return;
- }
// add to equality engine and the may equality engine
TypeNode nodeType = node.getType();
if (nodeType.isArray())
}
d_mayEqualEqualityEngine.addTerm(node);
}
+ if (d_equalityEngine->hasTerm(node))
+ {
+ // Notice that array terms may be added to its equality engine before
+ // being preregistered in the central equality engine architecture.
+ // Prior to this, an assertion in this case was:
+ // Assert(nk != kind::SELECT
+ // || d_isPreRegistered.find(node) != d_isPreRegistered.end());
+ return;
+ }
d_equalityEngine->addTerm(node);
switch (node.getKind())
d_arrays.conflict(t1, t2);
}
- void eqNotifyNewClass(TNode t) override {}
+ void eqNotifyNewClass(TNode t) override
+ {
+ d_arrays.preRegisterTermInternal(t);
+ }
void eqNotifyMerge(TNode t1, TNode t2) override
{
if (t1.getType().isArray()) {