Inside CP-SAT: SAT Translation and CDCL
How CP-SAT translates finite-domain constraint problems into Boolean satisfiability (SAT) clauses, and how the underlying solver searches using Boolean Constraint Propagation (BCP) and Conflict-Driven Clause Learning (CDCL) with non-chronological backjumping.
Tutorial
Direct Encoding of CP Variables into SAT
CP-SAT solves a constraint problem by rewriting it as a set of Boolean clauses and passing the result to a SAT engine. The first step is replacing every finite-domain variable with a collection of Booleans.
The direct encoding of a CP variable with domain introduces Boolean variables
where is true iff the CP variable takes the value .
Two families of clauses guarantee that takes exactly one value:
At-least-one (ALO): a single clause
At-most-one (AMO, pairwise): for every pair ,
The AMO family contributes clauses, one per pair of domain values.
Mini-example. For we get Booleans and clauses: