Solver-Aided Expansion of Loops to Avoid Generate-and-Test

Niklas Dewally, Özgür Akgün
8/11/2025
cs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dewally2025solveraided,
  title  = {Solver-Aided Expansion of Loops to Avoid Generate-and-Test},
  author = {Niklas Dewally and Özgür Akgün},
  year   = {2025},
  eprint = {2508.08442},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.08442v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.08442.svg)](https://codeofpaper.com/paper/2508.08442)

Discussion