Towards A Method Of Programming With Assertions

Embedded assertions have long been recognized as a Po- tentially powerful tool for automatic runtime detection of software faults during debugging, testing and maintenance. Yet despite the richness of the notations and the maturity of the techniques and tools that have been developed for programming with assertions, assertions are a development tool that has seen little widespread use in practice. The main reasons seem to be that (1) previous assertion processing tools did not integrate easily with existing programming environments, and (2) it is not well understood what kinds of assertions are most effective at detecting software faults. This paper describes experience using an assertion processing tool that was built to address the concerns of ease-of-use and effectiveness. The tool is called App, an Annotation Pre- Processor for C programs developed in UNIX-based de- velopment environments. APP has been used to develop a number of software systems over the past three years Based on this experience, the paper presents a classification of the assertions that were most effective at detecting faults. While the assertions that are described guard against many common kinds of faults and errors, the very commonness of such faults demonstrates the need for an explicit, high-level, automatically check-able specification of required behavior. It is hoped that the classification presented in this paper will prove to be a useful first step in developing a method of programming with assertions.

[1]  Stuart I. Feldman,et al.  Make — a program for maintaining computer programs , 1979, Softw. Pract. Exp..

[2]  Sriram Sankar,et al.  Two-dimensional pinpointing: debugging with formal specifications , 1991, IEEE Software.

[3]  Sriram Sankar,et al.  The complete transformation methodology for sequential runtime checking of an ANNA subset , 1986 .

[4]  David C. Luckham,et al.  An Overview of Anna, a Specification Language for Ada , 1985, IEEE Software.

[5]  Barry Boehm,et al.  Some experience with automated aids to the design of large-scale reliable software , 1975 .

[6]  Elaine J. Weyuker,et al.  Selecting Software Test Data Using Data Flow Information , 1985, IEEE Transactions on Software Engineering.

[7]  S. Yau,et al.  Design of self-checking software , 1975, Reliable Software.

[8]  Leon G. Stucki,et al.  New assertion concepts for self-metric software validation , 1975 .

[9]  David C. Luckham Programming with Specifications: An Introduction to ANNA, A Language for Specifying Ada Programs , 1990 .

[10]  Dewayne E. Perry,et al.  EMPIRICAL STUDY OF SOFTWARE INTERFACE FAULTS. , 1985 .

[11]  Dewayne E. Perry The inscape environment , 1989, ICSE '89.

[12]  Sriram Sankar,et al.  Concurrent Runtime Checking of Annotated Ada Programs , 1986, FSTTCS.

[13]  Glenn S. Fowler A case for make , 1990, Softw. Pract. Exp..

[14]  Nancy G. Leveson,et al.  The Use of Self Checks and Voting in Software Error Detection: An Empirical Study , 1990, IEEE Trans. Software Eng..

[15]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[16]  Sriram Sankar,et al.  Automatic runtime consistency checking and debugging of formally specified programs , 1989 .

[17]  Balachander Krishnamurthy,et al.  An event-based model of software configuration management , 1991, SCM '91.

[18]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[19]  Richard C. Holt,et al.  The Turing programming language , 1988, CACM.

[20]  David Rosenblum,et al.  An implementation of Anna , 1985, SIGAda '85.

[21]  Dewayne E. Perry,et al.  EMPIRICAL STUDY OF SOFTWARE INTERFACE FAULTS - AN UPDATE. , 1987 .

[22]  Sriram Sankar Run-time consistency checking of algebraic specifications , 1991, TAV4.