Debian Codegraph @

tests/spec/unit/regression/bug141.mzn

raw
1 /***
2 !Test
3 expected:
4 - !Result
5 solution: !Solution
6 x:
7 - 1
8 - 1
9 - 1
10 - 1
11 - 1
12 - 1
13 - 1
14 - 1
15 - 1
16 - !Result
17 solution: !Solution
18 x:
19 - 9
20 - 9
21 - 9
22 - 9
23 - 9
24 - 9
25 - 9
26 - 9
27 - 9
28 ***/
29
30 % Regression test for bug #141.
31 % In mzn2fzn 1.1.5 'x' was not being marked as an output variable in the
32 % generated FlatZinc because the code that processed output items was
33 % ignoring the assignments for any let variables.
34
35 array[1..9] of var 1..9: x;
36
37 solve satisfy;
38
39 output
40 let { array[1..9] of 1..99: y =
41 [ sum(s2 in 1..9)( fix(x[s2]) ) | s in 1..9 ] }
42 in
43 [ show(y) ];