🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1399

Re: Quintus Prolog Problem

#1399
From: Richard A. O'Keefe
Date: Wed, 14 Nov 1990 07:36
21 lines
1573 bytes
In article <DOWDING.90Nov13152422@palm.ai.sri.com>, dowding@ai.sri.com (John Dowding) writes:
> In article <264@messina.cs.utexas.edu> bradley@cs.utexas.edu (Bradley L. Richards) writes:
>*  As near as I can tell, setof and bagof don't work properly with the
>*  "recorded" predicate in Quintus Prolog (version 2.5.1, sun3-4.0). ...
>*   and then query:  setof(X, recorded(woof, X, _), Set).
> It is trickey.  This would work:
> 	setof(X, Ref^recorded(woof, X, Ref), Set)

> Prolog doesn't have a true don't-care variable.  The _ is really
> just a shorthand for some particular variable that you haven't
> bothered to name.  

Just to stress this:  this behaviour has *nothing* to do with recorded/3
at all.  setof/3 is in this instance behaving *exactly* the way it is
*supposed* to work, and any Prolog giving different results _would_ have
a bug.  (See the last chapter in The Craft of Prolog, plug plug.)
You may prefer to use findall/3.

-- 
The problem about real life is that moving one's knight to QB3
may always be replied to with a lob across the net.  --Alasdair Macintyre.
Technical Details
Message-ID: <4269@goanna.cs.rmit.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!goanna!ok
References: <264@messina.cs.utexas.edu> <DOWDING.90Nov13152422@palm.ai.sri.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!goanna!ok
From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
Newsgroups: comp.lang.prolog
Subject: Re: Quintus Prolog Problem
Message-ID: <4269@goanna.cs.rmit.oz.au>
Date: 14 Nov 90 07:36:49 GMT
References: <264@messina.cs.utexas.edu> <DOWDING.90Nov13152422@palm.ai.sri.com>
Organization: Comp Sci, RMIT, Melbourne, Australia
Lines: 21