Shorten explanation for strings inference I_Norm_S (#3051)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 13 Jun 2019 18:08:15 +0000 (13:08 -0500)
committerGitHub <noreply@github.com>
Thu, 13 Jun 2019 18:08:15 +0000 (13:08 -0500)
src/theory/strings/theory_strings.cpp

index 67f0321938cb54259c3a3554e7f3826b73c4c733..ba0c16d025f875f2f0d7b1996748ee9a3508288d 100644 (file)
@@ -1464,6 +1464,7 @@ void TheoryStrings::checkInit() {
                 Trace("strings-process-debug") << "  congruent term by singular : " << n << " " << c[0] << std::endl;
                 //singular case
                 if( !areEqual( c[0], n ) ){
+                  Node ns;
                   std::vector< Node > exp;
                   //explain empty components
                   bool foundNEmpty = false;
@@ -1474,15 +1475,13 @@ void TheoryStrings::checkInit() {
                       }
                     }else{
                       Assert( !foundNEmpty );
-                      if( n[i]!=c[0] ){
-                        exp.push_back( n[i].eqNode( c[0] ) );
-                      }
+                      ns = n[i];
                       foundNEmpty = true;
                     }
                   }
                   AlwaysAssert( foundNEmpty );
                   //infer the equality
-                  sendInference( exp, n.eqNode( c[0] ), "I_Norm_S" );
+                  sendInference(exp, n.eqNode(ns), "I_Norm_S");
                 }
                 d_congruent.insert( n );
                 congruent[k]++;