Debian Codegraph @

tests/spec/unit/regression/bind-defines-var.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 options:
5 -G: std
6 expected: !Result
7 status: UNSATISFIABLE
8 ***/
9
10 % bind previously created constraint bool_clause_reif([a, b]), [], c) :: defines_var(c);
11 % which flattened into constraint exists([a, b]) :: defines_var(c);
12 % and then optimisation incorrectly removed the exists constraint due to c being fixed.
13
14 var bool: a;
15 var bool: b;
16 var bool: c;
17
18 var 0..1: x;
19 constraint c <-> x < 1;
20 constraint x <= 0;
21 constraint c = exists([a, b]);
22 constraint a < 1;
23 constraint b < 1;