summaryrefslogtreecommitdiff
path: root/src/theory/valuation.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-10-05 23:51:57 +0000
committerMorgan Deters <mdeters@gmail.com>2011-10-05 23:51:57 +0000
commita8d7333d8fb03c95ef3d1d7d9501076b97add756 (patch)
tree9f217a8cdb8905dea26529684584b401c4a47323 /src/theory/valuation.cpp
parent9bdf1355af20c4dd2b97ea9bc5f34cc20fbdde0f (diff)
ensureLiteral() in CNF stream to support Andy's quantifiers work; an update to model gen on booleans; and a little cleanup
Diffstat (limited to 'src/theory/valuation.cpp')
-rw-r--r--src/theory/valuation.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/theory/valuation.cpp b/src/theory/valuation.cpp
index 9375998f9..148b95632 100644
--- a/src/theory/valuation.cpp
+++ b/src/theory/valuation.cpp
@@ -19,6 +19,7 @@
#include "expr/node.h"
#include "theory/valuation.h"
#include "theory/theory_engine.h"
+#include "theory/rewriter.h"
namespace CVC4 {
namespace theory {
@@ -49,5 +50,15 @@ bool Valuation::hasSatValue(TNode n, bool& value) const {
return d_engine->getPropEngine()->hasValue(n, value);
}
+Node Valuation::ensureLiteral(TNode n) {
+ Debug("ensureLiteral") << "rewriting: " << n << std::endl;
+ Node rewritten = Rewriter::rewrite(n);
+ Debug("ensureLiteral") << " got: " << rewritten << std::endl;
+ Node preprocessed = d_engine->preprocess(rewritten);
+ Debug("ensureLiteral") << "preproced: " << preprocessed << std::endl;
+ d_engine->getPropEngine()->ensureLiteral(preprocessed);
+ return preprocessed;
+}
+
}/* CVC4::theory namespace */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback