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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3f280e3f1e97f305 X-Google-Attributes: gid103376,public From: Gerhard Radatz Subject: Re: Finding out parameters which are not written Date: 1997/08/12 Message-ID: <33F07EA1.51D1@aut.alcatel.at>#1/1 X-Deja-AN: 263731619 References: <33F02867.322D@aut.alcatel.at> Organization: Alcatel Austria AG Newsgroups: comp.lang.ada Date: 1997-08-12T00:00:00+00:00 List-Id: Gerhard Radatz wrote: > > Does anyone know about a tool which can detect such situations as the > following: > > procedure xxx (result: out INTEGER) is > begin > if <> then > result := 0; > end if; > end; > > Obviously, this proc is erroneous and result will not be written if > <> is FALSE. > However, my Ada-Compiler (DEC-ADA for VMS) does not detect this problem, > because result is written "at least once" in the body of xxx. > > Is there any tool which can provide help ??? I admit that it is very difficult to find such potential problems at compile time. Therefore, I'm rather looking for such a thing like an expert system which can examine complex code, evaluate every possible flow of control and at least give some hints. Surely its best to code-read to be able to find out unwritten parameters, but in projects consisting of a few hundred packages with a few 100.000 lines of code, this is lots of work.