Subject: [SWIPL] constraining the variable domain

From: Partsakoulakis Ioannis <[email-masked]>
Date: Thu, 31 May 2001 14:15:59 +0300

Assume that I have rule

a(X,Y):-
    b(X,Y),
    c(X,Y).

and the facts

c(1,1).
c(1,2).

I want by b/2 to declare that X and Y must not be equal and a/2 to return
only the solution {X = 1, Y = 2}. How can I do this. (I want to impose the
constraint while X and Y are still variables).

Thanks, 

Yannis.