comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Run-time checking and speed
Date: 29 Jan 1995 08:00:21 -0500
Date: 1995-01-29T08:00:21-05:00	[thread overview]
Message-ID: <3gg3h6$p8a@gnat.cs.nyu.edu> (raw)
In-Reply-To: 3gbr4f$p4b@theopolis.orl.mmc.com

>dewar@cs.nyu.edu (Robert Dewar) wrote:
>>
>> Mike, you miss the point that in some environments it is REQUIRED to turn
>> off runtime checking.
>>
>> Why, because runtime checking can create code that cannot be executed, and
>> in some verification environments coverage testing is required, so you cannot
>> have code and logic paths that cannot be executed.
>>
>
>Whenever we had such requirements, they were for the SOURCE code, not
>for the EXECUTABLE code! Are you telling me you actually dissasembled
>your executables and checked to make sure there was no dead code?
>Unless your compiler was REAL good at optimization, your executables
>were probably FULL of dead code by this definition.

Absolutely, I am talking about coverage testing on the generated object code,
which ensures that every reachable instruction has been executed by at least
one test program, and, in a stronger form, that every logic branch has been
executed both ways, and all branches of a case have been taken etc.

This seems normal to me in a safety critical environment (people aren't very
trusting of their compilers in such environments, or of anything else, and
that's the way you would hope it would be).

Dead code is a problem. You can take one of two approaches (I have seen both
done). First, you can just require that there be no dead code (code that has
no branch path to it should be trivially eliminated even by a pretty weak
optimizer, so I don't quite know what T.E.D is referring to when he says
that executables would be full of dead code. This is the approach that I
have most often seen used. The second approach concentrates on making sure
that all logic paths are tested, and then you don't care about dead code,
but I am afraid that in Ada you DO have to consider failing a check and
signalling an exception as a logic path, and making sure that all logic
paths are taken means making sure all exception handlers are executed.


Robert




  parent reply	other threads:[~1995-01-29 13:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-01-10 22:20 Run-time checking and speed Tony Leavitt
1995-01-12  1:14 ` Roger Labbe
1995-01-13 12:09   ` Philip Brashear
     [not found] ` <3f0prq$3bq@theopolis.orl.mmc.com>
1995-01-12 14:13   ` Robert Dewar
1995-01-13  1:49     ` Doug Smith
1995-01-13 15:29       ` Norman H. Cohen
1995-01-13 15:21     ` Norman H. Cohen
     [not found]     ` <3fa2pk$kbi@felix.seas.gwu.edu>
     [not found]       ` <EACHUS.95Jan17151835@spectre.mitre.org>
     [not found]         ` <3fjhrj$9b3@oahu.cs.ucla.edu>
1995-01-20  5:11           ` Robert Dewar
1995-01-23 16:43             ` Mats Weber
1995-01-24 19:25               ` Robert Dewar
1995-01-22 18:43         ` Michael Feldman
1995-01-23 23:38           ` Robert Dewar
1995-01-26 16:14             ` Kent Mitchell
1995-01-28  6:03               ` Robert Dewar
     [not found]             ` <3gbr4f$p4b@theopolis.orl.mmc.com>
1995-01-29 13:00               ` Robert Dewar [this message]
1995-01-30 19:21                 ` Garlington KE
1995-01-12 15:11 ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1995-01-12 15:54 Keith Arthurs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox