Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Countable nondeterminism and random assignment

Published: 10 August 1986 Publication History

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]
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.]]
[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.]]
[3]
APT, K.R. Ten years of Hoare's logic: A survey, Part II, nondeterminism. Theoret. Comput. Sci. 28 (1984), 83-109.]]
[4]
APt, K. R., ANO MAREK, W. Second order arithmetic and related topics. Ann. Math. Logic 6 (1974), 177-209.]]
[5]
APt, K. R., AND OLDEROG, E.-R. Proof rules and transformations dealing with fairness. Sci. Comput. Prog. 3 (1983), 65-100.]]
[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.]]
[7]
BACK, R.J. A continuous semantics for unbounded nondeterminism. Theoret. Comput. Sci. 23, 2 (1983), 187-210.]]
[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.]]
[9]
BACK, R.J. Proving total correctness of non-deterministic programs in infinitary logic. Acta Inf. 15 (1981), 233-250.]]
[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.]]
[11]
BOOM, H.J. A weaker precondition for loops. ACM Trans. Program. Lang. Syst. 4, 4 (Oct. 1982), 668-677.]]
[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.]]
[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.]]
[14]
DE BAKKER, J.W. Mathematical Theory of Program Correctness. Prentice-Hall, Englewood Cliffs, N.J., 1980.]]
[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.]]
[16]
DUKSTRA, E.W. A Discipline of Programming. Prentice-Hall, Englewood Cliffs, N. J., 1976.]]
[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.]]
[18]
FLOYD, R.W. Assigning meanings to programs, in Proceedings of AMS Symposium in Applied Mathematics 19 (1967), 19-31.]]
[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.]]
[20]
HAR~L, D. First-order dynamic logic. In Lecture Notes in Computer Science, vol. 68. Springer- Vedag, Berlin, 1979.]]
[21]
HAREL, D., AND KOZEN, D. A programming language for the inductive sets and applications. Inf. Cont. 63 (1984), 118-139.]]
[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.]]
[23]
Hn'CHCOCK, P., AND PARK, D. induction rules and termination proofs. In Automata, Languages, and Programming, M. Nivat, Ed. North Holland, Amsterdam, 1973.]]
[24]
MANNA, Z., AND PNUELI, A. Axiomatic approach to total correctness of programs. Acta Inf. 3 (1974), 253-262.]]
[25]
MILNE, G., AND MILNER, R. Concurrent processes and their syntax. J. ACM 26, 2 (July 1979), 302-321.]]
[26]
MOSCHOVAKIS, Y.N. Elementary induction on abstract structures. North-Holland, Amsterdam, 1974.]]
[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.]]
[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.]]
[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.]]
[30]
PLOTKIN, G.D. A powerdomain construction. SIAM J. Comput. 5, 3 (1976), 452-487.]]
[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.]]
[32]
ROGERS, H., JR. Theory of Recursive Functions and Effective Computability. McGraw-Hill, New York, 1967.]]
[33]
SMVTH, M. Powerdomains. J. Comput. Syst. Sci. 16, i (1978), 23-36.]]
[34]
SPFCTOR. C. Inductively defined sets of natural numbers. In: Infinitistic Methods. Pergamon Press, EImsford, N.Y., 1961, pp. 97-105.]]
[35]
STov, J. Semantic Models. in Theoretical Foundations of Programming Methodology, M. Broy and G. Schmidt, Eds. Reidel, Hingham, Mass., 1982, pp. 293-324.]]

Cited By

View all
  • (2024)Positive Almost-Sure Termination: Complexity and Proof RulesProceedings of the ACM on Programming Languages10.1145/36328798:POPL(1089-1117)Online publication date: 5-Jan-2024
  • (2024)Calculational Design of [In]Correctness Transformational Program Logics by Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36328498:POPL(175-208)Online publication date: 5-Jan-2024
  • (2023)Omnisemantics: Smooth Handling of NondeterminismACM Transactions on Programming Languages and Systems10.1145/357983445:1(1-43)Online publication date: 8-Mar-2023
  • Show More Cited By

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

      Information & Contributors

      Information

      Published In

      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 for this article.

      Check for updates

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)80
      • Downloads (Last 6 weeks)10
      Reflects downloads up to 06 Oct 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Positive Almost-Sure Termination: Complexity and Proof RulesProceedings of the ACM on Programming Languages10.1145/36328798:POPL(1089-1117)Online publication date: 5-Jan-2024
      • (2024)Calculational Design of [In]Correctness Transformational Program Logics by Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36328498:POPL(175-208)Online publication date: 5-Jan-2024
      • (2023)Omnisemantics: Smooth Handling of NondeterminismACM Transactions on Programming Languages and Systems10.1145/357983445:1(1-43)Online publication date: 8-Mar-2023
      • (2023)Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic ChoiceProceedings of the ACM on Programming Languages10.1145/35711957:POPL(33-60)Online publication date: 11-Jan-2023
      • (2023)Verified Exact Real Computation with Nondeterministic Functions and LimitsFundamentals of Computation Theory10.1007/978-3-031-43587-4_26(363-377)Online publication date: 18-Sep-2023
      • (2022)A methodology for designing proof rules for fair parallel programsFormal Aspects of Computing10.1007/BF012112969:4(359-378)Online publication date: 2-Jan-2022
      • (2021)Two Guarded Recursive Powerdomains for Applicative SimulationElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.351.13351(200-217)Online publication date: 29-Dec-2021
      • (2021)Ranking and Repulsing Supermartingales for Reachability in Randomized ProgramsACM Transactions on Programming Languages and Systems10.1145/345096743:2(1-46)Online publication date: 8-Jun-2021
      • (2019)Incorrectness logicProceedings of the ACM on Programming Languages10.1145/33710784:POPL(1-32)Online publication date: 20-Dec-2019
      • (2019)Demystifying differentiable programming: shift/reset the penultimate backpropagatorProceedings of the ACM on Programming Languages10.1145/33417003:ICFP(1-31)Online publication date: 26-Jul-2019
      • Show More Cited By

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Get Access

      Login options

      Full Access

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media