On the other hand the comment for all_distinct/1 gives an example how
it is stronger. "For example, all_distinct/1 can detect that not all variables
can assume distinct values given
the following domains".
So basically all_distinct/1 takes the domains into account whereas
all_different/1 doesn't. Here you see the difference:
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.3.24)
Copyright (c) 1990-2016 University of Amsterdam, VU Amsterdam
?- maplist(in, Vs,
[1\/3..4, 1..2\/4, 1..2\/4, 1..3, 1..3, 1..6]),
all_distinct(Vs).
false.
?- maplist(in, Vs,
[1\/3..4, 1..2\/4, 1..2\/4, 1..3, 1..3, 1..6]),
all_different(Vs).
Vs = [_G615, _G618, _G621, _G624, _G627, _G630],
_G615 in 1\/3..4,
all_different([_G615, _G618, _G621, _G624, _G627, _G630]),
_G618 in 1..2\/4,
_G621 in 1..2\/4,
_G624 in 1..3,
_G627 in 1..3,
_G630 in 1..6.
So all_distinct/1 can already fail without labeling all variables, thus reducing
the search space early on. But after labeling you should still get the same
results for both global constraints.
Bye