\chapter{Simulator Kernel Implementation}
\label{KernelImplem}
\index{Simulator Kernel!Implementation}
\thispagestyle{empty}

The simulator kernel alone, including comments, has a volume of about
72000 lines of source code with about 2.0 Mbyte. It is implemented
in ANSI C. The simulator kernel consists of the following files:

Header files:
\index{Simulator Kernel!File!Header File}

All source code files have corresponding public (\*.h) and private
(\*.ph) header files associated with them. The public header files are
used to make the exported functions of the modul accessible to the
other moduls, while the private ones define function prototypes and
variables exclusively global to the functions of the modul.
Additionally there are the following header files without
corresponding c-moduls.

\begin{table}[h]
\begin{center}
\begin{tabular}{|l|l|r|}     \hline
{\bf Source file} & {\bf Meaning} \\ \hline \hline
art\_typ.h  & global types for all ART moduls \\ \hline
cc\_mac.h   & macros for cc and rcc moduls \\ \hline
cc\_typ.h   & global types for all cc moduls \\ \hline
func\_mac.h & macros for transfer functions \\ \hline
glob\_typ.h & user interface data types \\ \hline
kr\_const.h & constants of the kernel \\ \hline
kr\_def.h   & defaults for the kernel \\ \hline
kr\_mac.h   & macros of the kernel \\ \hline
kr\_typ.h   & data types of the kernel \\ \hline
krart\_df.h & macros for the ART kernel functions \\ \hline
krui\_typ.h & user interface functions\\ \hline
random.h    & randomize functions for System V \\ \hline
version.h   & version and patchlevel of the kernel and the kernel
                interfaces \\ \hline
\end{tabular}
\end{center}
\end{table}

\clearpage

\begin{samepage}
Sourcecode files:
\index{Simulator Kernel!File!Sourcecode File}
\nopagebreak

\begin{center}
\begin{tabular}{|l|l|r|}     \hline
{\bf Source file} & {\bf Meaning} \\ \hline \hline
art\_ui.c   & ART user interface functions \\ \hline
arttr\_f.c  & special transfer functions for ART models \\ \hline
calc\_err.c & Calculates the error of a table-lookup function\\ \hline
cc\_learn.c & learning functions for cascade correlation \\ \hline
cc\_rcc.c   & Common functions of CC and RCC \\ \hline
cc\_rcc\_topo.c   & CC and RCC topology check \\ \hline
dlvq\_learn.c & dynamic LVQ learning function routines \\ \hline
func\_tbl.c & contains the function table \\ \hline
init\_f.c   & user definable initialisation functions\\ \hline
kernel.c    & kernel low-level functions \\ \hline
kr\_JordElm.c & functions for Jordan and Elman type networks  \\ \hline
kr\_amap.c  & kernel low-level functions for ARTMAP model \\ \hline
kr\_art.c   & kernel low-level functions for ART models \\ \hline
kr\_art1.c  & kernel low-level functions for ART1 model \\ \hline
kr\_art2.c  & kernel low-level functions for ART2 models \\ \hline
kr\_funcs.c & routines to handle the function table \\ \hline
kr\_inversion.c & network inversion functions \\ \hline 
kr\_io.c    & compiler-kernel interface (file I/O) \\ \hline
kr\_mem.c   & functions of the memory management \\ \hline
kr\_newpattern.c & functions for the pattern handling  \\ \hline
kr\_pat\_parse.c & the pattern parser \\ \hline
kr\_pat\_scan.c & the pattern scanner \\ \hline
kr\_rand.c  & random functions for MS-DOS implementation \\ \hline
kr\_td.c    & time delay learning functions \\ \hline
kr\_ui.c    & high level user interface functions\\ \hline
learn\_f.c  & user definable teaching functions \\ \hline
make\_tbl.c & create a lookup table for transfer functions \\ \hline
matrix.c    & matrix handling functions \\ \hline
prun\_f.c   & pruning functions \\ \hline
rcc\_learn.c & learning functions for recurrent cascade correlation \\ \hline
strdup.c    & contains the strdup(...) function (not in ULTRIX-32) \\ \hline
tbl\_func.c & sigmoid activation function with table lookup\\ \hline
trans\_f.c  & user definable transfer functions\\
            & (unit, site, and output functions)\\ \hline
