declare C1=c(size:10 needsKiosk:no) C2=c(size:26 needsKiosk:yes) Rooms=r(holds:35 hasKiosk:yes)# r(holds:35 hasKiosk:no)# r(holds:54 hasKiosk:no) proc {CheckConstraints C N} if Rooms.N.holds < C.size then fail end if Rooms.N.hasKiosk==no andthen C.needsKiosk==yes then fail end end fun {MakeAssignments} A1 A2 in A1 = choice 1 [] 2 [] 3 end A2 = choice 1 [] 2 [] 3 end if A1==A2 then fail end {CheckConstraints C1 A1} {CheckConstraints C2 A2} A2 end in {ExploreAll MakeAssignments} declare fun {Digit} choice 0 [] 1 [] 2 [] 3 [] 4 [] 5 [] 6 [] 7 [] 8 [] 9 end end {Browse {SolveAll Digit}} declare fun {TwoDigit} 10*{Digit}+{Digit} end fun {StrangeDigit} {Digit}+10*{Digit} end {Browse {SolveAll TwoDigit}} {Browse {SolveAll StrangeDigit}} declare {Browse {Space.ask {Space.new proc {$ A} A=3 A=4 end}}}