From moeller@ebi.ac.uk Thu May 31 19:48:34 2001
Received: from alpha1.ebi.ac.uk (alpha1.ebi.ac.uk [193.62.196.122])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f4VHmY301908
	for <prolog@swi.psy.uva.nl>; Thu, 31 May 2001 19:48:34 +0200 (MET DST)
Received: from kandor.ebi.ac.uk (IDENT:moeller@kandor.ebi.ac.uk [193.62.199.202])
	by alpha1.ebi.ac.uk (8.9.3/8.9.3) with ESMTP id SAA89540;
	Thu, 31 May 2001 18:48:32 +0100 (BST)
Date: Thu, 31 May 2001 18:48:32 +0100 (BST)
From: Steffen Moeller <moeller@ebi.ac.uk>
To: Partsakoulakis Ioannis <jpar@aegean.gr>
cc: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Subject: Re: [SWIPL] another question
In-Reply-To: <81FBBA8C21B9D311A6E500508B6144AA1201AC@eupalinos.aegean.gr>
Message-ID: <Pine.LNX.4.30.0105311839420.9689-100000@kandor.ebi.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


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

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)].

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?"


Cheers,

Steffen


>
> Can somebody help me?
>
> Thanks,
>
> Yannis.
>
>
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
>
> or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
> (without the quotes) and *no* message body.
>
> ** An ARCHIVE of this list is maintained at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
>
>


    Steffen Moeller <moeller@ebi.ac.uk>    ICQ 37032340