update\_f.c & user definable update functions\\ \hline
\end{tabular}
\end{center}
\end{samepage}
\clearpage

%\vspace{0.5cm}
%Test, demo, and benchmark programs:
%
%\begin{table}[h]
%\begin{center}
%\begin{tabular}{|l|l|r|}     \hline
%{\bf Source file} & {\bf Meaning} \\ \hline \hline
%bignet.c    & demo program to generate large 3-layer\\
%            & feedforward networks\\ \hline
%m\_art.c    & network generator for ART network architectures\\ \hline
%netlearn.c  & demo program for the network training\\ \hline
%netperf.c   & SNNS kernel benchmark test program \\ \hline
%snnsbat.c   & SNNS kernel network training program for very large networks\\
%            & and/or training sets. Runs in the background and controls\\
%            & training of the network (See also dokument file: snnsbat.doc).\\ %\hline
%\end{tabular}
%\end{center}
%\end{table}
%
%
%\vspace{0.5cm}
%\clearpage

Example Networks:
\index{Simulator Kernel!File!Example Network}

\begin{table}[h]
\begin{center}
\begin{tabular}{|l|l|r|}     \hline
{\bf Source file} & {\bf Meaning} \\ \hline \hline
art1\_letters.nett & ART-1 network\\ \hline
art2\_tetra.net    & ART-2 network\\ \hline
artmap.net         & ARTMAP network\\ \hline
bdg\_TDNN.net      & Time Delay Network for bdg-sound recognition\\ \hline
bdg\_TDNN\_untrained.net  & untrained version of bdg\_TDNN.net\\ \hline
dlvq\_ziff.net     & digit recognition with DLVQ\\ \hline
dlvq\_ziff\_trained.net   & trained version of dlvq\_ziff.net\\ \hline
dlvq\_ziff\_untrained.net & untrained version of dlvq\_ziff.net\\ \hline
eight\_elman.net   & Elman network to recognize a lying 8\\ \hline
eight\_elman\_untrained.net  & untrained version of eight\_elman.net \\ \hline 
eight\_jordan.net  & Jordan network to recognize a lying 8\\ \hline
eight\_jordan\_untrained.net & untrained version of eight\_jordan.net \\ \hline 
encoder.net        & 8-3-8 encoder network \\ \hline
encoder\_untrained.net    & untrained version of encoder.net \\ \hline
font.net           & 16x16 character recognition network \\ \hline 
font\_untrained.net       & untrained version of font.net \\ \hline 
laser.net          & Prediction of NH3 laser with Elman network\\ \hline 
laser\_untrained.net      & untrained version of laser.net \\ \hline 
letseq\_elman.net  & Letter sequence prediciton with Elman network\\ \hline
letseq\_elman\_untrained.net & untrained version of letseq\_elman.net \\ \hline 
letseq\_h\_elm.net & letseq\_elman.net with an hierarchical net\\ \hline
letters.net        & character recognition network \\ \hline
letters3D.net      & character recognition network in 3D\\ \hline
letters\_untrained.net    & untrained version of letters.net \\ \hline 
nettalk.net        & nettalk network\\ \hline
patmat.net         & toy pattern matching auto-associator network\\ \hline
patmat\_untrained.net     & untrained version of patmat.net\\ \hline 
som\_cube.net      & SOM cube example\\ \hline 
watch.net          & image processing example\\ \hline 
watch\_2out.net    & advanced image processing example\\ \hline 
xor.net            & XOR Network \\ \hline
xor\_rec.net       & recurrent XOR Network \\ \hline
xor\_untrained.net & untrained version of xor.net \\ \hline 
\end{tabular}
\end{center}
\end{table}

Probably there will be more example networks in the new SNNS
release. See the files in the examples directory.

\clearpage








