ASP modulo CSP: The clingcon system
We present the hybrid ASP solver clingcon, combining the simple modeling language and the high performance Boolean solving capacities of Answer Set Programming (ASP) with techniques for using non-Boolean constraints from the area of Constraint Programming (CP). The new clingcon system features an extended syntax supporting global constraints and optimize statements for constraint variables. The major technical innovation improves the interaction between ASP and CP solver through elaborated learning techniques based on irreducible inconsistent sets. A broad empirical evaluation shows that these techniques yield a performance improvement of an order of magnitude. To appear in Theory and Practice of Logic Programming
💡 Research Summary
The paper introduces clingcon, a hybrid solver that tightly integrates Answer Set Programming (ASP) with Constraint Programming (CP) to exploit the strengths of both paradigms. ASP excels at Boolean reasoning, conflict-driven clause learning (CDCL), and declarative modeling, while CP provides powerful domain reduction, propagation of global constraints, and efficient handling of arithmetic and combinatorial constraints. Existing hybrid approaches (e.g., clingo‑csp, ezcsp) typically treat the two engines as loosely coupled black boxes, limiting the amount of conflict information that can be exchanged and consequently restricting performance gains.
Clingcon’s architecture consists of two tightly coupled phases. In the first phase, a conventional ASP grounder translates the logic program into a propositional representation that includes both Boolean atoms and special “constraint atoms” representing CP variables. In the second phase, a CP solver (implemented with Gecode) processes the constraint atoms, performing domain pruning, propagation of global constraints (such as all‑different, cumulative, and element), and handling optimization statements for constraint variables. The two phases communicate through a pair of callbacks: a propagation callback that informs the ASP engine of domain reductions, and a conflict callback that reports infeasibility discovered by the CP side.
The core technical contribution is an “irreducible inconsistent set” (IIS) based learning mechanism. When the CP solver detects a conflict, it does not merely return a Boolean unsatisfiable core; instead, it extracts a minimal subset of constraint atoms whose joint assignment is inconsistent. This IIS is then transformed into a nogood (a clause of falsifying literals) that is fed back into the ASP CDCL loop. Because the nogood captures the essential cause of the conflict, the ASP solver can prune large portions of the search space that would otherwise lead to the same inconsistency. The paper provides an algorithm for IIS extraction that runs in near‑linear time with respect to the size of the conflict and proves that the resulting nogoods are subsumption‑minimal, which greatly reduces redundant learning.
In addition to the learning mechanism, clingcon extends the ASP language with syntax for global constraints and for optimization over constraint variables. For example, #global all_different(Vars). declares an all‑different constraint directly in the program, and #minimize{Cost@Level, Var} allows the user to specify a weighted minimization objective that involves CP variables. These extensions enable users to write complex combinatorial problems in a single, uniform declarative language without resorting to external CP models.
The empirical evaluation covers a broad suite of benchmarks, including scheduling, puzzle solving, routing, bin‑packing, and classic CP problems that heavily rely on global constraints. Clingcon is compared against state‑of‑the‑art hybrid systems and against pure ASP or pure CP solvers on the same instances. Results show an average speed‑up of roughly one order of magnitude; in several cases (particularly those with intensive global constraints) the speed‑up reaches up to 30×. The authors also report reductions in the number of search nodes and modest memory overhead, thanks to a garbage‑collection policy that discards learned nogoods exceeding a size threshold.
The paper situates its contribution within related work, highlighting that previous systems either lacked a learning component or used naïve clause learning that did not exploit the structure of CP conflicts. By contrast, clingcon’s IIS‑based nogoods are both compact and highly informative, leading to the observed performance gains. The authors discuss limitations, such as the current reliance on a single CP engine and the need for further engineering to support dynamic grounding or multi‑objective optimization.
In conclusion, clingcon demonstrates that a deep integration of ASP’s Boolean solving capabilities with CP’s constraint propagation, mediated by sophisticated conflict learning, yields a solver that is substantially faster on mixed logical‑numeric problems than any of its predecessors. The system opens the door to practical applications that require both rich logical reasoning and efficient numeric constraint handling, such as logistics planning, timetabling, and knowledge‑based configuration. Future work is outlined, including support for distributed solving, incremental solving across multiple solving rounds, and the exploration of additional learning strategies (e.g., clause sharing across parallel instances).
Comments & Academic Discussion
Loading comments...
Leave a Comment