Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!decwrl!sun!quintus!ok
From: ok@quintus.uucp (Richard A. O'Keefe)
Newsgroups: comp.lang.prolog
Subject: Re: setof / prolog compiler
Message-ID: <301@quintus.UUCP>
Date: 21 Aug 88 05:00:53 GMT
References: <1404@kulcs.kulcs.uucp>
Sender: news@quintus.UUCP
Reply-To: ok@quintus.UUCP (Richard A. O'Keefe)
Organization: Quintus Computer Systems, Inc.
Lines: 25

In article <1404@kulcs.kulcs.uucp> bimbart@kulcs.UUCP (Bart Demoen) writes:
>In article <290@quintus.UUCP> Richard A. O'Keefe writes:
>>(b) setof/3 only really has a logical reading when all the solutions
>>    it returns are ground.  [Example deleted.]

>I think the above argument says more about the non-logical reading of @when its arguments are variables, than about setof/3

Well, no.  That was just one example.  Let me provide another example:
	| ?- A = 1, B = 1,
	|    setof(X, (X = A ; X = B), L).
Result:	L = [1]

	| ?- setof(X, (X = A ; X = B), L),
	|    A = 1, B = 1.
Result:	L = [1,1]

All we have in this example is setof/3 and (=)/2.
I _like_ setof/3, and have no trouble with it, but that's because I know
what its limitations are (such as only being intended to return ground
results) and work within them.

As for the rest of Demoen's article, thanks.  I will remark only that
one of the things logic programming is supposed to be good for is being
the subject of source-to-source transformations.