Debian Codegraph @

tests/spec/unit/regression/github_638_reduced.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 options:
5 all_solutions: true
6 expected: !Result
7 solution: !SolutionSet
8 - !Solution
9 arr: [false, true]
10 x : [null]
11 xx : 1
12 - !Solution
13 arr: [false, true]
14 x : [null]
15 xx : 2
16 - !Solution
17 arr: [true, true]
18 x : [2]
19 xx : 2
20 ***/
21 array[1..2] of var bool: arr;
22 constraint arr[2];
23 any: x ::output= [if forall(j in 1..i)(arr[j]) then i else <> endif| i in 2..2];
24 constraint occurs(x[1]) -> xx = 2;
25 var 1..2: xx ::output;