Summary
The paper is devoted to a program-correctness concept which captures partial correctness, termination (nonlooping) and clean termination (nonabortion). The underlying proof method offers a one-stage proof of all the three properties. This method is proved consistent and algebraically complete. It is first discussed for the general case of arbitrary possibly nondeterministic iterative programs. Next, this case is restricted to arbitrary deterministic iterative programs and finally to structured programs. The presented approach is compared with partial correctness, total correctness and weakest precondition methods. The concluding example shows the verification of an arithmetical program in machine-bounded arithmetics. As a side effect of the verification procedure one finds input boundary conditions which guarantee clean termination.
Similar content being viewed by others
References
Bakker de, J.W.: Mathematical Theory of Program Correctness, Englewoods Cliffs: Prentice-Hall Int., 1980
Bakker de, J.W., Meertens, L.G.L.T.: On the completness of the inductive assertion method. J. Comput. System Sci. II, 323–357 (1975)
Blikle, A.: An algebraic approach to mathematical theory of programs. CCPAS Reports 119 (1973)
Blikle, A.: Proving programs by δ-relations. Formalization of semantics of programming languages and writing of Compilers (Proc. Symp. Frankfurt/Oder 1974). Elektron. Informationsverarbeit. Kybernetik 11, 267–274 (1975)
Blikle, A.: A comparative review of some program-verification methods. In: Mathematical Foundations of Computer Science 1977 (Proc. 6th Symp. Tatranska Lomnica 1977). (J. Gruska, ed.) Lecture Notes in Computer Sciences, Vol. 53, pp. 17–33. Berlin-Heidelberg-New York: Springer 1977
Blikle, A.: Assertion programming. In: Mathematical Foundations of Computer Science (Proc. 8th Symposium. Olomouc 1979) (J. Becvar ed.) Lecture Notes in Computer Sciences, Vol. 74. Berlin-Heidelberg-New York: Springer 1979
Blikle, A.: On correct program development. (Proc. 4th Int. Conf. on Software Engineering, Sept. 1979 Munich, pp. 164–173) IEEE Catalog No. 79 CH 1479-5 C, 1979b
Blikle, A.: On the development of correct specified programs. IEEE Transactions on Software Engineering (to appear in 1981)
Blikle, A., Mazurkiewicz, A.: An algebraic approach to the theory of programs, algorithms, languages and recursiveness. Math. Found. Comp. Sci. (Proc. Symp. Warsaw-Jablonna 1972) Warsaw 1972
Coleman, D., Hughes, J.W.: The clean termination of PASCAL programs. Acta Informat. 11, 195–210 (1979)
Dijkstra, E.W.: Guarded commands, non-determinancy and a calculus for the derivation of programs. (Proc. 1975 Int. Conf. Reliable Software) Comm. ACM 18, 453–457 (1975)
Dijkstra, E.W.: A discipline of programming. Englewood Cliffs: Prentice Hall 1976
Floyd, R.W.: Assigning meanings to programs. Appl. Math. Comput. 19, 19–32 (1967)
Hitchcock, P., Park, D.: Induction rules and termination proofs, in: Automata, Languages and Programming (Proc. IRIA Symp. 1972, M. Nivat, ed.) Amsterdam: North Holland 1973
Hoare, C.A.R.: An axiomatic definition of the programming language PASCAL. (International Symposium on Theoretical Programming). Lecture Notes in Computer Science, Vol. 5. Springer: Berlin-Heidelberg-New York 1974
Jensen, K., Wirth, N.: PASCAL User Manual. 2nd ed. Springer: Berlin-Heidelberg-New York 1975
Manna, Z., Pnueli, A.: Axiomatic approach to total correctness of programs. Acta Informat. 3, 243–263 (1974)
Mazurkiewicz, A.: Proving algorithms by tail functions, Information and Control 18, 220–226 (1971)
Mazurkiewicz, A.: Proving properties of processes. Algorytmy 11, 5–22 (1974)
McCarthy, J.: A basis for a mathematical theory of computation. (Western Joint Computer Conference, May 1961) (P. Braffort, D. Hirschberg, eds.), Computer Programming and Formal Systems. Amsterdam, North Holland: 1967, pp. 33–70
Naur, P.: Proof of algorithms by general snapshots. BIT 6, 310–316 (1966)
Roever de, W.P.: Dijkstra's predicate transformer, nondeterminism, recursion and termination. Mathematical Foundation of Computer Science 1976 (Proc. 5th. Symp. Gdansk, September 1976) (A. Mazurkiewicz, ed.) Lecture Notes in Computer Sciences, Vol. 45, pp. 472–481. Berlin-Heidelberg-New York: Springer 1976
Sites, R.L.: Proving that computer programs terminate cleanly. STAN-CS-74-418, 1974
Strachey, C, Wadworth, C.P.: Continuations, a mathematical semantics for handling full jumps. Technical Monograph PRG-11, Oxford 1974
Turing, A.M.: On checking a large routine. Report of a Conference on High Speed Automatic Calculating Machines, pp. 67–69, University Mathematical Laboratory, Cambridge 1949
Author information
Authors and Affiliations
Additional information
This paper was prepared when the author was visiting the Department of Computer Science of the Technical University of Denmark in Lyngby.
Rights and permissions
About this article
Cite this article
Blikle, A. The clean termination of iterative programs. Acta Informatica 16, 199–217 (1981). https://doi.org/10.1007/BF00261259
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00261259