I have simplified a more complex problem to the following: there are three houses on a street with three different colours (no colour repeated); red, blue, green. Write a program using DCGs to simulate all permutations/possibilities. My code won't run and I'm struggling to see why. Any corrections would really help.
s --> h(X), h(Y), h(Z), X\=Y, X\=Z, Y\=Z.
h(X) --> Col(X).
Col(X) --> [red].
Col(X) --> [blue].
Col(X) --> [green].