summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-01-20 12:59:13 -0600
committerGitHub <noreply@github.com>2021-01-20 12:59:13 -0600
commit273219488df1068a1abd444fc677bee57748bc32 (patch)
treefe7b94eaf011f5a26302a499e840ab9f77c3db19 /src/theory/quantifiers
parent6235612ddfdd59432eedf771a65c248d5b3d0469 (diff)
Fix corner case of wrongly applied selector as trigger (#5786)
Fixes #5766.
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r--src/theory/quantifiers/ematching/candidate_generator.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/theory/quantifiers/ematching/candidate_generator.cpp b/src/theory/quantifiers/ematching/candidate_generator.cpp
index 728ba61e8..0fd5249e8 100644
--- a/src/theory/quantifiers/ematching/candidate_generator.cpp
+++ b/src/theory/quantifiers/ematching/candidate_generator.cpp
@@ -279,20 +279,25 @@ CandidateGeneratorSelector::CandidateGeneratorSelector(QuantifiersEngine* qe,
d_selOp = qe->getTermDatabase()->getMatchOperator(mpatExp[1]);
d_ufOp = qe->getTermDatabase()->getMatchOperator(mpatExp[2]);
}
- else
+ else if (mpatExp.getKind() == APPLY_SELECTOR_TOTAL)
{
// corner case of datatype with one constructor
- Assert(mpatExp.getKind() == APPLY_SELECTOR_TOTAL);
d_selOp = qe->getTermDatabase()->getMatchOperator(mpatExp);
}
+ else
+ {
+ // corner case of a wrongly applied selector as a trigger
+ Assert(mpatExp.getKind() == APPLY_UF);
+ d_ufOp = qe->getTermDatabase()->getMatchOperator(mpatExp);
+ }
Assert(d_selOp != d_ufOp);
}
void CandidateGeneratorSelector::reset(Node eqc)
{
Trace("sel-trigger-debug") << "Reset in eqc=" << eqc << std::endl;
- // start with d_selOp
- resetForOperator(eqc, d_selOp);
+ // start with d_selOp, if it exists
+ resetForOperator(eqc, !d_selOp.isNull()? d_selOp : d_ufOp);
}
Node CandidateGeneratorSelector::getNextCandidate()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback