Debian Codegraph @

tests/spec/unit/general/let_struct_domain.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 options:
5 all_solutions: true
6 expected: !Result
7 status: ALL_SOLUTIONS
8 solution: !SolutionSet
9 - !Solution
10 x: 1
11 y: 2
12 - !Solution
13 x: 2
14 y: 2
15 - !Solution
16 x: 1
17 y: 3
18 - !Solution
19 x: 2
20 y: 3
21 ***/
22
23
24 function tuple(var int): bar(var int: x) = let {
25 var dom(x): v;
26 } in (v,);
27
28 predicate foo(var int: x) = let {
29 tuple(var int): d = bar(x);
30 } in x = d.1;
31
32 var 1..2: x;
33 var 2..3: y;
34
35 constraint foo(x);
36 constraint foo(y);