 structure FD        from "x-alice:/lib/gecode/FD"
import structure Inspector from "x-alice:/lib/tools/Inspector"

(* The initial root space. *)
val root = Space.new () 

(*** Search problem :
 *   Choose one number in each column (numbers1, numbers2)
 *   All numbers must be different
 *)
val max = 10
val size = 6
val numbers1 = #[2, 1, 2, 5, 1, 6]
val numbers2 = #[1, 3, 4, 3, 6, 7]

infix %
fun a % b = Vector.sub (a,b)

val cn = FD.BND
 
fun fromInt sp n = FD.intvar (sp,#[(n,n)])
fun toInt   sp v = FD.Ref