skip to main content
article
Free Access

Countable nondeterminism and random assignment

Published:10 August 1986Publication History
Skip Abstract Section

Abstract

Four semantics for a small programming language involving unbounded (but countable) nondeterminism are provided. These comprise an operational semantics, two state transformation semantics based on the Egli-Milner and Smyth orders, respectively, and a weakest precondition semantics. Their equivalence is proved. A Hoare-like proof system for total correctness is also introduced and its soundness and completeness in an appropriate sense are shown. Finally, the recursion theoretic complexity of the notions introduced is studied. Admission of countable nondeterminism results in a lack of continuity of various semantic functions, and this is shown to be necessary for any semantics satisfying appropriate conditions. In proofs of total correctness, one resorts to the use of (countable) ordinals, and it is shown that all recursive ordinals are needed.

References

  1. 1 ACZEL, P. An introduction to inductive definitions. In Handbook of Mathematical Logic, J. Barwise, Ed. North Holland Studies in Logic and the Foundations of Mathematics, vol. 90, Elsevier-North Holland, Amsterdam, 1977, pp. 739-792.]]Google ScholarGoogle Scholar
  2. 2 APT, K.R. Ten years of Hoare's logic: A survey--Part I. ACM Trans. Program. Lang. Syst. 3, 4 (Oct. 1981 ), 431-483.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 APT, K.R. Ten years of Hoare's logic: A survey, Part II, nondeterminism. Theoret. Comput. Sci. 28 (1984), 83-109.]]Google ScholarGoogle ScholarCross RefCross Ref
  4. 4 APt, K. R., ANO MAREK, W. Second order arithmetic and related topics. Ann. Math. Logic 6 (1974), 177-209.]]Google ScholarGoogle ScholarCross RefCross Ref
  5. 5 APt, K. R., AND OLDEROG, E.-R. Proof rules and transformations dealing with fairness. Sci. Comput. Prog. 3 (1983), 65-100.]]Google ScholarGoogle ScholarCross RefCross Ref
  6. 6 APT, K. R., AND PLOTKIN, G.D. A Cook's tour of countable nondeterminism. In Proceedings ICALP "81, S. Even and O. Kariv, Eds. Lecture Notes in Computer Science, vol. 115. Springer- Verlag, New York, 1981, pp. 479-494.]] Google ScholarGoogle Scholar
  7. 7 BACK, R.J. A continuous semantics for unbounded nondeterminism. Theoret. Comput. Sci. 23, 2 (1983), 187-210.]]Google ScholarGoogle ScholarCross RefCross Ref
  8. 8 BACk, R.J. Semantics of unbounded non-determinism. In Proceedings of the 7th Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 85. Springer- Verlag, New York, 1980, pp. 51-63.]] Google ScholarGoogle Scholar
  9. 9 BACK, R.J. Proving total correctness of non-deterministic programs in infinitary logic. Acta Inf. 15 (1981), 233-250.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10 BERRY, G., CUR~EN, P. L., AND LEVV, J.J. Full abstraction for sequential languages: The state of the art. In Proceedings of the French Seminar on the Applications of Algebra to Language Definition and Compilation (Fountainbleau, 1982), M. Nivat and J. Reynolds, Eds. Cambridge University Press, Cambridge, Mass., 1985.]]Google ScholarGoogle Scholar
  11. 11 BOOM, H.J. A weaker precondition for loops. ACM Trans. Program. Lang. Syst. 4, 4 (Oct. 1982), 668-677.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12 BROY, M., GNATZ, R., AND WIRSING, M. Semantics of non-deterministic and non-continuous constructs. In Program Construction, International Summer School Marktoberdorf (July 1978), F. L. Bauer and M. Broy, Eds. Lecture Notes in Computer Science, vol. 69. Springer-Vedag, New York, 1979, pp. 553-591.]] Google ScholarGoogle Scholar
  13. 13 CHANDRA, A. Computable non-deterministic functions. In Proceedings of the 19th Annual Symposium on Foundations of Computer Science. IEEE, New York, 1978, 127-131.]]Google ScholarGoogle Scholar
  14. 14 DE BAKKER, J.W. Mathematical Theory of Program Correctness. Prentice-Hall, Englewood Cliffs, N.J., 1980.]] Google ScholarGoogle Scholar
  15. 15 DE BAKKER, J. W., AND ZUCKER, J.i. Denotational semantics of concurrency, in Proceedings of the 14th Annual ACM Symposium on Theory of Computing. ACM, New York, 1982, pp. 153-158.]] Google ScholarGoogle ScholarCross RefCross Ref
  16. 16 DUKSTRA, E.W. A Discipline of Programming. Prentice-Hall, Englewood Cliffs, N. J., 1976.]]Google ScholarGoogle Scholar
  17. 17 EMERSON, E. A., AND CLARKE, E.M. Characterizing correctness properties of parallel programs using fixpoints. In Proceedings of the 7th Colloquium on Automata, Languages, and Programming. Lecture Notes in Computer Science, vol. 85, Springer-Verlag, New York, 1980, pp. 169-181.]] Google ScholarGoogle Scholar
  18. 18 FLOYD, R.W. Assigning meanings to programs, in Proceedings of AMS Symposium in Applied Mathematics 19 (1967), 19-31.]]Google ScholarGoogle ScholarCross RefCross Ref
  19. 19 GUREVlCH, Y. Toward a logic tailored for computational complexity. In Proceedings of 1983 Logic Colloquium in Aachen, Lecture Notes in Mathematics, vol 104. Springer-Verlag, New York, 1984.]]Google ScholarGoogle Scholar
  20. 20 HAR~L, D. First-order dynamic logic. In Lecture Notes in Computer Science, vol. 68. Springer- Vedag, Berlin, 1979.]] Google ScholarGoogle Scholar
  21. 21 HAREL, D., AND KOZEN, D. A programming language for the inductive sets and applications. Inf. Cont. 63 (1984), 118-139.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22 HENNESSY, M. C. H., AND PLOTmN, G.D. Full abstraction for a'simple parallel programming language. In Mathematical Foundations of Computer Science, J. Becvar, Ed. Lecture Notes in Computer Science, vol. 74. Springer-Verlag, New York, 1979, pp. 108-120.]]Google ScholarGoogle Scholar
  23. 23 Hn'CHCOCK, P., AND PARK, D. induction rules and termination proofs. In Automata, Languages, and Programming, M. Nivat, Ed. North Holland, Amsterdam, 1973.]]Google ScholarGoogle Scholar
  24. 24 MANNA, Z., AND PNUELI, A. Axiomatic approach to total correctness of programs. Acta Inf. 3 (1974), 253-262.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25 MILNE, G., AND MILNER, R. Concurrent processes and their syntax. J. ACM 26, 2 (July 1979), 302-321.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26 MOSCHOVAKIS, Y.N. Elementary induction on abstract structures. North-Holland, Amsterdam, 1974.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27 NIVAT, M. Infinite words, infinite trees, infinite computations. In Foundations of Computer Science, J. W. de Bakker and J. van Leeuwen, Eds., vol. Ill, no. 2. Mathematical Centre Tracts, vol. 109, 1979, pp. 3-52.]]Google ScholarGoogle Scholar
  28. 28 PARK, D. On the semantics of fair parallelism. In Proceedings of the Winter School on Formal Software Specification. Lecture Notes in Computer Science, vol. 86. Springer-Verlag, New York, 1980, pp. 504-526.]] Google ScholarGoogle Scholar
  29. 29 PARK, D. A predicate transformer for weak fair iteration. In Proceedings of the 6th IBM Symposium on Mathematical Foundations of Computer Science (Hakone). IBM, New York, 198 I.]]Google ScholarGoogle Scholar
  30. 30 PLOTKIN, G.D. A powerdomain construction. SIAM J. Comput. 5, 3 (1976), 452-487.]]Google ScholarGoogle ScholarCross RefCross Ref
  31. 31 PLOTKIN, G.O. Dijkstra's predicate transformers and Smyth's powerdomains. In Proceedings of the Winter School on Formal Software Specification. Lecture Notes in Computer Science, vol. 86. Springer-Verlag, New York, 1980, pp. 527-553.]] Google ScholarGoogle Scholar
  32. 32 ROGERS, H., JR. Theory of Recursive Functions and Effective Computability. McGraw-Hill, New York, 1967.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33 SMVTH, M. Powerdomains. J. Comput. Syst. Sci. 16, i (1978), 23-36.]]Google ScholarGoogle Scholar
  34. 34 SPFCTOR. C. Inductively defined sets of natural numbers. In: Infinitistic Methods. Pergamon Press, EImsford, N.Y., 1961, pp. 97-105.]]Google ScholarGoogle Scholar
  35. 35 STov, J. Semantic Models. in Theoretical Foundations of Programming Methodology, M. Broy and G. Schmidt, Eds. Reidel, Hingham, Mass., 1982, pp. 293-324.]]Google ScholarGoogle Scholar

