Article View: comp.lang.prolog
Article #2048Re: Garbage collecting names in Prolog
From: Richard A. O'Keefe
Date: Tue, 23 Apr 1991 01:49
Date: Tue, 23 Apr 1991 01:49
30 lines
1823 bytes
1823 bytes
In article <1991Apr17.105714.7876@swift.cs.tcd.ie>, brady@swift.cs.tcd.ie writes:
> In article <1991Apr16.124755.868@sics.se>, roland@sics.se (Roland Karlsson) writes:
> > The current_atom/1 and current_functor/2 assumes that you somewhere
> > have stored a set of atoms or functors. What set???? In practice
> > those two predicates are meaningless and should not be implemented.
> This and previous messages are interesting. Does _anyone_ use
> current_atom or current_functor for anything?
The DEC-10 Prolog library includes a kit of things related to
Lisp's "apropos". Amongst other things, there was no current_key/2
in DEC-10 Prolog, so
current_key(Symbol, Skeleton) :-
current_functor(Symbol, Skeleton),
has_at_least_one_record(Skeleton).
has_at_least_one_record(Skeleton) :-
recorded(Skeleton, _Term, _Ref),
!.
Basically, current_{atom,functor,predicate} were useful for building
program environment tools with. As long as they include the relevant
things, which usually means "things in the data base", that's enough.
current_functor/2 is dispensible (if you have current_key/2), but
current_atom/1 has no substitute that I am aware of.
--
Bad things happen periodically, and they're going to happen to somebody.
Why not you? -- John Allen Paulos.
Technical Details
Message-ID:
<5341@goanna.cs.rmit.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!spool.mu.edu!munnari.oz.au!bruce!goanna!okReferences:
<1991Apr5.143158.7857@swift.cs.tcd.ie> <5218@goanna.cs.rmit.oz.au> <1991Apr17.105714.7876@swift.cs.tcd.ie>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!spool.mu.edu!munnari.oz.au!bruce!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.prolog Subject: Re: Garbage collecting names in Prolog Message-ID: <5341@goanna.cs.rmit.oz.au> Date: 23 Apr 91 01:49:35 GMT References: <1991Apr5.143158.7857@swift.cs.tcd.ie> <5218@goanna.cs.rmit.oz.au> <1991Apr17.105714.7876@swift.cs.tcd.ie> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 30