This fixes a potential crash in datatypes where a pending inference is not processed on a call to Theory::check. This ensures the pending set of inferences in datatypes is empty after each check. This also ensures the pending vectors are cleared before each check in datatypes.
{
exp.push_back(d_exp);
}
+ Trace("dt-lemma-debug")
+ << "DatatypesInference : " << d_conc << " via " << exp << std::endl;
return im->lemmaExp(d_conc, exp, {});
}
// assert the internal fact
bool TheoryDatatypes::preCheck(Effort level)
{
d_im.reset();
+ d_im.clearPending();
return false;
}
void TheoryDatatypes::postCheck(Effort level)
{
+ // Apply any last pending inferences, which may occur if the last processed
+ // fact was an internal one and triggered further internal inferences.
+ d_im.process();
if (level == EFFORT_LAST_CALL)
{
Assert(d_sygusExtension != nullptr);
TNode fact,
bool isInternal)
{
+ Trace("datatypes-debug") << "TheoryDatatypes::assertFact : " << fact
+ << ", isInternal = " << isInternal << std::endl;
// could be sygus-specific
if (d_sygusExtension)
{
}
d_pendingReqPhase.clear();
}
+void InferenceManagerBuffered::clearPending()
+{
+ d_pendingFact.clear();
+ d_pendingLem.clear();
+ d_pendingReqPhase.clear();
+}
void InferenceManagerBuffered::clearPendingFacts() { d_pendingFact.clear(); }
void InferenceManagerBuffered::clearPendingLemmas() { d_pendingLem.clear(); }
void InferenceManagerBuffered::clearPendingPhaseRequirements()
* phase requirements and clears d_pendingReqPhase.
*/
void doPendingPhaseRequirements();
+ /** Clear pending facts, lemmas, and phase requirements without processing */
+ void clearPending();
/** Clear pending facts, without processing */
void clearPendingFacts();
/** Clear pending lemmas, without processing */