From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9da298537a16487e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-30 11:21:11 PST Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!news.duke.edu!solaris.cc.vt.edu!swiss.ans.net!butch!cliffy.lfwc.lockheed.com!cliffy.lfwc.lockheed.com!l107353 From: l107353@cliffy.lfwc.lockheed.com (Garlington KE) Newsgroups: comp.lang.ada Subject: Re: Run-time checking and speed Date: 30 Jan 1995 19:21:11 GMT Organization: Lockheed Fort Worth Company Message-ID: <3gje77$f4f@cliffy.lfwc.lockheed.com> References: <3ev16u$ojc@pong.lasc.lockheed.com> <3f3deb$4us@gnat.cs.nyu.edu> <3fa2pk$kbi@felix.seas.gwu.edu> <3fu902$6al@felix.seas.gwu.edu> <3g1eku$lmd@gnat.cs.nyu.edu> <3gbr4f$p4b@theopolis.orl.mmc.com> <3gg3h6$p8a@gnat.cs.nyu.edu> NNTP-Posting-Host: 134.189.143.19 X-Newsreader: TIN [version 1.2 PL2] Date: 1995-01-30T19:21:11+00:00 List-Id: : >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. Two other points about "disassembling the executable": 1. There are now capabilities described in the Ada 95 Safety and Security annex to assist in checking the object code for dead code. 2. Appearently, our compiler is real good at optimization, because dead code is pretty rare. I never thought of our compiler as being THAT good, but maybe my expectations are too high :) : 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. Actually, we take a third approach: We do care about the dead code, but we do allow it in a few cases (if our analysis of the reason for the dead code shows that it isn't due to some error in the algorithm, etc.). -------------------------------------------------------------------- Ken Garlington GarlingtonKE@lfwc.lockheed.com F-22 Computer Resources Lockheed Fort Worth Co. If LFWC or the F-22 program has any opinions, they aren't telling me.