From owner-sc22wg5@open-std.org  Thu Jan 29 11:58:45 2009
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 0E95AC56D24; Thu, 29 Jan 2009 11:58:45 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 2309 seconds by postgrey-1.18 at www2.open-std.org; Thu, 29 Jan 2009 11:58:44 CET
Received: from nougat.ucs.ed.ac.uk (nougat.ucs.ed.ac.uk [129.215.13.205])
	by www2.open-std.org (Postfix) with ESMTP id 92F79C56CFF
	for <sc22wg5@open-std.org>; Thu, 29 Jan 2009 11:58:43 +0100 (CET)
Received: from holyrood.ed.ac.uk (holyrood.ed.ac.uk [129.215.16.14])
	by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id n0TAKBVT007999
	for <sc22wg5@open-std.org>; Thu, 29 Jan 2009 10:20:13 GMT
Received: from holyrood.ed.ac.uk (localhost [127.0.0.1])
	by holyrood.ed.ac.uk (8.13.7/8.12.8) with ESMTP id n0TAKBeo014962
	for <sc22wg5@open-std.org>; Thu, 29 Jan 2009 10:20:11 GMT
Received: (from dtm@localhost)
	by holyrood.ed.ac.uk (8.13.7/8.12.9/Submit) id n0TAKBKh014960
	for sc22wg5@open-std.org; Thu, 29 Jan 2009 10:20:11 GMT
Message-Id: <200901291020.n0TAKBKh014960@holyrood.ed.ac.uk>
Date: 29 Jan 2009  10:20:11 GMT
From: D Muxworthy <dtm@holyrood.ed.ac.uk>
Subject: Fwd: BOUNCE sc22wg5@open-std.org:    Non-member submission from ["Craig Dedo" <craig@ctdedo.com>]   
To: sc22wg5@open-std.org
X-Edinburgh-Scanned: at nougat.ucs.ed.ac.uk
    with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus
Content-Type: text/plain
MIME-Version: 1.0
Content-Disposition: inline
X-Scanned-By: MIMEDefang 2.60 on 129.215.13.205
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

>From craig@ctdedo.com  Thu Jan 29 01:54:48 2009
Return-Path: <craig@ctdedo.com>
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 399 seconds by postgrey-1.18 at www2.open- 
std.org; Thu, 29 Jan 2009 01:54:47 CET
Received: from ws6-9.us4.outblaze.com (ws6-9.us4.outblaze.com  
[205.158.62.53])
	by www2.open-std.org (Postfix) with SMTP id F102BC178D6
	for <sc22wg5@open-std.org>; Thu, 29 Jan 2009 01:54:47 +0100 (CET)
Received: (qmail 20677 invoked from network); 29 Jan 2009 00:48:05  
-0000
Received: from unknown (HELO Elessar) (craig@ctdedo.com@70.94.16.117)
  by ws6-9.us4.outblaze.com with SMTP; 29 Jan 2009 00:48:05 -0000
From: "Craig Dedo" <craig@ctdedo.com>
To: "WG5 Mailing List" <sc22wg5@open-std.org>
References: <20090128214406.86E15C178D6@www2.open-std.org>  
<20090128235744.C7EAEC178D6@www2.open-std.org>
In-Reply-To: <20090128235744.C7EAEC178D6@www2.open-std.org>
Subject: RE: (j3.2006) (SC22WG5.3931) Two requirements for critical software at JPL
Date: Wed, 28 Jan 2009 18:47:56 -0600
Message-ID: <!&! 
AAAAAAAAAAAYAAAAAAAAAEm5zvsZia5MkUMdZm8pSmSCpgAAEAAAAIQA4iQFxidHnGPP3L 
S7awsBAAAAAA==@ctdedo.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcmBpD+xOUaNVKh5RBWeuMT90ffCdgABGO7w
Content-Language: en-us
Disposition-Notification-To: "Craig Dedo" <craig@ctdedo.com>

Everyone:
	I believe that asserts as part of the base language would be very
useful and highly desirable.  There are two ways I can think of  
right away
to be able to turn them on or off at will.
	1.  Use CoCo or another pre-processor.
	2.  Use some kind of prefix in front of the assert that could be
