From owner-sc22wg5  Wed Oct  3 19:51:18 2001
Received: from math.jpl.nasa.gov (math.jpl.nasa.gov [137.79.7.57])
	by dkuug.dk (8.9.2/8.9.2) with ESMTP id TAA57517
	for <sc22wg5@dkuug.dk>; Wed, 3 Oct 2001 19:51:17 +0200 (CEST)
	(envelope-from vsnyder@math.jpl.nasa.gov)
Received: from math.jpl.nasa.gov (vsnyder@localhost)
	by math.jpl.nasa.gov (8.11.6/8.11.6) with ESMTP id f93Hpxl14269;
	Wed, 3 Oct 2001 10:51:59 -0700
Message-Id: <200110031751.f93Hpxl14269@math.jpl.nasa.gov>
X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4
To: comp-fortran-90@jiscmail.ac.uk, sc22wg5@dkuug.dk
Subject: More questions about design issues for the submodules TR
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Wed, 03 Oct 2001 10:51:59 -0700
From: Van Snyder <vsnyder@math.jpl.nasa.gov>


I propose some questions below concerning the technical report to
allow one to divide modules into submodules.

Refer to the most recently published draft:

  ftp://ftp.nag.co.uk/sc22wg5/N1401-N1450/N1434.pdf or
  ftp://ftp.nag.co.uk/sc22wg5/N1401-N1450/N1434.ps.gz

I would like your thoughts concerning the syntax to specify the interface
of a procedure declared in a module, with the body defined in a submodule.

1.  Should it be required to specify the submodule in which a procedure
    body that corresponds to an interface is defined?

2.  Assuming the answer to question 1 is yes, should the submodule name
    be specified in each interface, or in the header of a block
    surrounding (potentially) several of them.

As the draft of the technical report is presently written, the answer to
question 1 is "yes," and the answer to question 1 is "in a block header."

Lawrie Schoenfelder has urged that the answer to question 1 should be "no"
and the answer to question 2 should be "in each interface."

Lawrie has further urged that interface bodies should be extended to take
on the job of specifying the interface for procedures that have bodies in
a submodule.  This seems like a natural job, given that interface bodies
already specify the characteristics of procedures that have bodies
elsewhere, i.e., external procedures and dummy procedures.

Lawrie has further urged that as a byproduct of this extension, it should
be allowed to provide interface bodies for module procedures.  One of his
objectives is that generic interface blocks can serve multiple duties:
specifying the interface, that a certain procedure is a specific one for
a generic interface, and that the body is in a submodule.

I'll let Lawrie make his own case for these proposals, and correct any
errors I have made in describing them.

My objection to them is that interface bodies do not access their host
environment by host association (which was, in my opinion, a substantial
blunder).  Module procedures do, and if the technical report passes, so
will submodules. It seems inconsistent to use interface bodies in this
way.

The technical report specifies an entity called a "procedure interface
declaration" that has identical syntax to an interface body, but
different semantics, in that procedure interface declarations _do_ access
their environment by host association.  One can tell the difference by
where they appear.  Interface bodies appear only in interface blocks;
procedure interface declarations don't.

3.  Should interface blocks and interface bodies be extended to take on
    the duty of specifying the interface for submodule procedures?

Van Snyder
vsnyder@math.jpl.nasa.gov


