From vannoord@let.rug.nl Thu May 31 20:39:03 2001
Received: from gudrun.let.rug.nl (root@gudrun.let.rug.nl [129.125.8.21])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f4VId3306185
	for <prolog@swi.psy.uva.nl>; Thu, 31 May 2001 20:39:03 +0200 (MET DST)
Received: (from vannoord@localhost)
	by gudrun.let.rug.nl (8.9.3/8.9.3) id UAA28610;
	Thu, 31 May 2001 20:39:02 +0200
From: "Noord G.J.M. van" <vannoord@let.rug.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15126.36805.945965.536306@gudrun.let.rug.nl>
Date: Thu, 31 May 2001 20:39:01 +0200 (METDST)
To: Steffen Moeller <moeller@ebi.ac.uk>
Cc: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] another question
In-Reply-To: <Pine.LNX.4.30.0105311839420.9689-100000@kandor.ebi.ac.uk>
References: <81FBBA8C21B9D311A6E500508B6144AA1201AC@eupalinos.aegean.gr>
	<Pine.LNX.4.30.0105311839420.9689-100000@kandor.ebi.ac.uk>
X-Mailer: VM 6.72 under 21.1 (patch 7) "Biscayne" XEmacs Lucid

Steffen Moeller writes:
 > 
 > I'm (a bit) afraid to say that I think your concept on what Prolog is
 > needs a quick review.

or perhaps yours

 > 
 > On Thu, 31 May 2001, Partsakoulakis Ioannis wrote:
 > 
 > > I want to ask how can I define a predicate
 > > a(+Term,+ListOfTerms,-ListOfInstances) such that if term Term is unifiable
 > > with a term in ListOfTemrs then ListOfInstances will contain the
 > > correspinding instance of Term. For example if ask
 > >
 > > ?- a( p(1,X), [p(Y,2),p(2,1),p(1,3)], L ).
 > >
 > > I want to take
 > >
 > > L = [p(1,2),p(1,3)].


a(Term,List,Ins):-
	findall(Term,member(Term,List),Ins).



 > 
 > Before I think of why or what you want to do (please specify) I can say
 > that neither X nor Y are instantiated. You probably want a reply like
 > 
 > X=2, Y=1, L=[p(1,2)];
 > X=3, Y=1, L=[p(1,3)];
 > No.
 > 
 > But this is something that Prolog just does not do out of the box.
 > 
 > So your questions can probably be rephrased as
 > "Hey folks, does anybody know a nice constraint solver for SWI-Prolog?"
 > 

???


-- 
Gertjan van Noord Alfa-informatica, RUG,  Postbus 716, 9700 AS Groningen
vannoord at let dot rug dot nl            http://www.let.rug.nl/~vannoord

