From LJM@SLACVM.BITNET Fri Jul 22 10:27:00 1994
Received: from vm.uni-c.dk by dkuug.dk with SMTP id AA25862
  (5.65c8/IDA-1.4.4j for <SC22WG5@dkuug.dk>); Sat, 23 Jul 1994 03:30:05 +0200
Message-Id: <199407230130.AA25862@dkuug.dk>
Received: from vm.uni-c.dk by vm.uni-c.dk (IBM VM SMTP V2R2) with BSMTP id 1809;
   Sat, 23 Jul 94 03:30:48 DNT
Received: from SLACVM.SLAC.STANFORD.EDU by vm.uni-c.dk (Mailer R2.07) with
 BSMTP id 1411; Sat, 23 Jul 94 03:30:47 DNT
Received: by SLACVM (Mailer R2.08 R208004) id 5758;
          Fri, 22 Jul 94 18:28:32 PST
Date: Fri, 22 Jul 1994   18:27 -0800 (PST)
From: "Len Moss"                                     <LJM%SLACVM@vm.uni-c.dk>
To: "SC22/WG5 Mailing List"                        <SC22WG5@dkuug.dk>
Subject: Updates to the JOR
X-Charset: ASCII
X-Char-Esc: 29

Five new items have just been registered in X3J3's Journal Of
Requirements (JOR).  I have just ftp'ed them to the /incoming
directory on Kurt's server, and they should appear soon in the /x3j3
directory as:

     94-004r4.Z     /* The full version   */
     94-004r4s.Z    /* The subset version */

Because of the short time until the August meetings, I am including
the complete text of the new items below.  Please note that all the
items refer to supporting material in the file /x3j3/mullen.ps on
Kurt's server.  I sent this file to Kurt, but he may wish to rename
it or place it elsewhere, so you might have to poke around a little
to find it.  As the suffix implies, it contains PostScript.

----------------------------------------------------------------------

<FORTREQ>
<NUMBER> 069
<TITLE> Intrinsic function CONCAT
<KEYWORDS> INTRINSIC FUNCTION CONCAT CONCATENATION ARRAY
<STATUS> Registered
<TARGET>
<SUBGROUP> /JOR
<VERSION> 1

<REQUIREMENT>
Addition of an intrinsic function that concatenates the elements of an
array.

<JUSTIFICATION>
In a two dimensional array, concatenation of the first dimension
complemented with reshape provides the initial operation for a
monolithic operation to join arrays but may be insufficient in general
when concatenation is desired over the last dimension.  For two
dimensional array this can be achieved by transposing each array,
concatenating over the first dimension then transposing but it is
cumbersome and not obvious.  Furthermore for consistency, all
monolithic array operations should be generalized and defined over all
dimensions supported by the language.

<SUGGESTED IMPLEMENTATION>
Define the intrinsic function

      CONCAT(A,B,DIM)

where A and B are arrays and DIM is the dimension to concatenate over.
DIM is optional and defaults to the first dimension.  For example give
the following fragment:

      A=RESHAPE((/ 0, 1, 2, 3 /),(/ 2, 2 /))
      B=CONCAT(A,A)
      C=CONCAT(A,A,2)

The result in B would be

                               AE 0  1 AA
                               AE 2  3 AA
                               AE 0  1 AA
                               AE 2  3 AA

and C would be

                             AE 0 1 0 1 AA
                             AE 2 3 2 3 AA

AEDetailed edits available in /x3j3/mullin.ps at ftp.ncsa.uiuc.edu.AA
</SUGGESTED IMPLEMENTATION>

<ESTIMATED IMPACT>
This affects only new programs.  It will not invalidate any existing
programs.

<SUBMITTED BY>
Lenore R. Mullin, Scott Thibault, and Nicole Nemer
Phone: 314-341-4492
Email: lenore@cs.umr.edu, sthib@cs.umr.edu, nnemer@cs.umr.edu
</SUBMITTED BY>

