libminizinc icon indicating copy to clipboard operation
libminizinc copied to clipboard

Bad flattening with array access with bool2int expression

Open Dekker1 opened this issue 2 years ago • 0 comments

Solving the following fragment using Gecode allows foo = 2, but this should not be allowed as it would make the constraint 9 <= 0.

var 1..2: foo;
constraint 9 <= [10, 0][(foo > 1) + 1];

Playground

This likely seems to be a problem in the context determined for foo > 1 as it results in a half-reified constraint, but should be in a mixed context.

Dekker1 avatar Jul 19 '23 23:07 Dekker1