:- use_module(library(gecode/clpfd)).
:- use_module(library(maplist)).
test0(X) :-
X in 1..10,
X #= 2.
test1(X) :-
Y in 3..7,
Z in 1..4,
X / Y #= Z,
labeling([], [X]).
test2(X) :-
X / 4 #= 2,
test3(A) :-
A = [X,Y,Z],
A ins 1..4,
Y #> 2,
lex_chain(A),
all_different(A),
labeling([], [X,Y,Z]).
test4(A) :-
Z #> 3,
min(A, 1),
test5(A) :-
A ins 0..1,
in_relation( A, [[0,0,0],[0,1,0],[1,0,0]] ),
X #> 0,
labeling([], A).
test6(A+B) :-
B = [X1,Y1,Z1],
B ins 0..1,
extensional_constraint([[0,0,0],[0,1,0],[1,0,0]], C),
in_relation( A, C ),
in_relation( B, C ),
X1 #< X,
Y1 #\= Z1,
labeling([], A),
labeling([], B).
test7(A) :-
in_dfa( A, 0, [t(0,0,0),t(0,1,1),t(1,0,0),t(-1,0,0)], [0]),
test8(A+B) :-
A = [X,Y,Z,W],
B = [X1,Y1,Z1,W1],
dfa( 0, [t(0,0,0),t(0,1,1),t(1,0,0),t(-1,0,0)], [0], C),
in_dfa( A, C ),
in_dfa( B, C ),