Subject: HPFF outline, draft 1

From: [email-masked]
Date: Mon, 15 Jun 92 16:03:20 -0500

\documentstyle{article}

%------------------------------------------------------------------------------
% Can this all go into a .sty file?
% If so, it probably should...

\oddsidemargin=0.25in
\textwidth=6.0in
\topmargin=-1in
\textheight=9in
\parindent=1em

\catcode`\$=11  \catcode`\&=11  \catcode`\_=11

\newdimen\bnfalign   \bnfalign=2in
\newdimen\bnfopwidth \bnfopwidth=.3in
\newdimen\bnfindent  \bnfindent=.2in
\newdimen\bnfsep     \bnfsep=6pt
\newdimen\bnfmargin  \bnfmargin=0.5in
\newdimen\codemargin \codemargin=0.5in

\def\IT{\it}
\def\RM{\rm}
\let\CHAR=\char
\let\CATCODE=\catcode
\let\DEF=\def
\let\GLOBAL=\global
\let\RELAX=\relax
\let\BEGIN=\begin
\let\END=\end

\def\FUNNYCHARACTIVE{\CATCODE`\a=13 \CATCODE`\b=13 \CATCODE`\c=13 \CATCODE`\d=13
		     \CATCODE`\e=13 \CATCODE`\f=13 \CATCODE`\g=13 \CATCODE`\h=13
		     \CATCODE`\i=13 \CATCODE`\j=13 \CATCODE`\k=13 \CATCODE`\l=13
		     \CATCODE`\m=13 \CATCODE`\n=13 \CATCODE`\o=13 \CATCODE`\p=13
		     \CATCODE`\q=13 \CATCODE`\r=13 \CATCODE`\s=13 \CATCODE`\t=13
		     \CATCODE`\u=13 \CATCODE`\v=13 \CATCODE`\w=13 \CATCODE`\x=13
		     \CATCODE`\y=13 \CATCODE`\z=13 \CATCODE`\[=13 \CATCODE`\]=13
                     \CATCODE`\-=13}

