Debian Codegraph @

tests/spec/unit/optional/test_opt_comprehension.mzn

raw
1 /***
2 !Test
3 check_against: []
4 expected:
5 - !Result
6 solution: !Solution
7 z:
8 - false
9 - false
10 - false
11 status: SATISFIED
12 extra_files: []
13 markers: []
14 name: ''
15 options:
16 all_solutions: false
17 solvers:
18 - gecode
19 type: solve
20 ***/
21
22 array[1..3] of var bool: z;
23 any: x = [ if i>=2 then <> else 0 endif | i in index_set(z) ];
24 predicate occ(array[int] of int: x) = abort("Error: array contains <>");
25 predicate occ(array[int] of opt int: x) = true;
26 constraint occ(x);