Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!Teknowledge.COM!unix!unix.sri.com!dowding From: dowding@ai.sri.com (John Dowding) Newsgroups: comp.lang.prolog Subject: Re: Quintus Prolog Problem Message-ID: Date: 13 Nov 90 23:24:22 GMT References: <264@messina.cs.utexas.edu> Sender: news@unix.SRI.COM Organization: SRI International, Menlo Park, CA Lines: 29 In-reply-to: bradley@cs.utexas.edu's message of 13 Nov 90 22:35:16 GMT 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). If I record: recorda(woof, term2, _), recorda(woof, term1, _). and then query: setof(X, recorded(woof, X, _), Set). I receive the answer Set = [term2], and on backtracking the answer Set - [term1]. It seems to me that I should receive a single answer Set - [term1, term2]. Am I missing something? Or is this a known bug? Bradley 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. John Dowding dowding@ai.sri.com