skip to main content
research-article
Open Access

Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic Choice

Published:11 January 2023Publication History
Skip Abstract Section

Abstract

Developing denotational models for higher-order languages that combine probabilistic and nondeterministic choice is known to be very challenging. In this paper, we propose an alternative approach based on operational techniques. We study a higher-order language combining parametric polymorphism, recursive types, discrete probabilistic choice and countable nondeterminism. We define probabilistic generalizations of may- and must-termination as the optimal and pessimal probabilities of termination. Then we define step-indexed logical relations and show that they are sound and complete with respect to the induced contextual preorders. For may-equivalence we use step-indexing over the natural numbers whereas for must-equivalence we index over the countable ordinals. We then show than the probabilities of may- and must-termination coincide with the maximal and minimal probabilities of termination under all schedulers. Finally we derive the equational theory induced by contextual equivalence and show that it validates the distributive combination of the algebraic theories for probabilistic and nondeterministic choice.

References

  1. Amal Ahmed. 2006. Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types. In Proceedings of the 15th European Conference on Programming Languages and Systems (ESOP’06). Springer-Verlag, Berlin, Heidelberg. 69–83. isbn:354033095X https://doi.org/10.1007/11693024_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Andrew W. Appel and David McAllester. 2001. An indexed model of recursive types for foundational proof-carrying code. ACM Trans. Program. Lang. Syst., 23, 5 (2001), Sept., 657–683. issn:0164-0925, 1558-4593 https://doi.org/10.1145/504709.504712 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. R. Apt and G. D. Plotkin. 1986. Countable nondeterminism and random assignment. J. ACM, 33, 4 (1986), Aug., 724–767. issn:0004-5411, 1557-735X https://doi.org/10.1145/6490.6494 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Robert J. Aumann. 1961. Borel structures for function spaces. Illinois J. Math., 5, 4 (1961), Dec., 614–630. issn:0019-2082 https://doi.org/10.1215/ijm/1255631584 Google ScholarGoogle ScholarCross RefCross Ref
  5. Lars Birkedal, Aleš Bizjak, and Jan Schwinghammer. 2013. Step-Indexed Relational Reasoning for Countable Nondeterminism. Log. Meth. Comput. Sci., 9, 4 (2013), Oct., 4. issn:1860-5974 https://doi.org/10.2168/lmcs-9(4:4)2013 Google ScholarGoogle ScholarCross RefCross Ref
  6. Lars Birkedal, Filip Sieczkowski, and Jacob Thamsborg. 2012. A Concurrent Logical Relation. In Computer Science Logic (CSL’12) - 26th International Workshop/21st Annual Conference of the EACSL, CSL 2012, September 3-6, 2012, Fontainebleau, France, Patrick Cégielski and Arnaud Durand (Eds.) (LIPIcs, Vol. 16). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 107–121. https://doi.org/10.4230/LIPIcs.CSL.2012.107 Google ScholarGoogle ScholarCross RefCross Ref
  7. Aleš Bizjak and Lars Birkedal. 2015. Step-Indexed Logical Relations for Probability. In Foundations of Software Science and Computation Structures, Andrew Pitts (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 279–294. isbn:978-3-662-46678-0 Google ScholarGoogle Scholar
  8. Filippo Bonchi, Alexandra Silva, and Ana Sokolova. 2017. The Power of Convex Algebras. In 28th International Conference on Concurrency Theory (CONCUR 2017), Roland Meyer and Uwe Nestmann (Eds.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 85). Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany. 23:1–23:18. isbn:978-3-95977-048-4 issn:1868-8969 https://doi.org/10.4230/LIPIcs.CONCUR.2017.23 Google ScholarGoogle ScholarCross RefCross Ref
  9. Filippo Bonchi, Ana Sokolova, and Valeria Vignudelli. 2019. The Theory of Traces for Systems with Nondeterminism and Probability. In 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS) (LICS ’19). IEEE, Article 19, 14 pages. https://doi.org/10.1109/lics.2019.8785673 Google ScholarGoogle ScholarCross RefCross Ref
  10. Johannes Borgström, Ugo Dal Lago, Andrew D. Gordon, and Marcin Szymczak. 2016. A lambda-calculus foundation for universal probabilistic programming. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming. ACM, Nara, Japan. 33–46. isbn:978-1-4503-4219-3 https://doi.org/10.1145/2951913.2951942 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Rohit Chadha, A. Prasad Sistla, and Mahesh Viswanathan. 2010. Model Checking Concurrent Programs with Nondeterminism and Randomization. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2010), Kamal Lodaya and Meena Mahajan (Eds.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 8). Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany. 364–375. isbn:978-3-939897-23-1 issn:1868-8969 https://doi.org/10.4230/LIPIcs.FSTTCS.2010.364 Google ScholarGoogle ScholarCross RefCross Ref
  12. Patrick Cousot and Radhia Cousot. 1979. Constructive versions of Tarski’ s fixed point theorems. Pac. J. Math., 82, 1 (1979), May, 43–57. issn:0030-8730, 0030-8730 https://doi.org/10.2140/pjm.1979.82.43 Google ScholarGoogle ScholarCross RefCross Ref
  13. Raphaëlle Crubillé and Ugo Dal Lago. 2017. Metric Reasoning About λ -Terms: The General Case. In Programming Languages and Systems: 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22–29, 2017, Proceedings. Springer-Verlag, Berlin, Heidelberg. 341–367. isbn:978-3-662-54433-4 https://doi.org/10.1007/978-3-662-54434-1_13 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Raphaëlle Crubillé and Ugo Dal Lago. 2015. Metric reasoning about λ -terms: The affine case. In 2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science. 633–644. https://doi.org/10.1109/LICS.2015.64 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ryan Culpepper and Andrew Cobb. 2017. Contextual Equivalence for Probabilistic Programs with Continuous Random Variables and Scoring. In Programming Languages and Systems, Hongseok Yang (Ed.). 10201, Springer Berlin Heidelberg, Berlin, Heidelberg. 368–392. isbn:9783662544334, 9783662544341 issn:0302-9743, 1611-3349 https://doi.org/10.1007/978-3-662-54434-1_14 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Thomas Ehrhard, Michele Pagani, and Christine Tasson. 2018. Measurable cones and stable, measurable functions: A model for probabilistic higher-order programming. Proceedings of the ACM on Programming Languages, 2, POPL (2018), Article 59, Jan., 28 pages. issn:2475-1421 https://doi.org/10.1145/3158147 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Thomas Ehrhard and Christine Tasson. 2019. Probabilistic call by push value. Log. Meth. Comput. Sci., Volume 15, Issue 1 (2019), Jan., https://doi.org/10.23638/LMCS-15(1:3)2019 Google ScholarGoogle ScholarCross RefCross Ref
  18. Thomas Ehrhard, Christine Tasson, and Michele Pagani. 2014. Probabilistic coherence spaces are fully abstract for probabilistic PCF. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’14). ACM, New York, NY, USA. 309–320. isbn:9781450325448 https://doi.org/10.1145/2535838.2535865 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Alexandre Goy and Daniela Petrişan. 2020. Combining probabilistic and non-deterministic choice via weak distributive laws. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science. ACM, Saarbrücken Germany. 454–464. isbn:978-1-4503-7104-9 https://doi.org/10.1145/3373718.3394795 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Chris Heunen, Ohad Kammar, Sam Staton, and Hongseok Yang. 2017. A convenient category for higher-order probability theory. In 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). IEEE, 1–12. https://doi.org/10.1109/lics.2017.8005137 Google ScholarGoogle ScholarCross RefCross Ref
  21. Bart Jacobs. 2021. From Multisets over Distributions to Distributions over Multisets. In 2021 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). IEEE, New York, NY, USA. Article 39, 13 pages. isbn:9781665448956 https://doi.org/10.1109/lics52264.2021.9470678 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. Jones and G.D. Plotkin. 1989. A probabilistic powerdomain of evaluations. In [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science. IEEE Comput. Soc. Press, 186–195. https://doi.org/10.1109/lics.1989.39173 Google ScholarGoogle ScholarCross RefCross Ref
  23. Achim Jung and Regina Tix. 1998. The Troublesome Probabilistic Powerdomain. Electron. Notes Theor. Comput. Sci., 13 (1998), 70–91. issn:1571-0661 https://doi.org/10.1016/s1571-0661(05)80216-6 Google ScholarGoogle ScholarCross RefCross Ref
  24. Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Federico Olmedo. 2016. Weakest Precondition Reasoning for Expected Run– Times of Probabilistic Programs. In Programming Languages and Systems, Peter Thiemann (Ed.). 9632, Springer Berlin Heidelberg, Berlin, Heidelberg. 364–389. isbn:9783662494974, 9783662494981 issn:0302-9743, 1611-3349 https://doi.org/10.1007/978-3-662-49498-1_15 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Dexter Kozen. 1981. Semantics of probabilistic programs. J. Comput. Syst. Sci., 22, 3 (1981), June, 328–350. issn:0022-0000 https://doi.org/10.1016/0022-0000(81)90036-2 Google ScholarGoogle ScholarCross RefCross Ref
  26. Kenneth Kunen. 2011. Set Theory. College Publications. isbn:9781848900509 Google ScholarGoogle Scholar
  27. Marta Kwiatkowska, Gethin Norman, and David Parker. 2011. PRISM 4.0: Verification of probabilistic real-time systems. In International conference on computer aided verification. 585–591. Google ScholarGoogle ScholarCross RefCross Ref
  28. Søren Bøgh Lassen. 1998. Relational Reasoning about Functions and Nondeterminism. Ph. D. Dissertation. BRICS. https://www.brics.dk/DS/98/2/BRICS-DS-98-2.pdf Google ScholarGoogle Scholar
  29. Matteo Mio, Ralph Sarkis, and Valeria Vignudelli. 2021. Combining Nondeterminism, Probability, and Termination: Equational and Metric Reasoning. In 2021 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). IEEE, New York, NY, USA. Article 18, 14 pages. isbn:9781665448956 https://doi.org/10.1109/lics52264.2021.9470717 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Matteo Mio and Valeria Vignudelli. 2020. Monads and Quantitative Equational Theories for Nondeterminism and Probability. In 31st International Conference on Concurrency Theory (CONCUR 2020), Igor Konnov and Laura Kovács (Eds.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 171). Schloss Dagstuhl–Leibniz-Zentrum für Informatik, Dagstuhl, Germany. 28:1–28:18. isbn:978-3-95977-160-3 issn:1868-8969 https://doi.org/10.4230/LIPIcs.CONCUR.2020.28 Google ScholarGoogle ScholarCross RefCross Ref
  31. Michael Mislove. 2000. Nondeterminism and Probabilistic Choice: Obeying the Laws. In CONCUR 2000 — Concurrency Theory, Catuscia Palamidessi (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 350–365. isbn:978-3-540-44618-7 Google ScholarGoogle Scholar
  32. Carroll Morgan and Annabelle McIver. 1999. pGCL: Formal reasoning for random algorithms. Google ScholarGoogle Scholar
  33. Praveen Narayanan, Jacques Carette, Wren Romano, Chung-chieh Shan, and Robert Zinkov. 2016. Probabilistic inference by program transformation in Hakaru (system description). In International Symposium on Functional and Logic Programming - 13th International Symposium, FLOPS 2016, Kochi, Japan, March 4-6, 2016, Proceedings. 62–79. https://doi.org/10.1007/978-3-319-29604-3_5 Google ScholarGoogle ScholarCross RefCross Ref
  34. Andrew Pitts. 2004. Typed Operational Reasoning. In Advanced Topics in Types and Programming Languages, Benjamin C. Pierce (Ed.). The MIT Press, Cambridge, Mass. isbn:978-0-262-16228-9 lccn:QA76.7 .A36 2005 https://doi.org/10.7551/mitpress/1104.003.0011 Google ScholarGoogle ScholarCross RefCross Ref
  35. Andrew Pitts and Ian Stark. 1998. Operational Reasoning for Functions with Local State. In Higher Order Operational Techniques in Semantics, Andrew Gordon and Andrew Pitts (Eds.). Publications of the Newton Institute, Cambridge University Press, 227–273. http://www.inf.ed.ac.uk/~stark/operfl.html Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. G. D. Plotkin. 1976. A Powerdomain Construction. SIAM J. Comput., 5, 3 (1976), Sept., 452–487. issn:0097-5397, 1095-7111 https://doi.org/10.1137/0205035 Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. N. Saheb-Djahromi. 1980. Cpo’s of measures for nondeterminism. Theor. Comput. Sci., 12, 1 (1980), Sept., 19–37. issn:0304-3975 https://doi.org/10.1016/0304-3975(80)90003-1 Google ScholarGoogle ScholarCross RefCross Ref
  38. Roberto Segala. 2006. Probability and Nondeterminism in Operational Models of Concurrency. In CONCUR 2006 – Concurrency Theory, Christel Baier and Holger Hermanns (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 64–78. isbn:978-3-540-37377-3 Google ScholarGoogle Scholar
  39. W. W. Tait. 1967. Intensional interpretations of functionals of finite type I. J. Symbolic Logic, 32, 2 (1967), Aug., 198–212. issn:0022-4812, 1943-5886 https://doi.org/10.2307/2271658 Google ScholarGoogle ScholarCross RefCross Ref
  40. Alfred Tarski. 1955. A lattice-theoretical fixpoint theorem and its applications. Pac. J. Math., 5, 2 (1955), June, 285–309. issn:0030-8730, 0030-8730 https://doi.org/10.2140/pjm.1955.5.285 Google ScholarGoogle ScholarCross RefCross Ref
  41. Joseph Tassarotti and Robert Harper. 2019. A separation logic for concurrent randomized programs. Proceedings of the ACM on Programming Languages, 3, POPL (2019), Article 64, Jan., 30 pages. issn:2475-1421 https://doi.org/10.1145/3290377 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Aaron J. Turon, Jacob Thamsborg, Amal Ahmed, Lars Birkedal, and Derek Dreyer. 2013. Logical relations for fine-grained concurrency. Acm Sigplan Notices, 48, 1 (2013), Jan., 343–356. issn:0362-1340, 1558-1160 https://doi.org/10.1145/2480359.2429111 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Matthijs Vákár, Ohad Kammar, and Sam Staton. 2019. A domain theory for statistical probabilistic programming. Proceedings of the ACM on Programming Languages, 3, POPL (2019), Jan., 1–29. issn:2475-1421 https://doi.org/10.1145/3290349 Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Daniele Varacca and Glynn Winskel. 2006. Distributing probability over non-determinism. Math. Struct. Comp. Sci., 16, 01 (2006), Feb., 87. issn:0960-1295, 1469-8072 https://doi.org/10.1017/s0960129505005074 Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Mitchell Wand, Ryan Culpepper, Theophilos Giannakopoulos, and Andrew Cobb. 2018. Contextual equivalence for a probabilistic language with continuous random variables and recursion. Proceedings of the ACM on Programming Languages, 2, ICFP (2018), Article 87, July, 30 pages. issn:2475-1421 https://doi.org/10.1145/3236782 Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Frank Wood, Jan Willem van de Meent, and Vikash Mansinghka. 2014. A New Approach to Probabilistic Programming Inference. In Proceedings of the 17th International conference on Artificial Intelligence and Statistics. 1024–1032. Google ScholarGoogle Scholar
  47. Wang Yi and Kim Guldstrand Larsen. 1992. Testing Probabilistic and Nondeterministic Processes. In Proceedings of the IFIP TC6/WG6.1 Twelth International Symposium on Protocol Specification, Testing and Verification XII. North– Holland Publishing Co., 15 pages. isbn:0444898743 Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Yizhou Zhang and Nada Amin. 2022. Reasoning about “Reasoning about Reasoning”: Semantics and Contextual Equivalence for Probabilistic Programs with Nested Queries and Recursion. Proc. ACM Program. Lang., 6, POPL (2022), Article 16, jan, 28 pages. https://doi.org/10.1145/3498677 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic Choice

        Recommendations

        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

        • Article Metrics

          • Downloads (Last 12 months)143
          • Downloads (Last 6 weeks)20

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!