Availability::- use_module(library(dif)).(can be autoloaded)
dif(@A, @B)
The dif/2 predicate provides a constraint stating that A and B are different terms. If A and B can never unify, dif/2 succeeds deterministically. If A and B are identical it fails immediately, and finally, if A and B can unify, goals are delayed that prevent A and B to become equal. The dif/2 predicate behaves as if defined by dif(X, Y) :- when(?=(X, Y), X \== Y). See also ?=/2. The implementation can deal with cyclic terms.

The dif/2 predicate is realised using attributed variables associated with the module dif. It is defined in the autoload library library(dif).

Tags are associated to your profile if you are logged in