🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #3901

Re: existential quantification in bagof

#3901
From: gerdeman
Date: Thu, 09 Feb 1989 22:17
29 lines
1313 bytes
Yes 209 and 201 should be _209 and _201.  It occurred to me that I 
should have given a more extended example of this behavior of 'findall'.
Consider the following:

?- findall(X,member(X,[Y,Z,Y],S). 
 
  X = _54
  Y = _98
  Z = _111
  S = [_230,_222,_214]

Here the variables are not only replaced, they're not even replaced 
consistently.  Serious bugs are imaginable.  But in the following case,
the variables are replaced consistently:

 ?- findall(X,X = [Y,Z,Y],S).

  X = _54
  Y = _84
  Z = _97
  S = [[_193,_195,_193]]

This behavior is potentially useful. But, is it intended? Does any other
Prolog work this way, or is TI-Prolog unique?

                                           -- Dale Gerdemann
                                              University of Ill
                                              Dept. of Linguistics
Technical Details
Message-ID: <16400005@clio>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!clio!gerdeman
References: <1584@kulcs.kulcs.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!clio!gerdeman
From: gerdeman@clio.las.uiuc.edu
Newsgroups: comp.lang.prolog
Subject: Re: existential quantification in bagof
Message-ID: <16400005@clio>
Date: 9 Feb 89 22:17:00 GMT
References: <1584@kulcs.kulcs.uucp>
Lines: 29
Nf-ID: #R:kulcs.kulcs.uucp:1584:clio:16400005:000:841
Nf-From: clio.las.uiuc.edu!gerdeman    Feb  9 16:17:00 1989