Subject: subset language

From: [email-masked] (Mary E Zosel)
Date: Tue, 1 Sep 92 19:45:38 -0700

F90 Group
Following is text for 4 proposals to change the subset language.
Are there other things that should be included?  Would you
like to suggest changes to these proposals?  I will be submitting
a modified version of chapter 9 to Loveman for the document on
Thursday afternoon with these proposals reflected in the text 
(clearly marked as proposals only).  
    -mary-

---
---
Specific Proposals to consider for the HPF subset language

Mary Zosel, Fortran 90 Subgroup,  9/1/92

_______________________________________________________

Proposal #1. Limit the form of interface blocks in 
the subset language.

The HPF subset is required to contain only INTERFACE blocks 
with no generic-spec or module-procedure-stmt.

Discussion:
We previously voted to include INTERFACE blocks in the 
subset language, but the official F90 syntax also includes 
functionality for declaring interfaces to things like 
generic names, defined operators, and module procedures.  
Since these features are not part of the subset language, 
we should not require an implementation to support these 
declarations in an INTERFACE block.

_____________________________________________________

Proposal #2. Add 3 new intrinsic subroutines to the 
subset language.

Add the intrinsic subroutines DATE_AND_TIME, RANDOM_SEED, 
and SYSTEM_CLOCK to the list of Fortran 90 intrinsics 
included in the HPF subset.

Discussion:
We have already included RANDOM. We should include 
RANDOM_SEED for completeness. For users interested in 
performance, one of the most common things they want to do 
is measure how they are doing.  We should provide 
DATE_AND_TIME and SYSTEM_CLOCK as standard forms of getting 
clock time.  
_________________________________________________________

Proposal #3. Add a limited form of MODULES to the 
subset language.

The HPF subset language should include module, with the 
specification-part only. It should also include the use-
stmt, without the rename-list  or ONLY specification.

Discussion:
We have been struggling with the problem of supporting the 
names of templates and processors in a way that allows them 
to be used in multiple subroutines.  They cannot be passed 
as arguments or COMMON. The only other way in Fortran 90 to 
get a scope for a name that is available in multiple 
subroutines is to use a MODULE.  We have also proposed 
limitations on remapping of arrays in COMMON and arrays 
remapped across subroutine boundaries are returned to their 
original mapping on return.  Declaring an array in a MODULE 
is the only mechanism we have for providing a subroutine 
whose purpose is to remap data arrays.

Use of modules for arrays with explicit mappings is also an 
additional safety / convenience factor over use of arrays 
in COMMON because of the requirement that the COMMON blocks 
match up all storage aggregates before they can contain a 
mappable array. 

Note: this proposal excludes the ONLY and rename facilities 
of the USE statement.  If HPFF would like to include these 
features, this proposal is easily amended.

__________________________________________________________

Proposal #4. Add  data-object oriented declarations 
to the subset language.
Add the new form of Fortran-90 object type declarations to 
the HPF subset.  Specifically, add the type-delcaration-
statement, with all forms of type-spec except kind-selector 
and TYPE(type-name), and all forms of attr-spec except 
access-spec, TARGET, and POINTER.

Discussion:
Fortran 90 has two forms of declarations: the FORTRAN 77 
style where the attributes are specified on separate 
statements, and the new style where the attributes can be 
grouped together and listed in the same line as the data 
type declaration:
    REAL,  DIMENSION (10,10), SAVE :: X

We are using this form of declaration for our directives.  
For consistency to the user,
we should also add this form for regular declarations. 

The type-spec values included are the types you expect: 
INTEGER, REAL, DOUBLE PRECISION, COMPLEX, LOGICAL.  The 
attr-spec values are PARAMETER, ALLOCATABLE, DIMENSION, 
EXTERNAL, INTENT, INTRINSIC, OPTIONAL, and SAVE.  The 
declaration form also allows initialization values to be 
specified following the declared name.