Prolog Language Logical Purity CLP(FD) constraints


Example

CLP(FD) constraints are completely pure relations. They can be used in all directions for declarative integer arithmetic:

?- X #= 1+2.
X = 3.

?- 3 #= Y+2.
Y = 1.