./misat with the changes so far?indexOfNextLitToPropagategetNextDecisionLiteral()February 27, 2026
Typos en SAT-alumnes.cpp
return 10 when the CNF is SATISFIABLE and return 20 when it is not.SAT-alumnes.cpp takes the opposite convention, this does not affect the code, but it is better to follow the conventionreturn 10 with return 20 in the SAT-alumnes.cppDo experiments with unsatisfiable instances (with 300 variables).
indexOfNextLitToPropagate?bool propagateGivesConflict ( ) {
while ( indexOfNextLitToPropagate < modelStack.size() ) {
// propagate only the literal in modelStack[indexOfNextLitToPropagate]
++indexOfNextLitToPropagate;
for (uint i = 0; i < numClauses; ++i) {
bool someLitTrue = false;
int numUndefs = 0;
int lastLitUndef = 0;
for (uint k = 0; not someLitTrue and k < clauses[i].size(); ++k){
int val = currentValueInModel(clauses[i][k]);
if (val == TRUE) someLitTrue = true;
else if (val == UNDEF){ ++numUndefs; lastLitUndef = clauses[i][k]; }
}
if (not someLitTrue and numUndefs == 0) return true; // conflict! all lits false
else if (not someLitTrue and numUndefs == 1) setLiteralToTrue(lastLitUndef);
}
}
return false;
}indexOfNextLitToPropagate is a way to use modelStack also as a queue of the literals to propagate. It points at the beginning of the queue.
Unit propagation can be faster than kissat! why?
getNextDecisionLiteral()\varphi\sim \mathcal{R}(n,m,k) is sampled according to the following process:
Is \varphi\sim \mathcal{R}(n,3,k) satisfiable?
Is \varphi\sim\mathcal{R}(n,n^2,k) satisfiable?
Conjecture:
For every k\geq 2, there is a value \delta_k, s.t. for every \epsilon,
What is known