diff options
Diffstat (limited to 'src/prop/cnf_stream.cpp')
-rw-r--r-- | src/prop/cnf_stream.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/prop/cnf_stream.cpp b/src/prop/cnf_stream.cpp index 3a4fa781a..d18ec6e69 100644 --- a/src/prop/cnf_stream.cpp +++ b/src/prop/cnf_stream.cpp @@ -175,7 +175,15 @@ SatLiteral CnfStream::newLiteral(TNode node, bool theoryLiteral) { SatLiteral lit; if (!hasLiteral(node)) { // If no literal, we'll make one - lit = SatLiteral(d_satSolver->newVar(theoryLiteral)); + if (node.getKind() == kind::CONST_BOOLEAN) { + if (node.getConst<bool>()) { + lit = SatLiteral(d_satSolver->trueVar()); + } else { + lit = SatLiteral(d_satSolver->falseVar()); + } + } else { + lit = SatLiteral(d_satSolver->newVar(theoryLiteral)); + } d_translationCache[node].literal = lit; d_translationCache[node.notNode()].literal = ~lit; } else { |