Tentative value implementation of equality constraint.
The violatedness of the constraint is 0 if the equality holds, 1 otherwise.
The following declaration is in effect, meaning that eq_t/3 is used whenever $= /2 is added to a constraint set:
:- eq_t/3 tent_implements $= /2.
?- [X, Y] tent_set [3, 4], CS :~ (X $= Y). X = X{3 -> 0} Y = Y{4 -> 0} CS = constraint_set(TotalVio{1 -> 0}, ...) There is 1 delayed goal. Yes (0.00s cpu) ?- [X, Y] tent_set [3, 3], CS :~ (X $= Y). X = X{3 -> 0} Y = Y{3 -> 0} CS = constraint_set(TotalVio{0 -> 0}, ...) There is 1 delayed goal. Yes (0.00s cpu)