Debian Codegraph @

tests/spec/unit/compilation/set2iter.mzn

raw
1 /***
2 !Test
3 solvers: [gecode, chuffed]
4 expected: !Result
5 solution: !Solution
6 x: !Range 2..3
7 y: !Range 4..5
8 ***/
9
10 function array[int] of var opt $$E: set2iter(var set of $$E: x) =
11 [i + 1 | i in ub(x) where i in x];
12
13 var set of 1..4: x;
14 var set of int: y ::output = { i + 1 | i in x};
15
16 constraint x = 2..3;