🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #4235

HELP!!! Please!

#4235
From: Todd J. Feldman
Date: Thu, 01 Mar 1990 21:02
35 lines
1632 bytes
Can someone please help me with a bug in the following Prolog fragment:

process_entries:-
	wait(X),
	abolish(wait,1),
	goal1(.....),
	goal2(.....),
	goal3(.....),
	goal4(.....).

The intention I had in writing this code was for backtracking to occur 
between goals 1 and 4.  Finally, goal1 will no longer be able to succeed.
When it fails, I want backtracking to go to wait(X); as long as there 
is at least one wait fact (wait is not a rule; just facts) in the database,
abolish them all, and begin with goal1 again; the existence of the wait
facts is what caused goal1 to fail in the first place.  In doing some
amount of tracing, I've discovered that goal1 is failing as expected,
the abolish is not backtracked to as expected, but that wait(X) is not
resucceeding; it fails immediately on backtracking EVEN THOUGH THERE
ARE SEVERAL wait(...) facts in the database!

Any ideas?  I'll be happy to provide more information if it would be
helpful, and I'd be very grateful for any help you can give me!

Thanks!

Todd Feldman
feldman@neon.stanford.edu



-- 
wewewe
2323232
Technical Details
Message-ID: <1990Mar1.210219.5687@Neon.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!elroy.jpl.nasa.gov!decwrl!shelby!neon!feldman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!elroy.jpl.nasa.gov!decwrl!shelby!neon!feldman
From: feldman@Neon.Stanford.EDU (Todd J. Feldman)
Newsgroups: comp.lang.prolog
Subject: HELP!!! Please!
Summary: Help with simple Prolog fragment
Message-ID: <1990Mar1.210219.5687@Neon.Stanford.EDU>
Date: 1 Mar 90 21:02:19 GMT
Sender: Todd J. Feldman (feldman@neon.stanford.edu)
Organization: Computer Science Department, Stanford University
Lines: 35