(j3.2006) [ukfortran] (SC22WG5.5025) Canada's national body report to WG 9 (Ada)

Van Snyder Van.Snyder
Wed Jul 10 14:47:18 EDT 2013

On Wed, 2013-07-10 at 11:32 +0100, N.M. Maclaren wrote:
> On Jul 10 2013, Van Snyder wrote:

> >In either case, a variable that is not declared within a
> ><specification-part> within the construct should not be allowed in a
> >variable definition context, except within a CRITICAL construct, which
> >needs to be extended beyond images to sequences of execution. Similarly,
> >an impure procedure can only be invoked from within a CRITICAL
> >construct. An alternative is a new PARALLEL attribute for procedures,
> >which indicates that any alteration to a nonlocal variable or dummy
> >argument occurs within a CRITICAL construct.
> Yes.  It is this sort of thing that is the issue.  Fortran already has
> a lot of mechanism for asynchronous PURE procedure calls, which would
> need only syntactic sugar, and the real problem is impure ones.  I am
> sure that it could be done, and cleanly, but is a significant amount
> of effort in checking for gotchas and wordsmithing.

When DO CONCURRENT was under development, I proposed that references to
impure procedures be allowed from within CRITICAL constructs within the
DO CONCURRENT construct.  Bill resisted generalizating the definition of
CRITICAL from images to sequences of execution.  This is, admittedly, a
big hammer.  A new category of procedure, in which anything accessed by
use or host association is defined (referenced too?) within a CRITICAL
construct, might be more appropriate.

As Nick says, the devil is in the details.

I might look in the Ada standard, or a textbook, to see what the
restrictions are on tasks.  Tasks (and protected variables) in Ada have
been well wrung out.

> Regards,
> Nick Maclaren.

More information about the J3 mailing list