summaryrefslogtreecommitdiff
path: root/src/preprocessing
diff options
context:
space:
mode:
authorAbdalrhman Mohamed <32971963+abdoo8080@users.noreply.github.com>2020-09-16 12:45:01 -0500
committerGitHub <noreply@github.com>2020-09-16 12:45:01 -0500
commit2c2f05c96e021006275a2bc70b9ede70b280616d (patch)
treedb702d7b8fbd14dd8003b1f03c02b77c89d2fced /src/preprocessing
parent0534ea1bbee9a3a7049580449ab25025a4f92a9a (diff)
Dump commands in internal code using command printing functions. (#5040)
This is work towards migrating commands to the new API. Internal code that creates command objects just for dumping is replaced with direct calls to functions that print the those commands.
Diffstat (limited to 'src/preprocessing')
-rw-r--r--src/preprocessing/preprocessing_pass.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/preprocessing/preprocessing_pass.cpp b/src/preprocessing/preprocessing_pass.cpp
index 965edcd2f..cd2a51c45 100644
--- a/src/preprocessing/preprocessing_pass.cpp
+++ b/src/preprocessing/preprocessing_pass.cpp
@@ -18,6 +18,7 @@
#include "smt/dump.h"
#include "smt/smt_statistics_registry.h"
+#include "printer/printer.h"
namespace CVC4 {
namespace preprocessing {
@@ -39,8 +40,13 @@ void PreprocessingPass::dumpAssertions(const char* key,
if (Dump.isOn("assertions") && Dump.isOn(std::string("assertions:") + key))
{
// Push the simplified assertions to the dump output stream
- for (const auto& n : assertionList) {
- Dump("assertions") << AssertCommand(Expr(n.toExpr()));
+ OutputManager& outMgr = d_preprocContext->getSmt()->getOutputManager();
+ const Printer& printer = outMgr.getPrinter();
+ std::ostream& out = outMgr.getDumpOut();
+
+ for (const auto& n : assertionList)
+ {
+ printer.toStreamCmdAssert(out, n);
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback