]> Repositorios git - scryer-prolog.git/commit
FIXED: CLP(ℤ): Correctly remove all attributes during propagation of all_distinct...
authorMarkus Triska <[email protected]>
Mon, 24 Oct 2022 17:18:49 +0000 (19:18 +0200)
committerMark Thom <[email protected]>
Thu, 27 Oct 2022 05:36:07 +0000 (23:36 -0600)
commitd91ee5b77cf77d701f215a126bbd3f6433bd5da7
tree4aa12abaef7629b59eb94a1c5afdb9662478ec6a
parentfd97b84916c8741bc925aed53c6e9a8ed26e29f0
FIXED: CLP(ℤ): Correctly remove all attributes during propagation of all_distinct/1 and other global constraints.

The constraints from library(clpz) were already correctly removed, but
others such as pending freeze/2 goals were not, potentially leading to
an accumulation of redundant constraints during propagation.

Test case:

   ?- freeze(A,(X=1;X=2)), all_distinct([A]), A = 1.
      A = 1, X = 1
   ;  A = 1, X = 2.

The combination of freeze/2 and CLP(ℤ) is useful for example when
creating animations of search processes.

This addresses #1624.
src/lib/clpz.pl