Solver-aided expansion of loops to avoid generate-and-test

Niklas Dewally, Özgür Akgün

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Constraint modelling languages like MiniZinc and Essence rely on unrolling loops (in the form of quantified expressions and comprehensions) during compilation. Standard approaches generate all combinations of induction variables and use partial evaluation to discard those that simplify to identity elements of associative-commutative operators (e.g. true for conjunction, 0 for summation). This can be inefficient for problems where most combinations are ultimately irrelevant. We present a method that avoids full enumeration by using a solver to compute only the combinations required to generate the final set of constraints. The resulting model is identical to that produced by conventional flattening, but compilation can be significantly faster. This improves the efficiency of translating high-level user models into solver-ready form, particularly when induction variables range over large domains with selective preconditions.
Original languageEnglish
Title of host publicationModRef 2025 - The 24rd workshop on constraint modelling and reformulation (ModRef)
Pages1-13
Number of pages13
Publication statusPublished - 11 Aug 2025
EventThe 24th workshop on Constraint Modelling and Reformulation (ModRef 2025) - Glasgow, United Kingdom
Duration: 11 Aug 202511 Aug 2025
Conference number: 24
https://modref.github.io/ModRef2025.html

Workshop

WorkshopThe 24th workshop on Constraint Modelling and Reformulation (ModRef 2025)
Abbreviated titleModRef 2025
Country/TerritoryUnited Kingdom
CityGlasgow
Period11/08/2511/08/25
Internet address

Keywords

  • Constraint and modelling
  • Loop unrolling
  • Solver-aided reformulation

Fingerprint

Dive into the research topics of 'Solver-aided expansion of loops to avoid generate-and-test'. Together they form a unique fingerprint.

Cite this