improve CLP support

This commit is contained in:
Vitor Santos Costa
2013-09-11 12:30:31 +01:00
parent 52c0d8a8de
commit 99ab8e541b
4 changed files with 320 additions and 97 deletions

View File

@@ -0,0 +1,17 @@
:- use_module(library(gecode/clpfd)).
:- use_module(library(maplist)).
test0(X) :-
X in 1..10,
X #= 2.
test1(X) :-
X in 1..10,
Y in 3..7,
Z in 1..4,
X / Y #= Z,
labeling([], [X]).
test2(X) :-
X in 1..10,
X / 4 #= 2,
labeling([], [X]).