summaryrefslogtreecommitdiff
path: root/src/prop/cnf_stream.h
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/prop/cnf_stream.h
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/prop/cnf_stream.h')
-rw-r--r--src/prop/cnf_stream.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/prop/cnf_stream.h b/src/prop/cnf_stream.h
index aec4257f2..f538a60a1 100644
--- a/src/prop/cnf_stream.h
+++ b/src/prop/cnf_stream.h
@@ -34,6 +34,8 @@
namespace CVC4 {
+class OutputManager;
+
namespace prop {
class PropEngine;
@@ -56,6 +58,9 @@ class CnfStream {
/** The SAT solver we will be using */
SatSolver* d_satSolver;
+ /** Reference to the output manager of the smt engine */
+ OutputManager* d_outMgr;
+
/** Boolean variables that we translated */
context::CDList<TNode> d_booleanVariables;
@@ -166,12 +171,17 @@ class CnfStream {
* @param satSolver the sat solver to use.
* @param registrar the entity that takes care of preregistration of Nodes.
* @param context the context that the CNF should respect.
+ * @param outMgr Reference to the output manager of the smt engine. Assertions
+ * will not be dumped if outMgr == nullptr.
* @param fullLitToNodeMap maintain a full SAT-literal-to-Node mapping.
* @param name string identifier to distinguish between different instances
* even for non-theory literals.
*/
- CnfStream(SatSolver* satSolver, Registrar* registrar,
- context::Context* context, bool fullLitToNodeMap = false,
+ CnfStream(SatSolver* satSolver,
+ Registrar* registrar,
+ context::Context* context,
+ OutputManager* outMgr = nullptr,
+ bool fullLitToNodeMap = false,
std::string name = "");
/**
@@ -256,6 +266,8 @@ class TseitinCnfStream : public CnfStream {
* @param satSolver the sat solver to use
* @param registrar the entity that takes care of pre-registration of Nodes
* @param context the context that the CNF should respect.
+ * @param outMgr reference to the output manager of the smt engine. Assertions
+ * will not be dumped if outMgr == nullptr.
* @param rm the resource manager of the CNF stream
* @param fullLitToNodeMap maintain a full SAT-literal-to-Node mapping,
* even for non-theory literals
@@ -263,6 +275,7 @@ class TseitinCnfStream : public CnfStream {
TseitinCnfStream(SatSolver* satSolver,
Registrar* registrar,
context::Context* context,
+ OutputManager* outMgr,
ResourceManager* rm,
bool fullLitToNodeMap = false,
std::string name = "");
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback