🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #3896

Re: existential quantification in bagof

#3896
From: Francois-Michel Lang
Date: Wed, 08 Feb 1989 15:15
37 lines
1954 bytes
In article <16400003@clio> gerdeman@clio.las.uiuc.edu writes:
>
>On this same topic, I have noticed some peculiar features
>of 'findall' in TI-Prolog. I don't know whether these are
>standard or peculiar to Texas Instrument.  
> 
>First: Why does 'findall not require existential quantification
>at all? The manual doesn't say anything at all about this.

I don't know anything about TI-Prolog specifically,
but I'm pretty sure that the `standard' definitions
of findall/3 given in the literature
(e.g., in Clocksin & Mellish and Sterling & Shapiro)
all treat free vars in the second arg as existentially quantified.
As Richard has pointed out, these `standard' definitions tend also
to suffer from the insidious problem of not being able to distinguish
the term which is asserted to mark the bottom of the stack of solutions
from terms which are asserted as solutions.

>
>Second: why does 'findall' change variable names? For example consider
>the following perverse little procedure:
>
>?-findall(X,member(X,[Y,Z],S).
>
> X = _54
> Y = _98
> Z = _111
> S = [209,201]

This is bizarre...Any TI people out there?
Even if S = [209,201] is supposed to be  S = [_209,_201]
that still seems weird.
----------------------------------------------------------------------------
Francois-Michel Lang
Paoli Research Center, Unisys Corporation lang@prc.unisys.com (215) 648-7256
Dept of Comp & Info Science, U of PA      lang@cis.upenn.edu  (215) 898-9511
Technical Details
Message-ID: <9188@burdvax.PRC.Unisys.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!udel!burdvax!pearl!lang
References: <9150@burdvax.PRC.Unisys.COM> <16400003@clio>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!udel!burdvax!pearl!lang
From: lang@pearl.PRC.Unisys.COM (Francois-Michel Lang)
Newsgroups: comp.lang.prolog
Subject: Re: existential quantification in bagof
Message-ID: <9188@burdvax.PRC.Unisys.COM>
Date: 8 Feb 89 15:15:25 GMT
References: <9150@burdvax.PRC.Unisys.COM> <16400003@clio>
Sender: news@PRC.Unisys.COM
Organization: Unisys Corporation, Paoli Research Center; Paoli, PA
Lines: 37