Re: disjunctive constraints, use of ~= ?

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Fri 25 Apr 2003 01:08:53 PM GMT
Message-ID: <3EA93365.31F6FBD0@icparc.ic.ac.uk>
Ulrich Scholz wrote:
> 
> I would like to formulate disjunctive constraints with set variables
> (fd_sets).  An example is
> 
> either X1 disjoint X1 or Y1 disjoint Y2
> 
> where X1 .. Y2 are interger sets.  Currently, I'm simulating this with ~=
> (notinstance), eg
> 
> [X1, Y1] ~= [X2, Y2].
> 
> This works quite well.

But set-disequality and set-disjointness are not the same!?

?- X1=[1,2],X2=[1,2],Y1=[1,2],Y2=[1,3],
   [X1, Y1] ~= [X2, Y2].

X1 = [1, 2]
Y1 = [1, 2]
X2 = [1, 2]
Y2 = [1, 3]
Yes (0.00s cpu)

?- X1=[1,2],X2=[1,2],Y1=[1,2],Y2=[1,3],
   ( X1 disjoint Y1 ; X2 disjoint Y2 ).

No (0.00s cpu)

-- 
 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
 Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Fri Apr 25 14:09:57 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:23 PM GMT GMT