Changed aig_bitblaster to work with cryptominisat
authorlianah <lianahady@gmail.com>
Thu, 26 May 2016 23:05:01 +0000 (19:05 -0400)
committerlianah <lianahady@gmail.com>
Thu, 26 May 2016 23:05:01 +0000 (19:05 -0400)
src/theory/bv/aig_bitblaster.cpp
src/theory/bv/bitblaster_template.h

index 098582433acd9648aac7058319ed54fed8728822..37e9f4476ff4f2f6f34af6cec46c2586f798d481 100644 (file)
@@ -140,10 +140,24 @@ AigBitblaster::AigBitblaster()
   , d_bbAtoms()
   , d_aigOutputNode(NULL)
 {
-  d_nullContext = new context::Context(); 
-  d_satSolver = prop::SatSolverFactory::createMinisat(d_nullContext, smtStatisticsRegistry(), "AigBitblaster");
-  MinisatEmptyNotify* notify = new MinisatEmptyNotify();
-  d_satSolver->setNotify(notify);
+  d_nullContext = new context::Context();
+  switch(options::bvSatSolver()) {
+  case SAT_SOLVER_MINISAT: {
+    prop::BVSatSolverInterface* minisat = prop::SatSolverFactory::createMinisat(d_nullContext,
+                                                                                smtStatisticsRegistry(),
+                                                                                "AigBitblaster");
+    MinisatEmptyNotify* notify = new MinisatEmptyNotify();
+    minisat->setNotify(notify);
+    d_satSolver = minisat;
+    break;
+  }
+  case SAT_SOLVER_CRYPTOMINISAT:
+    d_satSolver = prop::SatSolverFactory::createCryptoMinisat(smtStatisticsRegistry(),
+                                                              "AigBitblaster");
+    break;
+  default:
+    Unreachable("Unknown SAT solver type");
+  }
 }
 
 AigBitblaster::~AigBitblaster() {
index f9f5361d3f57f6a9d2dc450a6291089e3a0521a8..929bccada3e0831e1a16c3d8cfa1454e290ebe61 100644 (file)
@@ -306,7 +306,7 @@ class AigBitblaster : public TBitblaster<Abc_Obj_t*> {
   
   static Abc_Ntk_t* abcAigNetwork;
   context::Context* d_nullContext;
-  prop::BVSatSolverInterface* d_satSolver;
+  prop::SatSolver* d_satSolver;
   TNodeAigMap d_aigCache;
   NodeAigMap d_bbAtoms;