Fixes #7937.
bool RelevanceManager::computeRelevanceFor(TNode input)
{
int32_t val = justify(input);
- if (val != 1)
+ if (val == -1)
{
// if we are in full effort check and fail to justify, then we should
// give a failure and set success to false, or otherwise calls to
- // isRelevant cannot be trusted.
+ // isRelevant cannot be trusted. It might also be the case that the
+ // assertion has no value (val == 0), since it may correspond to an
+ // irrelevant Skolem definition, in this case we don't throw a warning.
if (d_inFullEffortCheck)
{
std::stringstream serr;
void TheoryEngine::checkTheoryAssertionsWithModel(bool hardFailure) {
bool hasFailure = false;
std::stringstream serror;
+ // If possible, get the list of relevant assertions. Those that are not
+ // relevant will be skipped.
+ std::unordered_set<TNode> relevantAssertions;
+ bool hasRelevantAssertions = false;
+ if (d_relManager != nullptr)
+ {
+ relevantAssertions =
+ d_relManager->getRelevantAssertions(hasRelevantAssertions);
+ }
for(TheoryId theoryId = THEORY_FIRST; theoryId < THEORY_LAST; ++theoryId) {
Theory* theory = d_theoryTable[theoryId];
if(theory && d_logicInfo.isTheoryEnabled(theoryId)) {
it != it_end;
++it) {
Node assertion = (*it).d_assertion;
- if (!isRelevant(assertion))
+ if (hasRelevantAssertions
+ && relevantAssertions.find(assertion) == relevantAssertions.end())
{
// not relevant, skip
continue;
regress1/issue5101-alira-subtypes.smt2
regress1/issue5739-rtf-processed.smt2
regress1/issue7902-abd-subsolver-uc.smt2
+ regress1/issue7937-difficulty-irr.smt2
regress1/lemmas/clocksynchro_5clocks.main_invar.base.smtv1.smt2
regress1/lemmas/pursuit-safety-8.smtv1.smt2
regress1/minimal_unsat_core.smt2
--- /dev/null
+; COMMAND-LINE: --produce-difficulty -q
+; EXPECT: sat
+(set-logic ALL)
+(declare-const x Bool)
+(declare-fun a () Real)
+(declare-fun r () Real)
+(assert (xor (= 0 (/ 0 a)) (and x (= 0.0 (/ r a r)))))
+(check-sat)