Constrains Vars to take only values from the domain specified by Domain. Vars may be a variable or a collection of variables (as accepted by collection_to_list/2). Domain can be specified as a simple range Lo .. Hi, or as a list of sub-ranges and/or individual elements. Each element of the specification is an integer, or is a ground expression that evaluates to an integer. All domain elements must be integers within the range allowed by gecode.
[eclipse 2]: X :: 0..1.
X = X{[0, 1]}
[eclipse 2]: X :: -1..5.
X = X{[-1 .. 5]}
[eclipse 2]: X :: 0.0..1.0.
type error in X :: 0.0 .. 1.0
Abort
[eclipse 2]: [X,Y] :: [1..10, -1, 0, 7, 21].
X = X{[-1 .. 10, 21]}
Y = Y{[-1 .. 10, 21]}