Introducing Proofs of a Program's Termination in an Undergraduate Software Engineering Course

The author made the first attempt to introduce proofs of program correctness in an undergraduate software engineering course in Fall 2005 at the author's university. The author also noticed that existing textbooks might cover Hoare's axioms for proving partial correctness of program without touching proofs of program terminations. In this paper, we are presenting a method for proving a program's termination. After Hoare's axioms are applied to a program, the method can be applied to the program to show whether the program terminates successfully with correct outputs. Different techniques for proving program terminations in terms of different loop structures are also discussed. With the introduction of proofs of program terminations to students in a software engineering course, the students can have a full picture of proofs of program correctness. Lastly, we present our experience of teaching proofs of program correctness.

[1]  Chia-Chu Chiang,et al.  Towards Quality of Software in TUG , 2004, J. Inf. Sci. Eng..

[2]  Vicki L. Almstrum,et al.  Support for teaching formal methods , 2001, SGCS.

[3]  Frederick P. Brooks,et al.  No Silver Bullet: Essence and Accidents of Software Engineering , 1987 .

[4]  Ali Mili,et al.  Some thoughts on teaching first year programming , 1984, SIGSCE '84.

[5]  Harlan D. Mills,et al.  Trace: Tennessee Research and CreativeExchange , 2022 .

[6]  Chia-Chu Chiang,et al.  Structured design with mathematical proofs , 1997, Inf. Softw. Technol..

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

[8]  Gabriel J. Ferrer Teaching cleanroom software engineering with object-oriented data abstraction , 2006 .

[9]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[10]  Zohar Manna,et al.  A closer look at termination , 1975, Acta Informatica.

[11]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[12]  Timothy S. Gegg-Harrison,et al.  Studying program correctness by constructing contracts , 2003 .

[13]  Boris Beizer,et al.  Software Testing Techniques , 1983 .

[14]  W. D. Maurer The teaching of program correctness , 1977, SIGCSE '77.

[15]  Chia-Chu Chiang,et al.  A formal method for proving programs correct , 2001, 2001 IEEE International Conference on Systems, Man and Cybernetics. e-Systems and e-Man for Cybernetics in Cyberspace (Cat.No.01CH37236).