Abstract
This paper introduces a generalized framework for "nogood learning"—the process of learning from search failures—designed to work directly with multi-valued variables and complex constraints. By bridging the gap between the raw speed of SAT solvers and the expressiveness of Constraint Programming (CP), the authors developed CMVSAT-2, a solver that demonstrates significant robustness across diverse and challenging problem domains compared to specialized SAT, CP, or MIP solvers.
Introduction
In automated reasoning, a fundamental trade-off exists between speed and expressiveness. SAT solvers are highly efficient, utilizing conflict-driven clause learning (CDCL) to avoid redundant search paths, but they require problems to be encoded into simple Boolean variables. Conversely, Constraint Programming (CP) solvers handle multi-valued variables (e.g., $X \in \{1...100\}$) and complex global constraints natively, yet they often lack the sophisticated learning mechanisms that drive modern SAT performance.
Previous hybrid attempts, such as CMVSAT-1, were restricted to specific multi-valued constraints. This work proposes a general framework capable of handling various domain representations—including intervals and sets—while maintaining the powerful conflict analysis found in modern SAT solvers.
Methodology: Generalized Nogood Learning
The proposed framework is built upon four essential requirements for a constraint reasoning system:
- Constraint Categorization: Distinguishing between primitive constraints (directly expressible by the domain, e.g., $X \neq 5$) and secondary constraints (problem rules or "propagators").
- Explanation Generation: Propagators must justify deductions by providing a set of primitive constraints as reasons.
- Conflict Detection: Efficient identification of contradictions between primitive constraints.
- Succinct Negation: The ability to represent the negation of a primitive constraint as a set of other primitive constraints.
The Implication Graph
At the heart of this method is a generalized implication graph. Unlike standard SAT where nodes are Boolean literals, nodes here represent primitive constraints. When a conflict is detected, the solver analyzes the graph to identify a "cutset"—a set of underlying reasons for the failure. This cutset is transformed into a "nogood," a new constraint that prevents the solver from repeating the same search error.
Post-Processing and Generality
The authors introduce a "strengthening" step for learned nogoods. For instance, if a conflict is attributed to $X \leq 60$, post-processing might determine that $X \leq 74$ would have also triggered the failure, resulting in a more potent rule. This approach treats variable inequations ($X \neq v$) as atomic units of information, allowing for stronger inferences than Boolean translations.
Empirical Evaluation
The solver, CMVSAT-2, was evaluated against MiniSat (SAT), Mistral (CP), and SCIP (Mixed Integer Programming) across three distinct domains: qwh-c (Quasigroup with holes), msp-3 (Market Split Problem), and nqueens-w (Weighted N-Queens).
Key Results
CMVSAT-2 proved to be the most robust solver, successfully solving all 300 test instances. In the qwh-c domain, it achieved an average runtime of 0.55s, whereas MiniSat failed due to memory exhaustion from the Boolean translation of cost constraints. In the msp-3 domain, CMVSAT-2's learned nogoods significantly reduced search errors compared to traditional SAT approaches.
Conclusion
The CMVSAT-2 framework demonstrates that focusing on "just-in-time" inference through conflict learning is highly effective for multi-valued problems. While implementing "reasons" for every global constraint requires engineering effort, the resulting robustness across combinatorial and linear domains is substantial. Future work will explore extending this framework to full optimization and further tuning variable-selection heuristics.
Summary updated