interpreted as a comment and then turn the assert on or off using a  
compiler
option.  Perhaps J3 and WG5 could standardize a prefix that would  
be used
for all ISO-defined optional statements.

	FWIW, I believe that a good choice would be "!ISO", for
"International Standards Organization", for a number of reasons.
	1.  I believe that this prefix is not used by any Fortran processor
or pre-processor.
	2.  It is along the lines of other prefixes defined by existing
Fortran compilers and also by third-party products such as HPF.
	3.  If a Fortran compiler has not yet been updated to include the
ISO-defined optional statements, !ISO statements will appear as  
comments and
be safely ignored.  Thus, the use of !ISO for a prefix will not break
existing programs.

	I strongly suspect that it is way too late in the development
process of Fortran 2008 to include it in the current draft.  Would  
J3 and
WG5 be willing to pursue this idea as a TR? What other development  
options
are there?   What do others think of this idea?

Sincerely,
Craig Dedo
17130 W. Burleigh Place
P. O. Box 423                Voice Phone:  (262) 783-5869
Brookfield, WI   53008-0423  Fax Phone:    (262) 783-5928
USA                          Mobile Phone:  (414) 412-5869
E-mail:  <cdedo@wi.rr.com> or <craig@ctdedo.com>


> -----Original Message-----
> From: j3-bounces@j3-fortran.org [mailto:j3-bounces@j3-fortran.org] On
> Behalf Of Bill Long
> Sent: Wednesday, January 28, 2009 18:01
> To: Van.Snyder@jpl.nasa.gov; fortran standards email list for J3
> Cc: sc22wg5
> Subject: (j3.2006) (SC22WG5.3931) Two requirements for critical
> software at JPL
>
>
>
> Van Snyder wrote:
>> I have just gotten a document frou the JPL Laboratory for Reliable
>> Software, specifying coding requirements and recommendations to
> increase
>> the reliability of critical software in C.  Most of these are to  
>> work
>> around defects in C, but two (which are requirements, not
>> recommendations) are germane to Fortran development:
>>
>> 1.  Declare data objects at smallest possible level of scope.
>>
>> We've added the BLOCK construct.  The facility it provides to
>> encapsulate declarations in a region smaller than a scoping unit
> would
>> more likely be used if a specification part were allowed in every
>> <block>, not just a BLOCK construct.
>>
>> 2.  Use static and dynamic assertions as sanity checks.
>>
>> These were on the J3 list in 2005, but didn't make it to WG5.
>>
>> One of the justifications for this requirement was a study reported
> in
>> http://research.microsoft.com/apps/pubs/default.aspx?id=70290
>> ("Assessing the relationship between software assertions and code
>> quality").  The abstract remarks "... with an increase in the
> assertion
>> density in a file there is a statistically significant decrease in
> fault
>> density. Further, the usage of software assertions in these
> components
>> found a large percentage of the faults in the bug database."
>>
>>
>
> But then the "Lessons Learned" conclusion to the paper remarks "We
> believe enforcing the use of assertions would not work well."
>
> We have recently added features to Fortran that we now have to  
> document
> with comments along the lines of "this feature is supported by the
> compiler because it is in the language spec, but we strongly  
> recommend
> that it not be used in actual codes"  because of disastrous  
> performance
> implications.  I hesitate to add more such features.
>
> I would note that our compiler (as a C program itself) contains an
> enormous number of asserts.  They help in pinpointing bugs closer to
> the
> point where something went wrong (as opposed to much farther down the
> execution sequence when the consequences of the bug manifest as a  
> fatal
> error).  As such they are useful.  We also get complaints that the
> compiler is slow.  For a compiler that's not horribly serious.  For
> production Fortran code poor performance is a non-starter.  Different
> environments and different objectives.  At a minimum, if we wanted
> asserts in Fortran, there would have to be a simple way to make them
> appear to be comments to the compiler.  (Basically the old "D"  
> lines.)
>
> Cheers,
> Bill
>
>
> --
> Bill Long                                   longb@cray.com
> Fortran Technical Support    &              voice: 651-605-9024
> Bioinformatics Software Development         fax:   651-605-9142
> Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
>
>
>
> _______________________________________________
> J3 mailing list
> J3@j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

