void TheorySetsPrivate::eqNotifyMerge(TNode t1, TNode t2)
{
- if (!d_state.isInConflict())
+ if (!d_state.isInConflict() && t1.getType().isSet())
{
Trace("sets-prop-debug")
<< "Merge " << t1 << " and " << t2 << "..." << std::endl;
// See term_registration_visitor.h for more details.
if (d_logicInfo.isSharingEnabled())
{
- // register it with the shared terms database if sharing is enabled
- preRegisterSharedInternal(atom);
// Collect the shared terms in atom, as well as calling preregister on the
// appropriate theories in atom.
// This calls Theory::preRegisterTerm and Theory::addSharedTerm, possibly
// multiple times.
NodeVisitor<SharedTermsVisitor>::run(d_sharedTermsVisitor, atom);
+ // Register it with the shared terms database if sharing is enabled.
+ // Notice that this must come *after* the above call, since we must ensure
+ // that all subterms of atom have already been added to the central
+ // equality engine before atom is added. This avoids spurious notifications
+ // from the equality engine.
+ preRegisterSharedInternal(atom);
}
else
{
Trace("theory::propagate") << "TheoryEngine::assertToTheory(" << assertion << ", " << toTheoryId << ", " << fromTheoryId << "): conflict (no sharing)" << endl;
Trace("dtview::conflict")
<< ":THEORY-CONFLICT: " << assertion << std::endl;
- d_inConflict = true;
+ markInConflict();
} else {
return;
}
<< endl;
Trace("dtview::conflict")
<< ":THEORY-CONFLICT: " << assertion << std::endl;
- d_inConflict = true;
+ markInConflict();
}
}
return;