Summary
It is shown how the weakest precondition approach to proving total correctness of nondeterministic programs can be formalized in infinitary logic. The weakest precondition technique is extended to hierarchically structured programs by adding a new primitive statement for operational abstraction, the nondeterministic assignment statement, to the guarded commands of Dijkstra. The infinitary logic L ω1ω is shown to be strong enough to express the weakest preconditions for Dijkstra's guarded commands, but too weak for the extended guarded commands. Two possible solutions are considered: going to the essentially stronger infinitary logic L ω1ω1 and restricting the power of the nondeterministic assignment statement in a way which allows the weakest preconditions to be expressed in L ω1ω.
Similar content being viewed by others
References
Back, R.J.R.: Correctness preserving program refinements: Proof theory and applications. Mathematical Center Tracts 131. Amsterdam: Mathematisch Centrum 1980
Back, R.J.R.: Semantics of unbounded nondeterminism. In: Proc. 7th Coll. Automata, Languages and Programming (J.W. de Bakker, J. van Leeuwen, eds.). Lecture Notes in Computer Science, Vol. 85, pp. 51–63. Berlin-Heidelberg-New York: Springer 1980
Banachowski, L., A. Kreczmar, G. Mirkowska, H. Rasiowa, A. Salwicki: An introduction to algorithmic logic; metamathematical investigations in the theory of programs. In: Mathematical foundations of computer science. (A. Mazurkiewicz, Z. Pawlak, eds.), Banach Center Publications, Vol. 2, pp. 7–99. Warsaw: PWN-Polish Scientific Publishers 1977
Barwise, J.: An introduction to first-order logic. In: Handbook of mathematical logic (J. Barwise, ed.), pp. 5–46. Amsterdam: North-Holland 1977
Boom, H.J.: A weaker precondition for loops. Mathematisch Centrum Amsterdam, report IW 104/78, 1978
Constable, R.L.: On the theory of programming logic. In: 9th ACM Symposium on Theory of Computing, Boulder, Colorado 1977, pp. 269–285. New York: ACM 1977
Dickmann, M.A.: Large infinitary languages. Amsterdam: North-Holland 1975
Dijkstra, E.W.: A discipline of programming. Engelwood-Cliffs: Prentice-Hall 1976
Engeler, E.: Remarks on the theory of geometrical constructions. In: The syntax and semantics of infinitary languages (J. Barwise, ed.), Lecture Notes in Mathematics, Vol. 72, pp. 64–76. Berlin-Heidelberg-New York: Springer 1968
Engeler, E.: Algorithmic logic. In: Foundations of computer science (J.W. de Bakker, ed.), Mathematical Center Tracts 63, pp. 57–85. Amsterdam: Mathematisch Centrum 1975
Harel, D.: First-order dynamic logic. Lecture Notes in Computer Science, Vol. 68. Berlin-Heidelberg-New York: Springer 1979
Hehner, E.: Do considered od: a contribution to the programming calculus. Acta Informat. 11, 287–304 (1979)
Hoare, C.A.R.: Procedures and parameters: An axiomatic approach. In: Symposium on semantics of algorithmic languages (E. Engeler, ed.), Lecture Notes in Mathematics, Vol. 188, pp. 102–116. Berlin-Heidelberg-New York: Springer 1971
Karp, C.R.: Languages with expressions of infinite length. Amsterdam: North-Holland 1964
Keisler, H.J.: Model theory for infinitary logic. Amsterdam: North-Holland 1971
Keisler, H.J.: Fundamentals of model theory. In: Handbook of mathematical logic (J. Barwise, ed.), pp. 47–104. Amsterdam: North-Holland 1977
Manna, Z.: Mathematical theory of computing. New York: McGraw-Hill 1974
Pratt, V.R.: Semantic considerations of Floyd-Hoare logic. In: Proc. 17th IEEE Symp. on Foundations of Computer Science, Houston, Texas 1976, pp. 109–121. Long Beach: IEEE 1976
Rasiowa, H.: Algorithmic logic and its extensions, a survey. In: 5th Scandinavian Logic Symposium, Aalborg 1979, pp. 163–174. Aalborg University Press 1979
Salwicki, A.: Formalized algorithmic languages. Bull. Acad. Polon. Sci., Ser. Math. 18, 227–232 (1970)
Scott, D.: Logic with denumerably long formulas and finite strings of quantifiers. In: Symp. on the Theory of Models (J. Addison, L. Henkin, A. Tarski, eds.), pp. 329–341. Amsterdam: North-Holland 1965
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Back, R.J.R. Proving total correctness of nondeterministic programs in infinitary logic. Acta Informatica 15, 233–249 (1981). https://doi.org/10.1007/BF00289263
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00289263