This includes eliminating TheoryBV's call to eqNotifyNewEqClass and fixing an issue with string's eqNotifyNewEqClass method, which was registering constant integers.
It also removes some unnecessary methods in Theory.
}
} else {
d_equalityEngine.addTerm(node);
+ // Register with the extended theory, for context-dependent simplification.
+ // Notice we do this for registered terms but not internally generated
+ // equivalence classes. The two should roughly cooincide. Since ExtTheory is
+ // being used as a heuristic, it is good enough to be registered here.
+ d_extTheory->registerTerm(node);
}
}
d_solver.conflict(t1, t2);
}
-void CoreSolver::NotifyClass::eqNotifyNewClass(TNode t) {
- d_solver.eqNotifyNewClass( t );
-}
-
bool CoreSolver::storePropagation(TNode literal) {
return d_bv->storePropagation(literal, SUB_CORE);
}
d_bv->setConflict(conflict);
}
-void CoreSolver::eqNotifyNewClass(TNode t) { d_extTheory->registerTerm(t); }
-
bool CoreSolver::isCompleteForTerm(TNode term, TNodeBoolMap& seen) {
if (d_useSlicer)
return utils::isCoreTerm(term, seen);
TNode t2,
bool value) override;
void eqNotifyConstantTermMerge(TNode t1, TNode t2) override;
- void eqNotifyNewClass(TNode t) override;
+ void eqNotifyNewClass(TNode t) override {}
void eqNotifyMerge(TNode t1, TNode t2) override {}
void eqNotifyDisequal(TNode t1, TNode t2, TNode reason) override {}
};
/** Store a conflict from merging two constants */
void conflict(TNode a, TNode b);
- /** new equivalence class */
- void eqNotifyNewClass(TNode t);
-
std::unique_ptr<Slicer> d_slicer;
context::CDO<bool> d_isComplete;
unsigned d_lemmaThreshold;
}
else if (t.isConst())
{
- EqcInfo* ei = getOrMakeEqcInfo(t);
- ei->d_prefixC = t;
- ei->d_suffixC = t;
- return;
+ if (t.getType().isStringLike())
+ {
+ EqcInfo* ei = getOrMakeEqcInfo(t);
+ ei->d_prefixC = t;
+ ei->d_suffixC = t;
+ }
}
else if (k == STRING_CONCAT)
{
EqcInfo* e2 = getOrMakeEqcInfo(t2, false);
if (e2)
{
+ Assert(t1.getType().isStringLike());
EqcInfo* e1 = getOrMakeEqcInfo(t1);
// add information from e2 to e1
if (!e2->d_lengthTerm.get().isNull())
/** Called to set the decision manager. */
void setDecisionManager(DecisionManager* dm);
- /** Setup an ExtTheory module for this Theory. Can only be called once. */
- void setupExtTheory();
-
/**
* Return the current theory care graph. Theories should overload
* computeCareGraph to do the actual computation, and use addCarePair to add