The sum constraint is being applied. When you add large numbers, they will overflow, with the truncated result being equal to ‘sum’.
You should change your constraint:
constraint array_c { foreach(array[i]) array[i] inside {[0:sum]};}
The sum constraint is being applied. When you add large numbers, they will overflow, with the truncated result being equal to ‘sum’.
You should change your constraint:
constraint array_c { foreach(array[i]) array[i] inside {[0:sum]};}