This undocumented predicate in library(clpfd), suggested by Markus Triska, can help the solver more accurately constrain variable domains. For example,
?- form_time(2000-02-29,datetime(A,B)),
| form_time(1999-_-_, datetime(C,D)),
| clpfd:contracting([A,B,C,D]).
A = 51603,
B in 0..86399999999999,
C in 51179..51543,
...
Which constrains C to completely legitimate values. Without clpfd:contracting/1, the constraint on C contains is too broad, containing some values that are impossible.
This undocumented predicate in library(clpfd), suggested by Markus Triska, can help the solver more accurately constrain variable domains. For example,
Which constrains
C
to completely legitimate values. Withoutclpfd:contracting/1
, the constraint onC
contains is too broad, containing some values that are impossible.