Subject: HPFF outline, draft 2

From: [email-masked]
Date: Mon, 15 Jun 92 16:03:45 -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{New Features in High Performance Fortran}
\label{sub-new}

List and one-paragraph descriptions of HPF extensions go here, with 
forward references to other sections.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Organization of This Document}

One-sentence descriptions of all sections go here.

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

\section{Fortran 90 Binding}
\label{sec-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.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Data Distribution Model}
\label{sec-distribute}

General description of the data distribution model goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{General Concepts}
\label{sec-dist-concepts}

\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.

\subsubsection{Procedure Interfaces}
\label{subb-interface}

Overview of procedure call interfaces goes here.

\subsubsection{Sequence and Storage Association}
\label{subb-association}

Storage and sequence association proposal goes here.

\subsubsection{Pointers}
\label{subb-pointers}

Proposal for dealing with distributed pointers goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Concrete Syntax}
\label{sec-dist-syntax}

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

This section extends Section 5.1.1 of the Fortran 90 standard.

HPF retains the Fortran 90 type specifiers.
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.
It also defines four new attributes, ALIGN, REALIGNABLE, DISTRIBUTE, and 
REDISTRIBUTABLE.

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

Syntax of ALIGN and REALIGNABLE goes here.

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

Syntax of DISTRIBUTE and REDISTRIBUTABLE goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Attribute Specification Statements}
\label{subb-attribute-spec}

This section extends Section 5.2 of the Fortran 90 standard.

HPF retains the Fortran 90 attribute specification statement.
It also adds four new statements: ALIGN, REALIGN, DISTRIBUTE, and 
REDISTRIBUTE.
Of these, REALIGN and REDISTRIBUTE are executable statements and ALIGN 
and DISTRIBUTE are nonexecutable statements.

\paragraph{ALIGN and REALIGN Statements}
\label{para-align-stmt}

Syntax of the ALIGN and REALIGN statements goes here.

\paragraph{DISTRIBUTE and REDISTRIBUTE Statements}
\label{para-distribute-stmt}

Syntax of the DISTRIBUTE and REDISTRIBUTE statements goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Procedure Interfaces}
\label{subb-procedure}

If directives for subroutine interfaces are defined, they go here; 
otherwise, this subsection is eliminated.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Association}
\label{subb-assoc-dir}

Descriptions of NO\_STORAGE\_ASSOC and related directives go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Data Parallel Execution Model}
\label{sec-parallel}

General description of the data parallel model goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{General Concepts}
\label{sub-par-concepts}

\subsubsection{Independent Indexed Threads}
\label{subb-forall}

Description of FORALL and other parallel indexing construct goes here.

\subsubsection{Computation Partitioning and Location}
\label{subb-on}

Description of ON clause functionality goes here.

\subsubsection{Reduction and Sorting Intrinsics}

Description of intrinsic functionality goes here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Concrete Syntax}
\label{sub-par-syntax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Assignment}
\label{subb-assign}

This section extends Section 7.5 of the Fortran 90 standard.
(The reference assumes that only assignment statements are allowed in 
WHERE and single-statement FORALL constructs.
If we decide to be more general, it seems more appropriate to modify 
Section 8.)

HPF retains all assignment statements in Fortran 90.
In addition, two new forms of assignment are defined: nested WHERE and 
FORALL.

\paragraph{Masked Array Assignment - WHERE}
\label{para-where}

If we decide to allow nested WHERE constructs, this is where they go.

\paragraph{Element Array Assignment - FORALL}
\label{para-single-forall}

Syntax and semantics of the single-statement FORALL go here.

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

This section extends Section 8.1 of the Fortran 90 standard.

HPF retains the Fortran 90 structured programming constructs.
It also defines the block FORALL construct, the other parallel indexing 
construct, and ON clause.

\paragraph{FORALL Construct}
\label{para-block-forall}

Syntax and semantics of block FORALL go here.

\paragraph{Other Parallel Indexing Construct}
\label{para-parallel-loop}

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

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

Syntax and semantics of ON go here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Intrinsics}
\label{subb-intrinsics}

This section extends Sections 13.2 through 13.9 of the Fortran 90 standard.

HPF retains the Fortran 90 intrinsic functions.
It also defines many new intrinsics which are useful for parallel 
computation.

\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.

\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.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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}