summaryrefslogtreecommitdiff
path: root/src/decision
diff options
context:
space:
mode:
authorKshitij Bansal <kshitij@cs.nyu.edu>2012-08-26 19:53:14 +0000
committerKshitij Bansal <kshitij@cs.nyu.edu>2012-08-26 19:53:14 +0000
commit1857318ff8b072e07bc0a802960a7b87f119688d (patch)
treeab8611efe47d95819ab77c2e0f0b2f1da614fcf1 /src/decision
parent81f24e2d49dc9e598339304f3a72598d177f422c (diff)
minor, lying around in a wd (related to investigating bug 374)
Diffstat (limited to 'src/decision')
-rw-r--r--src/decision/justification_heuristic.cpp7
-rw-r--r--src/decision/justification_heuristic.h15
2 files changed, 14 insertions, 8 deletions
diff --git a/src/decision/justification_heuristic.cpp b/src/decision/justification_heuristic.cpp
index c7051d570..67000b1ba 100644
--- a/src/decision/justification_heuristic.cpp
+++ b/src/decision/justification_heuristic.cpp
@@ -164,7 +164,12 @@ bool JustificationHeuristic::findSplitterRec(TNode node,
Assert(desiredVal != SAT_VALUE_UNKNOWN, "expected known value");
/* Good luck, hope you can get what you want */
- Assert(litVal == desiredVal || litVal == SAT_VALUE_UNKNOWN,
+ // if(not (litVal == desiredVal || litVal == SAT_VALUE_UNKNOWN)) {
+ // Warning() << "WARNING: IMPORTANT: Please look into this. Sat solver is asking for a decision" << std::endl
+ // << "when the assertion we are trying to justify is already unsat. OR there is a bug" << std::endl;
+ // GiveUpException();
+ // }
+ Assert(litVal == desiredVal || litVal == SAT_VALUE_UNKNOWN,
"invariant violated");
/* What type of node is this */
diff --git a/src/decision/justification_heuristic.h b/src/decision/justification_heuristic.h
index f0ae9fe78..6d9493e89 100644
--- a/src/decision/justification_heuristic.h
+++ b/src/decision/justification_heuristic.h
@@ -111,13 +111,18 @@ public:
}
for(unsigned i = d_prvsIndex; i < d_assertions.size(); ++i) {
- Debug("decision") << d_assertions[i] << std::endl;
+ Debug("decision") << "---" << std::endl << d_assertions[i] << std::endl;
// Sanity check: if it was false, aren't we inconsistent?
Assert( tryGetSatValue(d_assertions[i]) != SAT_VALUE_FALSE);
SatValue desiredVal = SAT_VALUE_TRUE;
- SatLiteral litDecision = findSplitter(d_assertions[i], desiredVal);
+ SatLiteral litDecision;
+ try {
+ litDecision = findSplitter(d_assertions[i], desiredVal);
+ }catch(GiveUpException &e) {
+ return prop::undefSatLiteral;
+ }
if(litDecision != undefSatLiteral)
return litDecision;
@@ -180,11 +185,7 @@ private:
{
bool ret;
SatLiteral litDecision;
- try {
- ret = findSplitterRec(node, desiredVal, &litDecision);
- }catch(GiveUpException &e) {
- return prop::undefSatLiteral;
- }
+ ret = findSplitterRec(node, desiredVal, &litDecision);
if(ret == true) {
Debug("decision") << "Yippee!!" << std::endl;
//d_prvsIndex = i;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback