I have the following clingo code that generates the search space, followed by constraints.
{in(I,1..4)}=1 :- I=1..n. :- [constraint1] :- [constraint2]