Subject: Re: [SWIPL] another question

From: "Noord G.J.M. van" <[email-masked]>
Date: Thu, 31 May 2001 20:39:01 +0200 (METDST)

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