========================================================
(C)1993 Institute for New Generation Computer Technology
(Read COPYRIGHT for detailed information.)
========================================================

Atom and Functor Tables
=======================
December 2, 1993
Takashi Chikayama (ICOT)

This document describes a temporary version of the modules
"atom_table" and "functor_table".

Note: The current versions of the modules "atom_table" and
"functor_table" are temporary solutions to the requirements on
management of atoms and functors.  They only provide temporary
solutions: many features that should be implemented are lacking,
implemented features sometimes do not behave as they should, and
implementation efficiency is far from ideal.  Especially, the module
will not work well with parallel implementations.

Nevertheless, the module might be useful for programs running on
sequential versions of KLIC.


1. Atom Table

The module "atom_table" provides the following predicates.

 atom_table:intern(String,Atom)
	When given a String, returns Atom with that name.  If such an
	atom does not exist, a new atom is registered.
 atom_table:atom_number(Atom,Number)
	Internal serial number for Atom is returned to Number as an
	integer value.
 atom_table:get_atom_string(Atom,String)
	The name string of Atom is returned to String.


2. Functor Table

The module "functor_table" provides the following predicates.

 functor_table:new(Functor,Atom,Arity)
	A functor structure with its principal functor being Atom and
	its arity being Arity is unified with Functor.  If such a
	functor does not exist, a new functor is registered.

Note that, functors can be decomposed using the following builtin
predicates available in the guard part.

 functor(X,F,A)
 arg(K,X,A)

3. Bugs

- There's no provision for distributed management in the current
  implementation.

- Macros should be provided to make these features look like built-in
  predicates.
