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: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public From: paul.johnson@gecm.com (Paul Johnson) Subject: Re: Safety-critical development in Ada and Eiffel Date: 1997/08/13 Message-ID: <5sskfd$nn5$2@miranda.gmrc.gecm.com>#1/1 X-Deja-AN: 264326560 References: <33E09CD5.634F@flash.net> <33E9ADE9.4709@flash.net> <5siqrr$3of@jupiter.milkyway.org> <5smgts$p68$1@miranda.gmrc.gecm.com> <33EFCCE4.4CE0@flash.net> Organization: GEC-Marconi Research Centre Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-08-13T00:00:00+00:00 List-Id: In article <33EFCCE4.4CE0@flash.net>, kennieg@flash.net says... >Leaving out executable assertions is just as easy as leaving out >non-executable ones, isn't it? Yes, but once they are in there, they are checked against the code. >> A mature software process can also use this property by tracking assertion >> failures and using them to monitor and improve inspection procedures. > >Is there a systematic method for reviewing code to determine if the >right number and type of assertions have been added? Yes. The assertions should express the requirements that the rest of the system has for the class. A class with no assertions basically promises to take any input and either do something or nothing. (Aside: it puts me in mind of a company prospectus from the South Sea Bubble: "An undertaking of great advantage, but nobody to know what it is".) The client code can be checked against the assertions: if the client relies on undocumented (i.e. unasserted) behaviour then it is at fault. On the other hand if the supplier class fails to promise anything useful then its a useless piece of code anyway, and can be rejected on those grounds. The whole point is to document the interface, and then check the documentation for correctness. Paul. -- Paul Johnson | GEC-Marconi Ltd is not responsible for my opinions. | +44 1245 242244 +-----------+-----------------------------------------+ Work: | You are lost in a twisty maze of little Home: | standards, all different.