Properly printing INST_PATTERN_LIST by itself (#6507)
authorHaniel Barbosa <hanielbbarbosa@gmail.com>
Fri, 7 May 2021 20:28:44 +0000 (17:28 -0300)
committerGitHub <noreply@github.com>
Fri, 7 May 2021 20:28:44 +0000 (20:28 +0000)
Previously the SMT2 printer would print pattern lists wrong when they were not printed as part of a binder containing it. This commit fixes this by removing an unused hardcoded restriction that led to issues when printing the ASTs of proof nodes containing patterns.

src/printer/smt2/smt2_printer.cpp

index 9f9492cece0e951a25800319f942a5b4d2d4d445..ae8d377135f3a0c0d3b25bafbeb4b8c64adb8fee 100644 (file)
@@ -528,8 +528,7 @@ void Smt2Printer::toStream(std::ostream& out,
   bool stillNeedToPrintParams = true;
   bool forceBinary = false; // force N-ary to binary when outputing children
   // operator
-  if (n.getNumChildren() != 0 && k != kind::INST_PATTERN_LIST
-      && k != kind::CONSTRUCTOR_TYPE)
+  if (n.getNumChildren() != 0 && k != kind::CONSTRUCTOR_TYPE)
   {
     out << '(';
   }