
\section{Introduction}

     This document is concerned with translation of {\em High
Performance Fortran} (HPF) to a conventional sequential language.  It
is relatively informal, and by no means defines a complete translation
scheme.  However it does introduce a framework for such a scheme, in
the form of an intermediate representation called {\em Adhoc}.  It also
defines the semantics of a high level run-time library for implementing
HPF---namely that library needed to implement the primitives of Adhoc.
By design, the necessary operations are much more transparent than for
HPF itself.  For example, there is no implicit data communication in
Adhoc---all communication is performed in explicit data re-mapping
operations.  An explicit interface to the library, called {\em
Mini-Adlib}, is given in C++\footnote{Not because our translator will
necessarily target C++---but because the interface can be specified
most easily as a class library.}.  Finally, many examples are given of
translation from Adhoc to C++ with calls to Mini-Adlib.

     The Adhoc notation is ``human-readable''.  The idea is that
particular phase of an our HPF translator will have some internal, {\em
machine-readable} intermediate representation.  This representation has
a direct correspondence with an Adhoc program.  In practise the
machine-readable form would be translated directly to the target
language.  But for purposes of defining and illustrating the
translation scheme, it is very valuable to have a textual notation.

     Adhoc is a development of a notation described in \cite{geometric}.
Semantically it differs from the earlier language in various
ways.  For example it supports multiple active process arrays, whereas
the earlier notation supported a single such array per scoping unit; it
supports the kind of intra-dimensional alignments and embeddings
required by HPF; and it introduces non-Cartesian distributed arrays to
support translation of the HPF {\em forall}.  In the earlier notation
the declaration of a process dimension (then called an {\em index}) had
a specific association with spawning of physical processes.  Adhoc
dispenses with that association; the ``processes'' in its process array
are virtual.  A new process array is now interpreted as a different
``map'' (or ``view'') of a fixed SPMD physical process group.

     Syntactically the new notation is modelled on C or C++, rather
than occam.  We should remark that, because the language is designed as
a specification device rather than a compilable machine language, very
little effort has been invested in eliminating trivial ambiguities, or
avoiding clashes with other parts of C++.
%\footnote{For example, our
%syntax for ``ranges'' uses colons a little too freely and probably
%can't be disambiguated without contextual information.}.

     Section \ref{elements} describes the Adhoc language.  Section
\ref{translation} is concerned with translation of HPF to Adhoc, and
gives numerous examples.  Section \ref{implementation} discusses
transliteration of Adhoc to a sequential language with calls to a
run-time library which manages access to distributed data.


