| 1 |
/*** |
| 2 |
!Test |
| 3 |
solvers: [gecode, chuffed] |
| 4 |
expected: !Result |
| 5 |
solution: !SolutionSet |
| 6 |
- !Solution |
| 7 |
b: false |
| 8 |
x: 1 |
| 9 |
y: 1 |
| 10 |
- !Solution |
| 11 |
b: false |
| 12 |
x: 2 |
| 13 |
y: 2 |
| 14 |
- !Solution |
| 15 |
b: false |
| 16 |
x: 3 |
| 17 |
y: 3 |
| 18 |
- !Solution |
| 19 |
b: true |
| 20 |
x: 2 |
| 21 |
y: 1 |
| 22 |
- !Solution |
| 23 |
b: true |
| 24 |
x: 3 |
| 25 |
y: 1 |
| 26 |
- !Solution |
| 27 |
b: true |
| 28 |
x: 1 |
| 29 |
y: 2 |
| 30 |
- !Solution |
| 31 |
b: true |
| 32 |
x: 3 |
| 33 |
y: 2 |
| 34 |
- !Solution |
| 35 |
b: true |
| 36 |
x: 1 |
| 37 |
y: 3 |
| 38 |
- !Solution |
| 39 |
b: true |
| 40 |
x: 2 |
| 41 |
y: 3 |
| 42 |
options: |
| 43 |
all_solutions: true |
| 44 |
***/ |
| 45 |
|
| 46 |
% Regression test for bug #131. |
| 47 |
|
| 48 |
var 1..3: x; |
| 49 |
var 1..3: y; |
| 50 |
var bool: b; |
| 51 |
|
| 52 |
predicate foo(array[int] of var int: x); |
| 53 |
|
| 54 |
predicate foo_reif(array[int] of var int: x, var bool: r) = |
| 55 |
r <-> forall(i,j in index_set(x) where i < j) ( x[i] != x[j] ); |
| 56 |
|
| 57 |
constraint foo([x,y]) <-> b; |
| 58 |
|
| 59 |
solve satisfy; |
| 60 |
|
| 61 |
output [ |
| 62 |
"b = ", show(b), ";\n", |
| 63 |
"x = ", show(x), ";\n", |
| 64 |
"y = ", show(y), ";\n" |
| 65 |
]; |