\section{The {\sc Nesl} System}
\label{sec:nesl-description}

\nesl~\cite{nesl3.1} is a portable, high-level, functional, nested
data-parallel language.  The primary data structure in \nesl\ is the
sequence, each element of which can itself be a sequence.  
\nesl{} code closely resembles high-level pseudocode, and places 
more responsibility on the compiler and runtime system for achieving 
good efficiency~\cite{nesl-jpdc94}. 
Therefore, the language is well-suited for the concise and simple 
expression of parallel algorithms. For example, 
quicksort can be written in 10 lines of \nesl, compared to 1700 lines of C 
with MPI (which includes code for explicit load-balancing).  
Although \nesl\ was designed to explore support for
nested data-parallelism, those issues are orthogonal to the point of
this paper and are not discussed here.

The standard \nesl\ system consists of three layers, as shown in
Figure~\ref{fig:overview-nesl} (see~\cite{nesl-jpdc94} for full
details).  The interactive front end of the system compiles \nesl\ 
programs into a machine-independent intermediate language called
\vcode~\cite{vcode}.  The front end then invokes a \vcode\ interpreter,
which in turn calls the low-level \cvl\ vector library~\cite{cvl}.  The
primary advantage of using an interpreted intermediate language for
\nesl\ is that it allows users to switch transparently between running
their programs on workstations (for development) and supercomputers (for
performance).

% The \vcode\ interpreter is the middle layer of the system: it uses
% function calls to the low-level \cvl~\cite{cvl} vector library to
% perform most of the computation.

\begin{figure}[htb]
  \centerline{\psfig{figure=overview-nesl.eps}} 
  \onehalfspacing
  \caption{Components (boxes) and languages (solid lines) of the current 
    \nesl\ system.  Arrows represent translation, and dashed lines
    represent linkage to C libraries (rounded boxes).}
  \label{fig:overview-nesl}
\end{figure}

A \vcode\ program manipulates a stack of strongly typed vectors.  The
\vcode\ language provides a large number of stack-based vector
operations, as well as instructions for stack manipulation, program
control, memory management, and input/output.  Note that \vcode\ shares
several properties with Java bytecode~\cite{Gosling95}, including
portability, strong typing, a stack-based execution model, and a design
that allows easy interpretation.  The interpreter's main tasks are to
manage the stack and vector memory, and to implement the vector
operations via calls to \cvl\ (C Vector Library), a machine-specific
library that implements an abstract vector machine~\cite{cvl}.

% LocalWords:  nesl interpreter's
