From owner-sc22wg5@dkuug.dk  Tue Jul 15 15:47:21 2003
Received: (from majordom@localhost)
	by dkuug.dk (8.12.8p1/8.9.2) id h6FDlLSG095390
	for sc22wg5-domo; Tue, 15 Jul 2003 15:47:21 +0200 (CEST)
	(envelope-from owner-sc22wg5@dkuug.dk)
X-Authentication-Warning: ptah.dkuug.dk: majordom set sender to owner-sc22wg5@dkuug.dk using -f
Received: from mx2.liv.ac.uk (mx2.liv.ac.uk [138.253.100.180])
	by dkuug.dk (8.12.8p1/8.9.2) with ESMTP id h6FDlEEc095383
	for <sc22wg5@dkuug.dk>; Tue, 15 Jul 2003 15:47:16 +0200 (CEST)
	(envelope-from j.l.schonfelder@liverpool.ac.uk)
Received: from mailhub3.liv.ac.uk ([138.253.100.83])
	by mx2.liv.ac.uk with esmtp (Exim 4.14)
	id 19cQ97-0005pN-P4
	for sc22wg5@dkuug.dk; Tue, 15 Jul 2003 14:47:09 +0100
Received: from localhost.localdomain ([127.0.0.1] helo=mailhub3.liv.ac.uk)
	by mailhub3.liv.ac.uk with esmtp (Exim 4.14)
	id 19cQ97-0003jk-NH
	for sc22wg5@dkuug.dk; Tue, 15 Jul 2003 14:47:09 +0100
Received: from vp135020.liv.ac.uk ([138.253.135.20] helo=jls-rm-home.liv.ac.uk)
	by mailhub3.liv.ac.uk with esmtp (Exim 4.14)
	id 19cQ97-0003jd-Dx
	for sc22wg5@dkuug.dk; Tue, 15 Jul 2003 14:47:09 +0100
Date: Tue, 15 Jul 2003 14:47:09 +0100
From: "J.L.Schonfelder" <j.l.schonfelder@liverpool.ac.uk>
To: sc22wg5@dkuug.dk
Subject: Re: (SC22WG5.2865) Interfaces
Message-ID: <10098621.1058280429@jls-rm-home.liv.ac.uk>
In-Reply-To: <200307101854.h6AIsF5s062025@dkuug.dk>
References:  <200307101854.h6AIsF5s062025@dkuug.dk>
Originator-Info: login-id=jls; server=pop1.liv.ac.uk
X-Mailer: Mulberry/2.2.1 (Win32)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *19cQ97-0005pN-P4*TGPPYQ0LIKE*
Sender: owner-sc22wg5@dkuug.dk
Precedence: bulk



--On 10 July 2003 11:54 -0700 Van.Snyder@jpl.nasa.gov wrote:

> Michael Ingrassia quoted somebody (I don't know who, or the context):
>
>> > And I think everything needs to be the same, not just the
>> > characteristics.
>
> and commented on it:
>
>> Let me see if I understand the issue.
>>
>> INTERFACE
>> 	SUBROUTINE S(I,J)
>> 	END SUBROUTINE S
>> END INTERFACE
>>
>> and
>>
>> INTERFACE
>> 	SUBROUTINE S(J, I)
>> 	END SUBROUTINE S
>> END INTERFACE
>>
>> are two interface blocks for the same procedure that differ only in
>> non-characteristics (the spelling of the dummy argument names).
>> A call
>>
>> 	CALL S(I=7, J=8)
>>
>> is consistent with both interface blocks but might well deliver different
>> results depending on which of the pair it conforms to.
>>
>> Is that (part of) your point?
>
> The subject was "Straw votes to ponder concerning Modules TR."
>
> The draft of the Modules TR that I wrote does not propose to allow more
> than one interface declaration for a module procedure.  The procedure
> reference will continue to depend on the procedure's one and only
> interface declaration, no matter whather that interface is declared by an
> interface body or by the procedure body.  If the interface is declared
> separately from the procedure body, and the procedure body redeclares the
> interface, all that the current (1 July) draft requires is that the
> characteristics be identical.
>
> A reasonable but separate question is whether we ought to require the
> dummy argument names to be the same in the procedure body as in the
> interface.
>
> If we adopt Lawrie's idea that anything in a parent can be redeclared in
> a child submodule, there is no problem when the procedure is accessed by
> use association, because the definitive interface is the one in the
> module.  Interfaces in submodules are not accessible by use association.
> If we take an additional step and allow anything in the specification
> part of a module or submodule, including an interface body, to be
> declared more than once, then we almost surely need to require the dummy
> argument names to agree.  But I think this is a bad idea.
I do not see the problem. Redeclaration should be a mere confirmation 
including names. This is simple and provides checkable documentation. 
Permitting game playing with names of dummy arguments etc. is froth and 
bubble and as such is like most such polution! Michael's example should be 
an error since it changes the dummy arguments.
>
> Suppose we have a tree like this (root at the left, descendants to the
> right, brothers vertically arranged):
>
> M
>   S1
>     S1A
>     S1B
>   S2
>
> Now suppose that an interface for a procedure P is declared in M, and
> again in S1.  Suppose there is a body named P in S1A.  When P is called
> from S1B, is the interface from S1 used, or is the one from M used?
>
> With submodule association and redeclaration, the pathology Michael
> described would be a problem, so we would almost certainly want to
> require dummy argument names to agree.
There is no problem since if dummy names also agree the interface is 
identical in both cases.
>
> With host association, the interface for a reference to P from S1B is the
> interface in S1, and the body is in S1A.  The interface for P that's
> accessible by use association is the one in M.  If that P is called or
> used as a target, there better be a body in S2, because the body in S1A
> is not related to the interface in M.
This to my mind is further evidence of the confusion that can be produced 
by host association with no significant counter wheighing advantages.
>
> Suppose the interface for P in S1 isn't declared to be a separate
> interface.  With host association, it would be illegal for a body for P
> in S1A (or S1B) to claim to be separate from its interface, because the
> interface accessible to the body by host association wouldn't claim to be
> its separate interface.  With submodule association and redeclaration, I
> assume this would be caught by requiring agreement on whether the
> interfaces are for a procedure with a separate body.
I think this is the same as the question of whether you can have an 
external procedure interface (no FORWARD or SEPARATE prefix) and a Module 
or internal procedure of the same name. I think this would be illegal and 
so would say that under submodule association rules as I have defined it 
would be an illegal (re)declaration to have a SEPARATE interface body and 
an external interface body with the same name.
>
> --
> Van Snyder                    |  What fraction of Americans believe
> Van.Snyder@jpl.nasa.gov       |  Wrestling is real and NASA is fake?
> Any alleged opinions are my own and have not been approved or disapproved
> by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody
> else.



--
Lawrie Schonfelder
Honorary Senior Fellow
University of Liverpool
1 Marine Park, West Kirby,
Wirral, UK, CH48 5HN
Phone: +44 (151) 625 6986 
