Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!swift.cs.tcd.ie!brady From: brady@swift.cs.tcd.ie Newsgroups: comp.lang.prolog Subject: Re: Garbage collecting names in Prology Message-ID: <1991Apr12.084444.7866@swift.cs.tcd.ie> Date: 12 Apr 91 08:44:43 GMT References: <1991Apr5.143158.7857@swift.cs.tcd.ie> <1600027@otter.hpl.hp.com> Organization: Computer Science Department, Trinity College Dublin Lines: 24 In article <1600027@otter.hpl.hp.com>, sfk@otter.hpl.hp.com (Steve Knight) writes: > This is an interesting question. The Poplog Prolog system, which is the > one I normally use, collects all inaccessible atoms. Atoms are > accessible either from the "dictionary" or from the currently executing > context (or because they reside in the constant portion of the process.) A related question is whether Poplog Prolog has the built-in 'current_functor', and if it has, what does current_functor give you? For instance, if current_functor gives you access to all the names that the system has ever seen, whether connected to the current process or not, then if you garbage collect the inaccessible names, the set of names that 'current_functor' can give access to changes, hence its behaviour is directly affected by a garbage collect. This seems undesirable. On the other hand, if current_functor gives access only to those names that are accessible to the process, then the problem disappears. The big difficulty here would be the cost of keeping this kind of functor information up-to-date. It seems therefore that implementers are between a rock and a hard place in this case, hence my question in the first place. Mike brady@cs.tcd.ie