\section{Introduction}

Java~\cite{JavaLanguage} has several attractions as a language for
scientific computation and simulation.  Its implementation as a
secure virtual machine with a portable windowing model
enables graphical simulations to run safely on client computers.
Java's object orientation, strong typing, garbage collection, and
predefined libraries all ease the implementation of new applications.
Finally, its rapid growth in popularity has resulted in an explosion of
APIs, libraries, and development tools.

However, there are many legacy applications that would be tedious to
convert by hand.  Moreover, certain application areas (for example,
rapid prototyping of parallel algorithms) are better suited to
special-purpose high-level languages than to Java's more general and
low-level model.  In this paper we describe a system to translate
programs written in \nesl~\cite{nesl-jpdc94}, a high-level parallel
programming language, into Java.  Using this system we have translated
several algorithm simulations---which previously ran only on X11-based
Unix systems---into applets that are now available to anyone with a
Java-capable browser.  Note that we do not currently exploit \nesl's
parallelism in the generated Java code, although it should be
straightforward to extend our system to use Java threads on an
SMP~\cite{JAVAR}, or to use one of the parallel Java approaches
discussed in~\cite{HPJava}.  In this paper, we discuss the design
decisions and tradeoffs made in the development of the system, and we
present a series of benchmarks to evaluate its performance.  We also
discuss two qualitative aspects of using Java as an intermediate
language in this way: is it easy to incorporate into new or existing
systems, and does it provide sufficient functionality to model the
features of the source language?

The rest of this paper is organized as follows.
Section~\ref{sec:nesl-description} gives an overview of the \nesl\ 
language and system.  Section~\ref{sec:implementation} describes the
translation of \nesl\ into Java.  Section~\ref{sec:applets} contains
examples of \nesl\ simulations that have been compiled into Java
applets.  Section~\ref{sec:benchmarks} presents benchmark results.
Section~\ref{sec:experiences} discusses our experiences in building the
system.  Finally, Section~\ref{sec:relatedwork} describes related
projects, and Section~\ref{sec:conclusions} summarizes the work and our
conclusions.

% LocalWords:  applets
