Minor simplification to boolean proof checker (#6590)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Fri, 21 May 2021 20:48:39 +0000 (15:48 -0500)
committerGitHub <noreply@github.com>
Fri, 21 May 2021 20:48:39 +0000 (15:48 -0500)
src/theory/booleans/proof_checker.cpp

index 2d2155f445f93e4bf7351c9c6db37a20f073fd74..d0461248cf8e01497ba4f05b92386148f855f084 100644 (file)
@@ -157,10 +157,7 @@ Node BoolProofRuleChecker::checkInternal(PfRule id,
       return Node::null();
     }
     NodeManager* nm = NodeManager::currentNM();
-    return disjuncts.empty()
-               ? nm->mkConst<bool>(false)
-               : disjuncts.size() == 1 ? disjuncts[0]
-                                       : nm->mkNode(kind::OR, disjuncts);
+    return nm->mkOr(disjuncts);
   }
   if (id == PfRule::REORDERING)
   {
@@ -297,10 +294,7 @@ Node BoolProofRuleChecker::checkInternal(PfRule id,
       Trace("bool-pfcheck") << i << ": added lits: " << added << "\n\n";
     }
     Trace("bool-pfcheck") << "clause: " << clauseNodes << "\n" << pop;
-    return clauseNodes.empty()
-               ? nm->mkConst(false)
-               : clauseNodes.size() == 1 ? clauseNodes[0]
-                                         : nm->mkNode(kind::OR, clauseNodes);
+    return nm->mkOr(clauseNodes);
   }
   if (id == PfRule::MACRO_RESOLUTION_TRUST)
   {