Skip to content
Preprint

Translating finite-domain integer constraint models to CP/SMT/ILP/PB/SAT solvers with CPMpy

Aug 2026 · 0 citations · 52 references
Computer Science

TL;DR

The goal is to translate high-level constraint satisfaction and optimization problems into any lower-level formalism, including CP, SMT QF-LIA, ILP, PB and (Max)SAT, and to present a modular framework for transforming the high-level modeling language to CP/SMT/ILP/PB and (Max)SAT solvers.

Abstract

Constraint solving is a declarative approach for solving combinatorial satisfaction and optimization problems. The user specifies their problem through constraints and decision variables, and a generic solver is used to find a solution. Several constraint-solving technologies exist, and certain solvers perform well on certain problems. Therefore, it is useful to try different solvers given a particular application. However, each solving paradigm supports different types of constraints and decision variables. Our goal is to translate high-level constraint satisfaction and optimization problems into any lower-level formalism, including CP, SMT QF-LIA, ILP, PB and (Max)SAT. This allows for comparing different solving technologies for a particular problem, without requiring a user to manually remodel it for each solving paradigm. We define a high-level language of logical and arithmetic operations, and useful additional functions and constraints, which are known as global constraints in the CP community. We then present a modular framework for transforming our high-level modeling language to CP/SMT/ILP/PB and (Max)SAT solvers. While many transformations are partly described in the literature, we observe that they can be implemented through a modular waterfall of smaller components, where lower-level paradigms reuse the transformations of higher-level paradigms. Two recurring challenges are handling the negation of arbitrary subexpressions and avoiding the introduction of auxiliary variables. Additionally, we take special care linearizing non-linear operators for ILP, PB and SAT-solvers. The transformation waterfall is implemented and evaluated in the open-source CPMpy library. Our results show that constraint models significantly change throughout the transformations, and that optimizations to the linearization of constraints are essential for ILP and PB solvers.

View source

Similar papers

Open access Aug 2026

Efficient Reformulations of Half-reified Global Constraints using Auxiliary Variables

A set of reformulation rules are proposed that allow the use of half-reification of a global constraint with any CP solver that supports the “normal” global constraint propagator, and expand the range of available solvers and constraint models that can be used in XCP techniques or for solving CSPs with compound constra...

Ignace Bleukx, Hélène Verhaeghe, Dimos Tsouros et al. · 1 citation
Preprint Aug 2026

Improving Constraint Models with LLM Agents

This work introduces an agentic framework that reformulates a constraint model from an open-ended space and establishes correctness empirically rather than by construction, and demonstrates that autonomous agentic methods can support the improvement of constraint models.

Florentina Voboril, Stefan Szeider · 0 citations
Jul 2026

LeanCSP: A Framework for Certifying Constraint Reformulation and Solving in Lean

This work introduces a framework that addresses both verification levels in the Lean theorem prover, and can be used to prove formulation-level properties, such as equivalence, equisatisfiability, and the correctness of symmetry-breaking constraints, parametrically for entire problem families.

Pablo Manrique, Stefan Szeider · 0 citations
Jul 2026

LLM-Guided Evolutionary Search for Constraint Model Reformulation to Improve Solver Efficiency

Combinatorial problems appear in numerous industrial applications. A common approach is to formulate these problems as declarative constraint models that can subsequently be compiled to and solved by a range of back-end solvers. Recent work shows that Large Language Models (LLMs) can produce correct models from natural...

Kostis Michailidis, Dimos Tsouros, Dang Nguyen et al. · 0 citations
Conference 2026

From LLM Suggestions to Lean Proofs: Verified Redundant Constraints for MiniZinc

This work presents a pipeline that combines LLM-based constraint generation with empirical evaluation and formal verification, and handles MiniZinc’s partial semantics by requiring the base model to be safe and separately proving that the proposed constraint is well-defined for all instances and solutions of the base m...

Philipp Danzinger, Nysret Musliu · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.