Index Terms

  1. Countable nondeterminism and random assignment

      Recommendations

      Reviews

      D. John Cooke

      This is an impressive paper detailing work first presented at ICALP8 in 1981 [1]. It includes two main results: the nonexistence of a “reasonable” semantics to describe computations that exhibit countable nondeterminism, and that proofs of total correctness in such a system require all the recursive ordinals. However, much other useful (and, indeed, necessary) material is also included, making the paper essentially self-contained. After a preliminary introduction to domain theory, the paper addresses the central issue of countable nondeterminism in programs. This is approached by considering the definition of a small programming language that incorporates the notion of a nondeterministic assignment x := __?__, the application of which results in x being given an arbitrary value from a countable set. An informal discussion of the language is followed by formal definitions that effectively constitute a concise introduction to four semantic definition systems: an operational semantics, two denotational semantics (one based on Egli-Milner orderings, and the other on Smyth orderings), and a weakest precondition semantics. Even though several simplifications are adopted in order to ease the presentation and comparison of the various systems, this part of the paper forms a readable, if very concentrated, presentation of the four chosen systems. This in itself makes the paper of value to those wishing to widen their vocabulary of definitional systems. The equivalence of all four definitions is proved and the authors then consider what properties might be desirable for a “reasonable” semantics. They conclude that it should be a compositional, continuous, correct (defined via operational equivalence and arbitrary contexts), and complete least fixed-point semantics. Several examples are given to illustrate how apparently reasonable semantics fail on at least one of these criteria; this culminates in a proof that, for a language with a countably nondeterministic assignment, such a semantic does not exist. The topological significance of this result for other systems is briefly discussed. The latter part of the paper is concerned with proof theory and the theory of recursive functions. A Hoare-style logic is extended to cope with the countable nondeterminism by means of a generalized deduction rule for the while construct; the resulting proof system is shown to be sound and complete for partial correctness considerations. On the other hand, proofs of termination require exactly all the recursive ordinals, and, as is to be expected, a comprehensive development of the associated theory is included in substantiating this claim. In a paper of this length and intensity, it is almost inevitable that typographical errors will occur; I found some, but very few. Even though the results included herein were announced five years ago, this fuller and more refined presentation contributes significantly to the general development, greater understanding, and overall rationalization of the theory of computing science. The paper is to be highly recommended.

      Access critical reviews of Computing literature here

      Become a reviewer for Computing Reviews.

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Journal of the ACM
        Journal of the ACM  Volume 33, Issue 4
        Oct. 1986
        189 pages
        ISSN:0004-5411
        EISSN:1557-735X
        DOI:10.1145/6490
        Issue’s Table of Contents

        Copyright © 1986 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 10 August 1986
        Published in jacm Volume 33, Issue 4

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader