Simplify --help=decision with only currently supported options
authorKshitij Bansal <kshitij@cs.nyu.edu>
Tue, 27 Nov 2012 19:02:50 +0000 (19:02 +0000)
committerKshitij Bansal <kshitij@cs.nyu.edu>
Tue, 27 Nov 2012 19:02:50 +0000 (19:02 +0000)
Add notice/warning when using incremental-mode + decision (it was
already disabled)

Some other minor cleanup

(this commit was certified error- and warning-free by the test-and-commit script.)

src/decision/decision_engine.cpp
src/decision/justification_heuristic.cpp
src/decision/justification_heuristic.h
src/decision/options_handlers.h

index d5c819ace5e4e96c3f87d0f693fdd8e47f2d7ed5..22c70eb6d3ebde67b3557e9ac67d0021a6998a1c 100644 (file)
@@ -50,8 +50,18 @@ void DecisionEngine::init()
   d_engineState = 1;
 
   Trace("decision-init") << "DecisionEngine::init()" << std::endl;
-  if(options::incrementalSolving()) return;
-
+  if(options::incrementalSolving()) {
+    if(options::decisionMode() != decision::DECISION_STRATEGY_INTERNAL) {
+      if(options::decisionMode.wasSetByUser()) {
+        Warning() << "Ignorning decision option since using incremental mode (currently not supported together)"
+                  << std::endl;
+      } else {
+        Notice() << "Using internal decision heuristic since using incremental mode (not supported currently)"
+                 << std::endl;
+      }
+    }
+    return;
+  }
   Trace("decision-init") << " * options->decisionMode: " 
                          << options::decisionMode() << std:: endl;
   Trace("decision-init") << " * options->decisionStopOnly: "
index c588c2d92a9baa605488a6fc6a0aa8817c73400a..ba8ab91b7b299707b7feeb64d4195834b683caa3 100644 (file)
@@ -11,8 +11,7 @@
  **
  ** \brief Justification heuristic for decision making
  **
- ** A ATGP-inspired justification-based decision heuristic. See
- ** [insert reference] for more details. This code is, or not, based
+ ** A ATGP-inspired justification-based decision heuristic. This code is based
  ** on the CVC3 implementation of the same heuristic -- note below.
  **
  ** It needs access to the simplified but non-clausal formula.
 #include "theory/rewriter.h"
 #include "util/ite_removal.h"
 
-/***
-Here's the main idea
-
-   Given a boolean formula "node", the goal is to try to make it
-evaluate to "desiredVal" (true/false). for instance if "node" is a AND
-formula we want to make it evaluate to true, we'd like one of the
-children to be true. this is done recursively.
-
-***/
-
-/*
-
-CVC3 code <---->  this code
- value            desiredVal
- getValue(lit)    litVal
-
-***/
-
-
-// Local helper functions for just this file
-
-
-
 // JustificationHeuristic stuff
 
 void JustificationHeuristic::setJustified(TNode n)
index 5669ae79df2c7ee48bb1f5410a8ac4b68e97f32a..a3b05b1bb29d4c6bfddf553237b046200e102cd4 100644 (file)
@@ -130,7 +130,7 @@ public:
 
     Trace("decision") << "jh: Nothing to split on " << std::endl;
 
-#if defined CVC4_ASSERTIONS || defined CVC4_DEBUG
+#if defined CVC4_DEBUG
     bool alljustified = true;
     for(unsigned i = 0 ; i < d_assertions.size() && alljustified ; ++i) {
       TNode curass = d_assertions[i];
@@ -176,10 +176,6 @@ public:
     }
   }
 
-  /* Compute justified */
-  /*bool computeJustified() {
-    
-  }*/
 private:
   SatLiteral findSplitter(TNode node, SatValue desiredVal)
   {
@@ -188,7 +184,6 @@ private:
     ret = findSplitterRec(node, desiredVal, &litDecision);
     if(ret == true) {
       Debug("decision") << "Yippee!!" << std::endl;
-      //d_prvsIndex = i;
       ++d_helfulness;
       return litDecision;
     } else {
@@ -198,7 +193,6 @@ private:
   
   /** 
    * Do all the hard work. 
-   * @param findFirst returns
    */ 
   bool findSplitterRec(TNode node, SatValue value, SatLiteral* litDecision);
 
index fd05a0c9f042be8d3fcff8b85d237563597db2ac..826bd8acb0c91f589469f32fc0298a08b6a20dcd 100644 (file)
@@ -36,6 +36,9 @@ justification\n\
 \n\
 justification-stoponly\n\
 + Use the justification heuristic only to stop early, not for decisions\n\
+";
+/** Under-development options, commenting out from help for the release */
+/*
 \n\
 relevancy\n\
 + Under development may-relevancy\n\
@@ -52,7 +55,7 @@ justification-rel\n\
 justification-must\n\
 + Start deciding on literals close to root instead of those\n\
 + near leaves (don't expect it to work well) [Unimplemented]\n\
-";
+";*/
 
 inline DecisionMode stringToDecisionMode(std::string option, std::string optarg, SmtEngine* smt) throw(OptionException) {
   options::decisionRelevancyLeaves.set(false);