Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!shelby!neon!feldman From: feldman@Neon.Stanford.EDU (Todd J. Feldman) Newsgroups: comp.lang.prolog Subject: Re: HELP!!! Please! Message-ID: <1990Mar2.033807.3478@Neon.Stanford.EDU> Date: 2 Mar 90 03:38:07 GMT References: <1990Mar1.210219.5687@Neon.Stanford.EDU> Organization: Computer Science Department, Stanford University Lines: 35 In article alberto@konark.cs.umd.edu (Jose Alberto Fernandez R) writes: >You don't need the ABOLISH to do what you want. Without it, Prolog >will try each wait(X) clause only once, therefore you have what you >want. > >If you want to delete these entries, so that no further execution will >used it, you can do that with: > >process_entries:- > wait(X), > goal1(.....), > goal2(.....), > goal3(.....), > goal4(.....). > >process_entries:- > abolish(wait,1), > fail. /* This fail is for maintain the patterns in > the execution. */ Yes, but if wait(X) succeeds, I want all the current wait(..) facts to be removed; otherwise goal1 will fail again. It's a weird situation, but another way to describe it would be that if anything is waiting, make them ready (by abolishing the wait facts) and proceed. Then when you done (i.e., goal1 fails again), if anything is waiting, make them ready, etc. The idea is that wait(..) facts may be asserted by goal4. Could you respond with any more help? Thanks! Todd