Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!ucbvax!hplabs!otter.hpl.hp.com!otter!sfk From: sfk@otter.hpl.hp.com (Steve Knight) Newsgroups: comp.lang.prolog Subject: Re: Garbage collecting names in Prolog Message-ID: <1600027@otter.hpl.hp.com> Date: 10 Apr 91 11:26:52 GMT References: <1991Apr5.143158.7857@swift.cs.tcd.ie> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 17 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.) The "dictionary" is a mapping from functor/arity -> location. This mapping is not garbage-collectable, since that would be an error in an incrementally compiled system, but names can be "cancelled". This gives the user the ability to deliver their application without the predicate names being present. However, this feature is only used by confident & competent programmers since some predicates, such as call, require parts of the dictionary to be present. Consequently, the Poplog Prolog module system allows you to cancel the dictionary on a structured and controlled basis. Steve