|
ADS
Algorithms and Data Structures
|
Two solvers of the satisfiability of a formula in conjunctive normal form [see Problems.h for the formula and the backtrack of the reductions], after Knuth (section 7.2.2.2 of The Art of Computer Programming), beyond the book. More...
#include "ADS/Contract.h"#include "ADS/complexity/Problems.h"#include <algorithm>#include <cstdlib>#include <optional>#include <queue>#include <utility>#include <vector>#include "ADS/backtrack/impl/SatSolvers.tpp"Go to the source code of this file.
Classes | |
| class | ADS::BasicCdcl< Heap > |
| conflict-driven clause learning with two watched literals, the free variables by activity in a Heap of pairs \( ( \mathit{activity} , v ) \), the largest on top: std::priority_queue by default, or a heap of Boost or of ADS [see DaryHeap.h], with the same decisions and conflicts, since the pairs are ordered totally More... | |
Namespaces | |
| namespace | ADS |
Typedefs | |
| using | ADS::Cdcl = BasicCdcl<> |
| the clause learning on std::priority_queue | |
Functions | |
| std::optional< std::vector< bool > > | ADS::dpll (const Cnf &F, int n) |
| a model of the formula \( F \) of \( n \) variables by DPLL, the variables left free false, or nothing if \( F \) is unsatisfiable | |
Two solvers of the satisfiability of a formula in conjunctive normal form [see Problems.h for the formula and the backtrack of the reductions], after Knuth (section 7.2.2.2 of The Art of Computer Programming), beyond the book.
The contracts [see Contract.h]: the literals are \( \pm ( v + 1 ) \) with \( v \in [ 0 , n ) \); a model returned passes satCertificate(), a postcondition. A formula declared unsatisfiable has no certificate here (a proof of the learned clauses, as DRAT, would be one). The functions are defined in SatSolvers.tpp.