\documentstyle[lib/tex/proc]{article}
\input{lib/tex/defpaper.sty}
\setprocdefaults

\title { {\bfInformation on CORAL code}\thanks{
 this is an attempt at documenting the code for CORAL. In part, it is 
    intended to give a broad idea of the code layout to unsuspecting
    ingenues who may wander blithely into these dangerous waters. In part,
    it should be a map of the system, marking the dangerous reefs for
    the use of experienced CORAL hackers too (though this is a dying
    breed
}}
 	     
\date{}

\begin{document}

\maketitle
 
\section{ Broad Overview : What does CORAL do ?}

CORAL is a deductive database system. Relations of different kinds are
supported :
\begin{enumerate}
\item First, there are stored (or {\em base}) relations.

\item Then there are view (or {\em derived}) relations. These relations
are expressed as rules that specify how they are to be computed. When a
query is asked on such a relation, the actual relation is computed based
on the rules.

\item Certain commands like print, display_timer, etc are builtin relations

\end{enumerate}

Users are allowed to define any number of derived relations in {\em modules}.
Any number of base relations may also exist. The modules serve as a means
of encapsulating the definitions of derived relations. All kinds of
relations are accessed via a uniform interface : {\em get_next_tuple()}.

The interface presented to the user is a Prolog-style interpreter interface.
Commands can be typed in at the prompt, or can be read from a file using
the consult(<file>) command.

\section{ What are the Basic Building Blocks ?}

Every stored relation is composed of tuples. Without going into the details
of the exact structure of each tuple, lets look at query evaluation.

Assume that the user types the query ?p(X). In other words, (s)he wants to
get all values of X, such that a tuple p(X) exists. First assume that
{\em p} is a base relation : so structures corresponding to each of the
tuples are stored in a relation structure.

\end{document}