Constraint a 9x9 matrix


class b;
  rand bit a[9][9]; //array of array
  rand int hlpr[9];
  
   constraint c1 {
     foreach  (a[i]) { (a[i].sum(item) with(int'(item)) ) == hlpr[i] ; } //reduce it to 1D hlpr 
       hlpr.sum() with(int'(item)) >= 71; //== 10;
       solve hlpr before a;
                 } 
endclass:b

using helper array improves readability imho