There has to be boundaries, otherwise the labeling/2 search could never end.
i.e. for a list of integers, the list length must be known, with an upper and lower boundary for each number.
To fully utilise clpfd:
- Replace member/2 with element/3
- Replace
->with e.g.#==>as in SWI-Prolog manual
An example is https://stackoverflow.com/questions/79583486/sliding-15-puzzle-using-clpfd
There’s solutions etc. in topic: Advent of Code 2025