Author: Markus Triska
The library(clp/clp_distinct)
module provides the
following constraints:
?- vars_in([X,Y,Z], [1,2]), all_distinct([X,Y,Z]). No |
?- vars_in([X,Y], [1,2]), vars_in([Z], [1,2,3]), all_distinct([X,Y,Z]). X = _G180{1-2} Y = _G183{1-2} Z = 3 ; |
:- use_module(library(bounds)). :- use_module(library(clp_distinct)). ?- [X,Y] in 1..2, vars_in([X,Y], [1,2]), all_distinct([X,Y]), label([X,Y]). X = 1 Y = 2 ; X = 2 Y = 1 ; |