Debian Codegraph @

tests/spec/unit/regression/bug341.mzn

raw
1 /***
2 !Test
3 expected:
4 - !Result
5 solution: !Solution
6 S:
7 - !Range 1..3
8 - !Range 4..6
9 - !Result
10 solution: !Solution
11 S:
12 - !!set {}
13 - !!set {}
14 ***/
15
16 % Regression test for bug #341: mzn2fzn 1.5.0 was incorrectly tightening the
17 % bounds on the array S to 4..3. The problem was that the bounds inferred for
18 % each element of the array (which may differ) were being applied to the array
19 % as a whole.
20
21 array[1..2] of var set of 1..6: S;
22
23 constraint
24 S[1] subset {1,2,3} /\
25 S[2] subset {4,5,6}
26 ;
27
28 solve satisfy;
29
30 output [
31 "S = array1d(1..2, ", show(S), ";"
32 ];