\def\RETURNACTIVE{\CATCODE`\
=13}

\makeatletter
\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
 -.2ex}{2.3ex plus .2ex}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
 -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}

\def\@IFSPACEORRETURNNEXT#1#2{\def\@tempa{#1}\def\@tempb{#2}\futurelet
  \@tempc\@ifspnx}
{
\FUNNYCHARACTIVE
\GLOBAL\DEF\FUNNYCHARDEF{\RELAX
    \DEFa{{\IT\CHAR"61}}\DEFb{{\IT\CHAR"62}}\DEFc{{\IT\CHAR"63}}\RELAX
    \DEFd{{\IT\CHAR"64}}\DEFe{{\IT\CHAR"65}}\DEFf{{\IT\CHAR"66}}\RELAX
    \DEFg{{\IT\CHAR"67}}\DEFh{{\IT\CHAR"68}}\DEFi{{\IT\CHAR"69}}\RELAX
    \DEFj{{\IT\CHAR"6A}}\DEFk{{\IT\CHAR"6B}}\DEFl{{\IT\CHAR"6C}}\RELAX
    \DEFm{{\IT\CHAR"6D}}\DEFn{{\IT\CHAR"6E}}\DEFo{{\IT\CHAR"6F}}\RELAX
    \DEFp{{\IT\CHAR"70}}\DEFq{{\IT\CHAR"71}}\DEFr{{\IT\CHAR"72}}\RELAX
    \DEFs{{\IT\CHAR"73}}\DEFt{{\IT\CHAR"74}}\DEFu{{\IT\CHAR"75}}\RELAX
    \DEFv{{\IT\CHAR"76}}\DEFw{{\IT\CHAR"77}}\DEFx{{\IT\CHAR"78}}\RELAX
    \DEFy{{\IT\CHAR"79}}\DEFz{{\IT\CHAR"7A}}\DEF[{{\RM\CHAR"5B}}\RELAX
    \DEF]{{\RM\CHAR"5D}}\DEF-{\@IFSPACEORRETURNNEXT{{\CHAR"2D}}{{\IT\CHAR"2D}}}}
}

%%% Warning!  Devious return-character machinations in the next several lines!
{\RETURNACTIVE\global\def\RETURNDEF{\def
{\@ifnextchar\FNB{}{\@stopline\@ifnextchar
{\@NEWBNFRULE}{\penalty\@M\@startline\ignorespaces}}}}\global\def\@NEWBNFRULE
{\vskip\bnfsep\@startline\ignorespaces}\global\def\@ifspnx{\ifx\@tempc\@sptoken \let\@tempd\@tempa \else \ifx\@tempc
\let\@tempd\@tempa \else \let\@tempd\@tempb \fi\fi \@tempd}}
%%% End of bizarro return-character machinations.
\def\IS{\@stopfield\global\setbox\@curfield\hbox\bgroup
  \hskip-\bnfindent \hskip-\bnfopwidth  \hskip-\bnfalign
  \hbox to \bnfalign{\unhbox\@curfield\hfill}\hbox to \bnfopwidth{\bf is \hfill}}
\def\OR{\@stopfield\global\setbox\@curfield\hbox\bgroup
  \hskip-\bnfindent \hskip-\bnfopwidth \hbox to \bnfopwidth{\bf or \hfill}}
\def\XBNF{\FUNNYCHARDEF\FUNNYCHARACTIVE\RETURNDEF\RETURNACTIVE
  \tt\frenchspacing \advance\@totalleftmargin\bnfmargin \tabbing
  \hskip\bnfalign\hskip\bnfopwidth\hskip\bnfindent\=\kill\>\+\@gobblecr}
\def\endXBNF{\-\endtabbing}

\def\BNF{\BEGIN{XBNF}}
\def\FNB{\END{XBNF}}

\begingroup \catcode `|=0 \catcode`\\=12
|gdef|@XCODE#1\EDOC{#1|endtrivlist|end{tt}}
|endgroup

\def\CODE{\begin{tt}\advance\@totalleftmargin\codemargin \@verbatim
   \frenchspacing \@vobeyspaces \@XCODE}
\def\ICODE{\begin{tt}\advance\@totalleftmargin\codemargin \@verbatim
   \frenchspacing \@vobeyspaces \FUNNYCHARDEF\FUNNYCHARACTIVE \@XCODE}

\makeatother

% End putative .sty file
%------------------------------------------------------------------------------

\begin{document}

\title{High Performance Fortran Language Specification}

\date{June 4, 1992}

\author{High Performance Fortran Forum}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Overview}
\label{sec-overview}

This document specifies the form and establishes the interpretation of 
programs expressed in the High Performance Fortran language.
It is designed as a set of extensions and modifications to the 
established International Standard for Fortran (ISO/IEC 1539:1991(E)), 
informally referred to as ``Fortran 90."
The sections of this document reference the 
related sections of the Fortran 90 standard to facilitate its 
incorporation into new standards, should ISO and national standards 
committees deem that desirable.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Goals and Scope of High Performance Fortran}
\label{sub-goals}

The goals of the High Performance Fortran Forum go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Fortran 90 Binding}
\label{sub-f90}

Elaboration of the statement ``HPF has chosen a Fortran 90 binding" goes 
here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Fortran 90 Subset}
\label{sub-subset}

Description of the the Fortran 90 subset goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Notation}
\label{sub-notation}

In general, this standard uses the same notation as ISO/IEC 1539:1991.
To disabmiguate new syntax rules from the rules in that standard, we make 
the following change: HPF syntax rules are given numbers of the form 
HPF$snn$, where $s$ is a one- or two-digit section number and $nn$ is a 
two-digit sequence number within that section.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{High Performance Fortran Terms and Concepts}
\label{sec-terms}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{High Level Syntax}
\label{sub-hl-syntax}

This section extends Section 2.1 of the Fortran 90 standard.

High Performance Fortran retains Fortran 90's high-level syntax with 
extensions for several new statement types.

New statement-level syntax rules go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Program Unit Concepts}
\label{sub-prog-units}

This section extends Section 2.2 of the Fortran 90 standard.

HPF retains Fortran 90's definitions of {\bf program unit} and the various 
types of program units.
In addition, HPF defines the concept of {\bf local subroutine}.

\subsubsection{Local Subroutine}
\label{subb-local}

Definition of {\bf local subroutine} goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Execution Concepts}
\label{sub-execution}

\subsubsection{Statement Order}
\label{subb-order}

This section extends Section 2.3.2 of the Fortran 90 standard.

HPF retains Fortran 90's ordering constraints on statements, with 
extensions for new statements.

If we define new ordering constraints for REALIGN and REDISTRIBUTE, they 
go here.

\subsubsection{Execution Sequence}
\label{subb-exec-sequence}

This section extends Section 2.3.4 of the Fortran 90 standard.

HPF retains the Fortran 90 execution sequence, with extensions for 
redistribution and FORALL statements and local subroutines.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Data Concepts}
\label{sub-data}

\subsubsection{Array}
\label{subb-array}

This section extends Section 2.4.5 of the Fortran 90 standard.

HPF retains the Fortran 90 notion of an {\bf array}.
In addition to the Fortran 90 array attributes of {\bf rank} and {\bf 
shape}, an array may have a {\bf distribution} describing its storage on 
processor memories.
The facilities for this distribution are described in Section 
\ref{sub-distribute}.
The distribution of an array does not affect its {\bf conformability} with 
other arrays.

\subsubsection{Storage}
\label{subb-storage}

This section extends and replaces Section 2.4.7 of the Fortran 90 standard.

Description of {\bf sequential} and {\bf nonsequential} storage goes here.
Program units which make use of sequential storage must observe certain 
constraints for those data objects (\ref{subb-sequential}).
Objects which are nonsequential make no assumption about the organization 
of physical memory.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Distribution Concepts}
\label{sub-distribute}

General description of the data distribution model goes here, elaborated 
in the following subsections.

\subsubsection{Processor}
\label{subb-processor}

The description of the processor level goes here.

\subsubsection{Template}
\label{subb-template}

The description of the template level goes here.

\subsubsection{Alignment}
\label{subb-align}

The description of alignment goes here.

\subsubsection{Distribution}
\label{subb-distribution}

The description of distribution goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Data Object Declarations and Specifications}
\label{sec-declaration}

This section extends Section 5 of the Fortran 90 standard.

HPF retains Fortran 90's declarations, with the extensions noted 
below.
The notion of type is extended to include certain abstract entities which 
do not represent physical data, but rather entities used to organize data 
distribution.
These 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Type Declaration Statements}
\label{sub-declaration}

This section extends Section 5.1 of the Fortran 90 standard.

Add TEMPLATE and PROCESSORS to the list of type specifiers.

Add ALIGN and DISTRIBUTE to the list of attributions.

\subsubsection{Type Specifiers}
\label{subsub-type-spec}

This section extends Section 5.1.1 of the Fortran 90 standard.

HPF retains all type specifiers from the Fortran 90 standard.
It also adds two type specifiers, the PROCESSOR and TEMPLATE specifiers.

\paragraph{PROCESSOR}
\label{para-processor}

Syntax and semantics of PROCESSOR type go here.

\paragraph{TEMPLATE}
\label{para-template}

Syntax and semantics of TEMPLATE type go here.

\subsubsection{Attributes}
\label{subb-attributes}

This section extends Section 5.1.2 of the Fortran 90 standard.

HPF retains the Fortran 90 type attributes.
In addition, it defines two new attributes, ALIGN and DISTRIBUTE.

\paragraph{ALIGN and REALIGNABLE}
\label{para-align}

Syntax and semantics of ALIGN and REALIGNABLE go here.

\paragraph{DISTRIBUTE and REDISTRIBUTABLE}
\label{para-distribute}

Syntax and semantics of DISTRIBUTE and REDISTRIBUTABLE go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Attribute Specification Statements}
\label{sub-attribute-spec}

This section extends Section 5.2 of the Fortran 90 standard.

HPF retains Fortran 90's attribute specification statements, with the 
following extensions.

\subsubsection{ALIGN Statement}
\label{subb-align}

Syntax and semantics of the ALIGN statement go here.

\subsubsection{DISTRIBUTE Statement}
\label{subb-distribute}

Syntax and semantics of the DISTRIBUTE statement go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Storage Association of Data Objects}
\label{sub-storage}

This section extends Section 5.5 of the Fortran 90 standard.

Storage and sequence proposal goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Use of Data Objects}
\label{sec-data}

\subsection{Dynamic Association}
\label{sub-allocate}

This section extends Section 6.3 of the Fortran 90 standard.

HPF retains Fortran 90's methods for controling the dynamic creation, 
association, and deallocation of pointer targets and dynamic arrays.

ALIGN and DISTRIBUTE features for allocatable arrays go here, if different 
from general REALIGN and REDISTRIBUTE.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Dynamic Distribution}
\label{sub-distribute}

Description of REALIGN and REDISTRIBUTE go here.

\subsubsection{REALIGN Statement}
\label{subb-realign}

Description of REALIGN goes here.

\subsubsection{REDISTRIBUTE Statement}
\label{subb-redistribute}

Description of REDISTRIBUTE goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Expressions and Assignment}
\label{sec-expression}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Expressions}
\label{sub-expression}

\subsubsection{Scalar and Array Expressions}
\label{subb-scalar-expr}

This section extends Section 7.1.6 of the Fortran 90 standard.

HPF retains Fortran 90's concepts of {\bf scalar}, {\bf array}, {\bf 
constant}, and {\bf specification} expressions, with extensions for new 
intrinsic functions defined in HPF.

If we make a statement regarding the distribution of an array expression, 
it goes here.

\paragraph{Constant Expression}
\label{para-const-expr}

This section extends Section 7.1.6.1 of the Fortran 90 standard.

Definition of constant expression goes here.

\paragraph{Specification Expression}
\label{para-spec-expr}

This section extends Section 7.1.6.2 of the Fortran 90 standard.

Definition of restricted expression and specification expression goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Assignment}
\label{sub-assignment}

\subsubsection{Masked Array Assignment - WHERE}
\label{subb-where}

This section extends Section 7.5.3 of the Fortran 90 standard.

If we decide to allow nested WHERE constructs, this is where they go.
If we allow more generalizations of WHERE (arbitrary nested statements, 
for example), then this section should be moved under 
Section~\ref{sec-execution}.

\subsubsection{Element Array Assignment - FORALL}
\label{subb-single-forall}

Syntax and semantics of the single-statement FORALL go here.
(This assumes that we limit the single statement to an assignment.)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Execution Control}
\label{sec-execution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Executable Constructs Containing Blocks}
\label{sub-blocks}

This section extends Section 8.1 of the Fortran 90 standard.

HPF retains Fortran 90's structured programming constructs.
In addition, HPF defines the extensions below.

\subsubsection{Rules Governing Blocks}
\label{subb-blocks}

This section extends Section 8.1.1 of the Fortran 90 standard.

HPF retains Fortran 90's rules concerning the definition and execution of 
blocks.
In addition, HPF defines the ON clause for providing user control of the 
location of computations.

\paragraph{ON Clause}
\label{para-on-clause}

Syntax and semantics of ON go here.

\subsubsection{FORALL Construct}
\label{subb-block-forall}

Syntax and semantics of block FORALL go here.

\subsubsection{Other Parallel Indexing Construct}
\label{subb-parallel-loop}

Syntax and semantics of the parallel indexing construct to be named later 
go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Input/Output Statements}
\label{sec-io}

This section extends Section 9 of the Fortran 90 standard.

Results of the I/O subgroup go here.
(This assumes that no new FORMAT statements are defined; if they are, 
they should go into a new ``Input/Output Editing" section.)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Program Units}
\label{sec-prog-units}

This section extends Section 11 of the Fortran 90 standard.

HPF retains Fortran 90's notion of program units.
In addition, HPF provides the extension below.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Local Subroutines}
\label{sub-local-subr}

General definition of local subroutines goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Procedures}
\label{sec-procedures}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Characteristics of Procedures}
\label{sub-characteristics}

This section extends Section 12.2 of the Fortran 90 standard.

Add distribution to the list of dummy argument attributes.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Procedure Interface}
\label{sub-interface}

This section extends Section 12.3 of the Fortran 90 standard.

HPF retains Fortran 90's features for implicit and explicit procedure 
interfaces.
The conditions requiring an explicit interface have been extended somewhat.

Require explicit interfaces for passing distributed arrays.

Definition of sequential and nonsequential variables  goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Procedure Reference}
\label{sub-proc-ref}

\subsubsection{Actual Argument List}
\label{subb-sequence-assoc}

This section extends Section 12.4.1 of the Fortran 90 standard.

Redistribution of actual array arguments goes here.

Treatment of sequence association goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Local Subroutines}
\label{sec-local-subrs}

Syntax and detailed semantics of local subroutines go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Intrinsics}
\label{sec-intrinsics}

This section extends Section 13 of the Fortran 90 standard.

HPF retains Fortran 90's intrinsic functions.
It also adds a number of intrinsics.

New intrinsics go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Scope, Association, and Definition}
\label{sec-scope}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section Notes}
\label{app-notes}

Rationales for the major features go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Syntax Rules}
\label{app-syntax}

Collection of syntax rules and constraints goes here.  If I can find a 
\LaTeX\ Fortran 90 grammar, it will be included.

Unless someone can do the cross-referencing automatically, there won't be 
a cross-reference subsection.

\end{document}