示例#1
0
void reportResult(const SatSolver& solver, bool result)
{
   solver.printStats();
   cout << (result? "SAT" : "UNSAT") << endl;
   if (result) {
      for (size_t i = 0, n = gates.size(); i < n; ++i)
         cout << solver.getValue(gates[i]->getVar()) << endl;
   }
}
示例#2
0
void 
CirMgr::doSimBySAT(const SatSolver& s)
{
   unsigned* simValue = new unsigned[_piList.size()];
   for (unsigned i = 0, m=_piList.size(); i<m; ++i){
      int temp = s.getValue(getGateById(_piList[i])->getVar());
      if (temp == -1) temp = 0;
      simValue[i] = temp + (rand() & ~1u);
   }
   checkFec(simValue);
   delete[] simValue;
}