In reply to dave_59:
Thanks Dave! that looks similar but this is slightly different.
I need to be sure that atleast one neighboring pixel of FALSE has to be different than FALSE.
class mat;
typedef enum{YES,NO,TRUE,FALSE} mat_t;
rand mat_t matrix[8][8];
// I need to find all the 36 3x3 matrices inside the 8x8 matrix and constraint them to be not all FALSE
rand mat_t matrix3x3[6][6][3][3];
// BAsically i want to ensure atleast one neighboring pixel is not FALSE, i didnt have the boundary conditions taken care of ....
// Its getting very complicated, I there any better solution?
constraint mat_c{
foreach(matrix[i,j]){
if(matrix[i][j] == FALSE) -> !((matrix[i-1][j-1] == FALSE) && (matrix[i-1][j] == FALSE) && (matrix[i-1][j+1] == FALSE) && (matrix[i][j-1] == FALSE) && (matrix[i][j+1] == FALSE) &&(matrix[i+1][j-1] == FALSE) && (matrix[i+1][j] == FALSE) &&(matrix[i+1][j+1] == FALSE))
}
}