Minor fix for printing nullary operators in smt2 (#8577)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 7 Apr 2022 12:48:38 +0000 (07:48 -0500)
committerGitHub <noreply@github.com>
Thu, 7 Apr 2022 12:48:38 +0000 (12:48 +0000)
src/printer/smt2/smt2_printer.cpp
src/smt/listeners.h

index 91c5dc185ab53028720170f7d9e5bfe4fdaf6af8..c9199c64d92351a4268fd26994930ca45b40d11f 100644 (file)
@@ -943,7 +943,11 @@ void Smt2Printer::toStream(std::ostream& out,
   case kind::INST_PATTERN_LIST: break;
   default:
     // by default, print the kind using the smtKindString utility
-    out << smtKindString(k, d_variant) << " ";
+    out << smtKindString(k, d_variant);
+    if (n.getNumChildren() > 0)
+    {
+      out << " ";
+    }
     break;
   }
   if( n.getMetaKind() == kind::metakind::PARAMETERIZED &&
index e327ddf53ec96f8f7d6cd3db1d193cbe2dc8ec67..8a5e24002aa8940ca6bfbd94b99cb83b8703391b 100644 (file)
@@ -25,7 +25,6 @@
 
 namespace cvc5::internal {
 
-class OutputManager;
 class SolverEngine;
 
 namespace smt {