Ensure legal candidate equalities when using relational triggers (#4035)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 12 Mar 2020 18:34:18 +0000 (13:34 -0500)
committerGitHub <noreply@github.com>
Thu, 12 Mar 2020 18:34:18 +0000 (13:34 -0500)
src/theory/quantifiers/ematching/candidate_generator.cpp

index 8e09ef6a251353689db80ae61a135e3fa4474756..2a123e59cc04e0caa27b66d495c9335a3d89c3d6 100644 (file)
@@ -146,7 +146,9 @@ Node CandidateGeneratorQELitDeq::getNextCandidate(){
     Node n = (*d_eqc_false);
     ++d_eqc_false;
     if( n.getKind()==d_match_pattern.getKind() ){
-      if( n[0].getType().isComparableTo( d_match_pattern_type ) ){
+      if (n[0].getType().isComparableTo(d_match_pattern_type)
+          && isLegalCandidate(n))
+      {
         //found an iff or equality, try to match it
         //DO_THIS: cache to avoid redundancies?
         //DO_THIS: do we need to try the symmetric equality for n?  or will it also exist in the eq class of false?