Disable minisat elimination when models are on
authorClark Barrett <barrett@cs.nyu.edu>
Mon, 29 Oct 2012 13:50:54 +0000 (13:50 +0000)
committerClark Barrett <barrett@cs.nyu.edu>
Mon, 29 Oct 2012 13:50:54 +0000 (13:50 +0000)
src/smt/smt_engine.cpp

index 55ac15ebcdf7ea4af6450c282d7829a92082a40f..ca8417deae6bb5f82dc40b52e1fc4186c9ddc47e 100644 (file)
@@ -62,6 +62,7 @@
 #include "theory/model.h"
 #include "printer/printer.h"
 #include "prop/options.h"
+#include "theory/arrays/options.h"
 
 using namespace std;
 using namespace CVC4;
@@ -833,12 +834,28 @@ void SmtEngine::setLogicInternal() throw() {
     }
   }
 
-  //until bug 371 is fixed
+  //until bugs 371,431 are fixed
   if( ! options::minisatUseElim.wasSetByUser()){
-    if( d_logic.isQuantified() ){
+    if( d_logic.isQuantified() || options::produceModels() ){
       options::minisatUseElim.set( false );
     }
   }
+  else if (options::minisatUseElim()) {
+    if (options::produceModels()) {
+      Notice() << "SmtEngine: turning off produce-models to support minisatUseElim" << std::endl;
+      setOption("produce-models", SExpr("false"));
+    }
+    if (options::checkModels()) {
+      Notice() << "SmtEngine: turning off check-models to support minisatUseElim" << std::endl;
+      setOption("check-models", SExpr("false"));
+    }
+  }
+
+  // For now, these array theory optimizations do not support model-building
+  if (options::produceModels()) {
+    options::arraysOptimizeLinear.set(false);
+    options::arraysLazyRIntro1.set(false);
+  }
 }
 
 void SmtEngine::setInfo(const std::string& key, const CVC4::SExpr& value)