Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!decuac!shlump.nac.dec.com!engage.enet.dec.com!ncdel.enet.dec.com!ssmith From: ssmith@ncdel.enet.dec.com (Sheldon E. Smith) Newsgroups: comp.lang.prolog Subject: Re: Re: Novice RETRACT question (now SETOF/BAGOF question) Message-ID: <1947@engage.enet.dec.com> Date: 1 Aug 90 23:17:13 GMT Sender: news@engage.enet.dec.com Reply-To: ssmith@ncdel.enet.dec.com (Sheldon E. Smith) Organization: Digital Equipment Corporation Lines: 31 Thanks to all who've responded (both here and via E-mail). Yes, it occurred to me that evening (after posting) that I'd also need a backtracking loop. I checked the following morning, and, sure enough, it *had* worked; I simply had too many facts to see that one was gone. BTW, I'm using the Edinburgh C-Prolog interpreter. I have it running now. FWIW, I have a *large number* of Object rules, of which about 20% are obsolete. It's taking about two hours of CPU time on a 8820 to reduce. Would the usage of SETOF/BAGOF be faster? A couple of you mentioned the use of SETOF or BAGOF as an alternative method of locating the redundant facts. How can I put this: "That went *way* over my head", or to summarize, "Huh??" I'm still trying to understand SETOF/BAGOF. Perhaps I've had too many years of structured (3rd generation) programming, or maybe it's just that I can be *dense*! 8^) One proffered example (that I *almost* understand) was from Bart Demoen: reduce_objects :- bagof(object(I,X,Y), J^(object(I,X,Y), object(J,X,Y), I