mirror of https://github.com/YosysHQ/yosys.git
Removed undef feature from ezsat api
This commit is contained in:
parent
76f7c10cfc
commit
4d43331748
|
@ -146,7 +146,7 @@ contradiction:
|
|||
return false;
|
||||
|
||||
modelValues.clear();
|
||||
modelValues.resize(2 * modelIdx.size());
|
||||
modelValues.resize(modelIdx.size());
|
||||
|
||||
for (size_t i = 0; i < modelIdx.size(); i++)
|
||||
{
|
||||
|
@ -158,13 +158,7 @@ contradiction:
|
|||
|
||||
using namespace Minisat;
|
||||
lbool value = minisatSolver->modelValue(minisatVars.at(idx-1));
|
||||
if (value == l_Undef) {
|
||||
modelValues[i] = false;
|
||||
modelValues[modelIdx.size() + i] = true;
|
||||
} else {
|
||||
modelValues[i] = value == Minisat::lbool(refvalue);
|
||||
modelValues[modelIdx.size() + i] = false;
|
||||
}
|
||||
modelValues[i] = (value == Minisat::lbool(refvalue));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -101,9 +101,6 @@ public:
|
|||
// If you are planning on using the solver API (and not simply create a CNF) you must use a child class
|
||||
// of ezSAT that actually implements a solver backend, such as ezMiniSAT (see ezminisat.h).
|
||||
|
||||
// Note: Solvers that can output don't-care values for model variables return a twice as big modelValues
|
||||
// vector. The first half contains the values and the second half the don't-care flags.
|
||||
|
||||
virtual bool solver(const std::vector<int> &modelExpressions, std::vector<bool> &modelValues, const std::vector<int> &assumptions);
|
||||
|
||||
bool solve(const std::vector<int> &modelExpressions, std::vector<bool> &modelValues, const std::vector<int> &assumptions) {
|
||||
|
|
Loading…
Reference in New Issue