Subject: Re: About transBD in subprograms

From: Yan Mi <[email-masked]>
Date: Thu, 14 Nov 1996 21:03:52 +0800 (EAT)

Hi,Prof. Li,
	You method is reasonable. Besides dealing with expilicit subroutine 
call,we should analyze every expression to distinct whether it is 
funcuion_call or defined operator,the amount of work is big.
	As to assumed_shape array, we can pass the size of every dimension 
of real_arg to dummy as you said, maybe we'd bette pass the shape of 
real_argu,including lower bound and upper bound? When we implement link b,
we'll search the symbol table to find the dimensions of the dummy array 
,then we can know which added arguments are the shape of the dummy array.
	Have you considered assumed_size array? We may deal with it as 
assumed_shape array,passing shape of real argu to dummy, and  in the 
subprogram  we get its concrete shape.
	My original idea is we add information of processor,range ,dad 
and we also change the subprogram call before transB.
ZhangGuanSong has processed it,he may put this part before  transB,and leave 
the part of forall as transG. If we implement as you suggested,
Zhangguansong will change his code about subprogram too, perhaps the 
amount of such work is bigger than just tearing his preesent code into 
two part.
Yanmi

On Wed, 13 Nov 
1996, Xiaoming Li wrote:

> 
> I discuss the issue with zgs and reach the following solution:
> 
>    Augmenting subprogram call interface by adding shape of an
>    array to the parameter list in transB before the transformation.
> 
> Examples,
> 
>    SUBROUTINE FOO1(X)
>    REAL X(:)
> 
> becomes
> 
>    SUBROUTINE FOO1(X,e1)
>    REAL X(:)
>    INTEGER e1
> 
> and
> 
>    SUBROUTINE FOO1(X,n)
>    REAL X(n)
> 
> becomes
> 
>    SUBROUTINE FOO1(X,e1,n)
>    REAL X(n)
>    INTEGER e1
> 
> and 
> 
>    SUBROUTINE FOO1(X)
>    REAL X(:,:)
> 
> becomes
> 
>    SUBROUTINE FOO1(X,e1,e2)
>    REAL X(:)
>    INTEGER e1,e2
> 
> and 
> 
>    CALL FOO1(Y(1:50))       ---->    CALL FOO1(Y(1:50),50)
> 
>    CALL FOO1(Y(1:100:2))       ---->    CALL FOO1(Y(1:100:2),50)
> 
> 
> Please discuss, if any problem.
> 
> ----------
> Xiaoming Li    (315)443-3890 (o)
> NPACT          (315)443-1973 (f)
> 
>