summaryrefslogtreecommitdiff
path: root/src/prop
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-03-30 03:59:05 +0000
committerMorgan Deters <mdeters@gmail.com>2011-03-30 03:59:05 +0000
commit10cabf82a20258da80be53eb6d23b1a536e82eb5 (patch)
treed8262298ed5fba5a3c51681cc5739551747f7a90 /src/prop
parentd35d086268fa2a3d9b3c387157e4c54f1b967e0e (diff)
Add Valuation::getSatValue() so that theories can access the current
(propositional) assignment for theory atoms. Fixed Debug/Trace as discussed in bug ticket #252 and on the mailing list. This implementation leads to some compiler warnings in production builds, but these will be corrected in coming days. There appears to be a small speedup in the parser as a result of this fix: http://goedel.cims.nyu.edu/regress-results/compare_jobs.php?job_id=1902&reference_id=1886&p=5 Cleaned up a few CD Boolean attribute things. Various small fixes to coding guidelines / test coverage. This commit: * Resolves bug 252 (tracing not disabled in production builds) * Resolves bug 254 (implement CDAttrHash<>::BitIterator::find())
Diffstat (limited to 'src/prop')
-rw-r--r--src/prop/minisat/core/Solver.cc6
-rw-r--r--src/prop/prop_engine.cpp5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/prop/minisat/core/Solver.cc b/src/prop/minisat/core/Solver.cc
index 6703a44be..4781fd8cf 100644
--- a/src/prop/minisat/core/Solver.cc
+++ b/src/prop/minisat/core/Solver.cc
@@ -266,7 +266,7 @@ bool Solver::addClause_(vec<Lit>& ps, ClauseType type)
void Solver::attachClause(CRef cr) {
const Clause& c = ca[cr];
- CVC4::Debug("minisat") << "Solver::attachClause(" << c << ")" << std::endl;
+ Debug("minisat") << "Solver::attachClause(" << c << ")" << std::endl;
Assert(c.size() > 1);
watches[~c[0]].push(Watcher(cr, c[1]));
watches[~c[1]].push(Watcher(cr, c[0]));
@@ -276,7 +276,7 @@ void Solver::attachClause(CRef cr) {
void Solver::detachClause(CRef cr, bool strict) {
const Clause& c = ca[cr];
- CVC4::Debug("minisat") << "Solver::detachClause(" << c << ")" << std::endl;
+ Debug("minisat") << "Solver::detachClause(" << c << ")" << std::endl;
assert(c.size() > 1);
if (strict){
@@ -294,7 +294,7 @@ void Solver::detachClause(CRef cr, bool strict) {
void Solver::removeClause(CRef cr) {
Clause& c = ca[cr];
- CVC4::Debug("minisat") << "Solver::removeClause(" << c << ")" << std::endl;
+ Debug("minisat") << "Solver::removeClause(" << c << ")" << std::endl;
detachClause(cr);
// Don't leave pointers to free'd memory!
if (locked(c)) vardata[var(c[0])].reason = CRef_Undef;
diff --git a/src/prop/prop_engine.cpp b/src/prop/prop_engine.cpp
index 4939ecb43..d64aadc96 100644
--- a/src/prop/prop_engine.cpp
+++ b/src/prop/prop_engine.cpp
@@ -5,7 +5,7 @@
** Major contributors: cconway, dejan
** Minor contributors (to current version): taking
** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
** Courant Institute of Mathematical Sciences
** New York University
** See the file COPYING in the top-level source directory for licensing
@@ -137,8 +137,7 @@ Result PropEngine::checkSat() {
}
Node PropEngine::getValue(TNode node) {
- Assert(node.getKind() == kind::VARIABLE &&
- node.getType().isBoolean());
+ Assert(node.getType().isBoolean());
SatLiteralValue v = d_satSolver->value(d_cnfStream->getLiteral(node));
if(v == l_True) {
return NodeManager::currentNM()->mkConst(true);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback