Search                        Top                                  Index
HELP DICTIONARY                        A.Sloman and J.Meyer October 1988

The Poplog dictionary is a structure that contains words used for a
variety of purposes, which may differ from language to language.

In POP-11, for example, the words in the dictionary (see HELP * WORDS)
include procedure names, variable names and constant names, as well as
words that occur as values of variables or are used in lists, but do not
themselves have any syntactic or semantic role in the language (ie. they
have an identprops of "undef").

In Prolog, words in the dictionary include atoms, names of operators,
variables and predicates, including the "arity" indicator, e.g.

The symbols of Lisp are treated differently and do not use the Poplog

A word in POPLOG is a record structure that represents a particular
string of characters (the characters of the word). POPLOG maintains a
dictionary of word records and, whenever a word record is to be
constructed for a particular string of characters, either explicitly
using *CONSWORD, or implicitly when words are read in as program text,
the dictionary is searched to see if it already contains a word for that
string. If so, that is returned -- otherwise a new record is constructed
and entered in the dictionary. (This is in contrast, say, to the
construction of a new string or list, where a completely new structure
is produced every time.)

Associated with a word that is used in a program is an identifier (see
REF * IDENT) that defines its syntactic properties and stores its value
if it has one. The mapping from words in the dictionary to identifiers,
and therefore values, depends on the current section, which can change
from one part of a program to another. (See REF * SECTIONS)

There are several procedures for manipulating words and the dictionary.
These are defined in REF * WORDS. The two main procedures that access the
dictionary are -mapdic- and -appdic- (See HELP *APPDIC).

Information about the type of object that any specific word from the
dictionary represent can be obtained using * IDENTPROPS * IDENTTYPE. The
procedure * VALOF) can be used to access the value associated with a
word in the current section.

The dictionary plays an important role during garbage collection, since
in order to find out which structures currently in the heap are still
accessible by user programs it is necessary to start scanning from the
words in the dictionary. Words which have no associated identifier and
are not referenced by any other structure are removed from the
dictionary by the garbage collector.
For more information, see:


--- C.all/help/dictionary
--- Copyright University of Sussex 1988. All rights reserved. ----------