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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- Kenneth Kunen. 2011. Set Theory. College Publications. isbn:9781848900509
Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
- Carroll Morgan and Annabelle McIver. 1999. pGCL: Formal reasoning for random algorithms.
Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic Choice
Recommendations
Logical Step-Indexed Logical Relations
LICS '09: Proceedings of the 2009 24th Annual IEEE Symposium on Logic In Computer ScienceWe show how to reason about "step-indexed" logical relations in an abstract way, avoiding the tedious, error-prone, and proof-obscuring step-index arithmetic that seems superficially to be an essential element of the method. Specifically, we define a ...
Structural Logical Relations
LICS '08: Proceedings of the 2008 23rd Annual IEEE Symposium on Logic in Computer ScienceTait's method (a.k.a. proof by logical relations) is a powerful proof technique frequently used for showing foundational properties of languages based on typed lambda-calculi. Historically, these proofs have been extremely difficult to formalize in ...
Prelogical relations
We study a weakening of the notion of logical relations, called prelogical relations, that has many of the features that make logical relations so useful as well as further algebraic properties including composability. The basic idea is simply to ...






Comments