<HISTORY>
<EVENT> Jul 94:
Proposal submitted via email.
</HISTORY>

</FORTREQ>

----------------------------------------------------------------------

<FORTREQ>
<NUMBER> 070
<TITLE> Extended indexing capabilities
<KEYWORDS> INDEXING SECTIONS ARRAY EXPRESSION
<STATUS> Registered
<TARGET>
<SUBGROUP> /parallel
<VERSION> 1

<REQUIREMENT>
The ability to index an array expression by subscripts or by sections.

<JUSTIFICATION>
Although a programmer can describe the desired indexing of an array
expression over a number of lines, once monolithic arrays are added to
the language it is more intuitive to describe what indices are desired
after a number of operations are applied to one or more arrays in
their entirety.

<SUGGESTED IMPLEMENTATION>
Extend grammar rule R701 to include the alternative

      "(" Expr ")" AE "(" section_subscript_list ")" AA

For example some problems update only the interior of an array to keep
the boundary constant as in

      G(2:N-1,2:N-1)=(u*G+(1-u)*G1)(2:N-1,2:N-1)

which is a better way to write

      G(2:N-1,2:N-1)=u*G(2:N-1,2:N-1+(1-u)*G1(2:N-1,2:N-1)

AEDetailed edits available in /x3j3/mullin.ps at ftp.ncsa.uiuc.edu.AA
</SUGGESTED IMPLEMENTATION>

<ESTIMATED IMPACT>
This affects only new programs.  It will not invalidate any existing
programs.

<SUBMITTED BY>
Lenore R. Mullin, Scott Thibault, and Nicole Nemer
Phone: 314-341-4492
Email: lenore@cs.umr.edu, sthib@cs.umr.edu, nnemer@cs.umr.edu
</SUBMITTED BY>

<HISTORY>
<EVENT> Jul 94:
Proposal submitted via email.
</HISTORY>

</FORTREQ>

----------------------------------------------------------------------

<FORTREQ>
<NUMBER> 071
<TITLE> Linear array access
<KEYWORDS> ARRAY ORDER LINEAR
<STATUS> Registered
<TARGET>
<SUBGROUP> /OOF
<VERSION> 1

<REQUIREMENT>
The ability to access the linearly stored components of an array in
memory.

<JUSTIFICATION>
Many languages access arrays in row major order.  This would create a
more ideal interface to language such as C where pointers could be
used.

<SUGGESTED IMPLEMENTATION>
Since an array can be naturally thought of as a record it would be
natural to access the linear stored components of an array as a
record.  As a record an array type would contain a dimension, size,
and components field.  The component field would be a vector.  For
example if A is a 2-D n-by-m array then


      A%component(2*n+2)=5

is equivalent to

      A(2,2)=5

AEDetailed edits available in /x3j3/mullin.ps at ftp.ncsa.uiuc.edu.AA
</SUGGESTED IMPLEMENTATION>

<ESTIMATED IMPACT>
This affects only new programs.  It will not invalidate any existing
programs.

<SUBMITTED BY>
Lenore R. Mullin, Scott Thibault, and Nicole Nemer
Phone: 314-341-4492
Email: lenore@cs.umr.edu, sthib@cs.umr.edu, nnemer@cs.umr.edu
</SUBMITTED BY>

<HISTORY>
<EVENT> Jul 94:
Proposal submitted via email.
</HISTORY>

</FORTREQ>

----------------------------------------------------------------------

<FORTREQ>
<NUMBER> 072
<TITLE> Intrinsic function REVERSE
<KEYWORDS> INTRINSIC FUNCTION REVERSE ARRAY
<STATUS> Registered
<TARGET>
<SUBGROUP> /JOR
<VERSION> 1

<REQUIREMENT>
Addition of an intrinsic function that reverses the elements of an
array.

<JUSTIFICATION>
Convolutions such as transpose and reverse are frequently used.  The
addition of monolithic arrays necessitates operation on monolithic
arrays with the ability to define the axis of rotation for generality.

<SUGGESTED IMPLEMENTATION>
Define the intrinsic function

      REVERSE(A,DIM)

where A is an array and DIM is the dimension to be reversed.  DIM is
optional and defaults to the first dimension.  REVERSE would simply
reverse the elements in a particular dimension.  Convolution is one
widely used operation that uses reverse.  The convolution of two
vectors could be written

      V*REVERSE(V)

with the new intrinsic function.

AEDetailed edits available in /x3j3/mullin.ps at ftp.ncsa.uiuc.edu.AA
</SUGGESTED IMPLEMENTATION>

<ESTIMATED IMPACT>
This affects only new programs.  It will not invalidate any existing
programs.

<SUBMITTED BY>
Lenore R. Mullin, Scott Thibault, and Nicole Nemer
Phone: 314-341-4492
Email: lenore@cs.umr.edu, sthib@cs.umr.edu, nnemer@cs.umr.edu
</SUBMITTED BY>

<HISTORY>
<EVENT> Jul 94:
Proposal submitted via email.
</HISTORY>

</FORTREQ>

----------------------------------------------------------------------

<FORTREQ>
<NUMBER> 073
<TITLE> Multi-dimensional transpose
<KEYWORDS> TRANSPOSE INTRINSIC FUNCTION ROW-MAJOR COLUMN-MAJOR ARRAY
<STATUS> Registered
<TARGET>
<SUBGROUP>
<VERSION> 1

<REQUIREMENT>
Allow the transposition of array with a dimension greater than two.

<JUSTIFICATION>
Extensions are suggested for consistency and generality in the
language.  It may be desirable to transpose over an arbitrary
dimension of an n-dimensional array.

<SUGGESTED IMPLEMENTATION>
The transpose of a n dimensional array is a rotation of the array
about a particular axis.  For n > 2 there is more than one rotation
that can be performed.  The particular rotation can be specified by a
permutation vector of length n.  The permutation vector describes how
to permute the indices of the transposed array to access the original
array.  For example 2-D transpose would have the permutation vector
(/ 2, 1 /) meaning the component (i,j) in the transposed matrix is the
same as component (j,i) in the original matrix.  The higher dimension
transpose could use to provide compatibility.  In order to interface
other languages that do not use column-major ordering the components
of array arguments must be reordered.  This can be done with
transpose.  For example to convert the three dimensional array A to
row-major order we could compute TRANSPOSE(A,(/ 3, 2, 1 /)).

This permutation vector would be an extra argument to the transpose
function and a default permutation could be chosen as a default value
so that the argument is optional.

     TRANSPOSE(A,PERM)

would transpose A with permutation vector PERM.  PERM is optional and
its default value is (/ d, (d-1), ... 1 /) where d is the dimension
of A.  TRANSPOSE(MATRIX) would still have the original semantics of
2-D transpose.

AEDetailed edits available in /x3j3/mullin.ps at ftp.ncsa.uiuc.edu.AA
</SUGGESTED IMPLEMENTATION>

<ESTIMATED IMPACT>
This affects only new programs.  It will not invalidate any existing
programs.

<SUBMITTED BY>
Lenore R. Mullin, Scott Thibault, and Nicole Nemer
Phone: 314-341-4492
Email: lenore@cs.umr.edu, sthib@cs.umr.edu, nnemer@cs.umr.edu
</SUBMITTED BY>

<HISTORY>
<EVENT> Jul 94:
Proposal submitted via email.
</HISTORY>

</FORTREQ>

--
Leonard J. Moss <ljm@slac.stanford.edu>  o/ My views don't necessarily
Stanford Linear Accelerator Center       o/ reflect those of SLAC,
MS 97; P.O. Box 4349; Stanford, CA 94309 o/ Stanford or the DOE
