{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,21]],"date-time":"2026-07-21T23:04:10Z","timestamp":1784675050440,"version":"3.55.0"},"reference-count":70,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2023,1,9]],"date-time":"2023-01-09T00:00:00Z","timestamp":1673222400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100000185","name":"Defense Advanced Research Projects Agency","doi-asserted-by":"publisher","award":["AA Contract FA8750-18-C-0092"],"award-info":[{"award-number":["AA Contract FA8750-18-C-0092"]}],"id":[{"id":"10.13039\/100000185","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["1801369,1845514,2007784"],"award-info":[{"award-number":["1801369,1845514,2007784"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2023,1,9]]},"abstract":"<jats:p>Session types guarantee that message-passing processes adhere to predefined communication protocols.  \nPrior work on session types has focused on deterministic languages but many message-passing systems, such as Markov chains and randomized distributed algorithms, are probabilistic.  \nTo implement and analyze such systems, this article develops the meta theory of probabilistic session types with an application focus on automatic expected resource analysis.  \nProbabilistic session types describe probability distributions over messages and are a conservative extension of intuitionistic (binary) session types.  \nTo send on a probabilistic channel, processes have to utilize internal randomness from a probabilistic branching or external randomness from receiving on a probabilistic channel.  \nThe analysis for expected resource bounds is smoothly integrated with the type system and is a variant of automatic amortized resource analysis.  \nType inference relies on linear constraint solving to automatically derive symbolic bounds for various cost metrics.  \nThe technical contributions include the meta theory that is based on a novel nested multiverse semantics and a type-reconstruction algorithm that allows flexible mixing of different sources of randomness without burdening the programmer with complex type annotations.  \nThe type system has been implemented in the language NomosPro with linear-time type checking.  \nExperiments demonstrate that NomosPro is applicable in different domains such as cost analysis of randomized distributed algorithms, analysis of Markov chains, probabilistic analysis of amortized data structures and digital contracts.  \nNomosPro is also shown to be scalable by (i) implementing two broadcast and a bounded retransmission protocol where messages are dropped with a fixed probability, and (ii) verifying the limiting distribution of a Markov chain with 64 states and 420 transitions.<\/jats:p>","DOI":"10.1145\/3571259","type":"journal-article","created":{"date-parts":[[2023,1,11]],"date-time":"2023-01-11T21:58:14Z","timestamp":1673474294000},"page":"1925-1956","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":12,"title":["Probabilistic Resource-Aware Session Types"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-2459-1258","authenticated-orcid":false,"given":"Ankush","family":"Das","sequence":"first","affiliation":[{"name":"Amazon, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2418-7987","authenticated-orcid":false,"given":"Di","family":"Wang","sequence":"additional","affiliation":[{"name":"Carnegie Mellon University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8326-0788","authenticated-orcid":false,"given":"Jan","family":"Hoffmann","sequence":"additional","affiliation":[{"name":"Carnegie Mellon University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2023,1,11]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.4204\/eptcs.303.7"},{"key":"e_1_2_1_2_1","volume-title":"Formal Methods for Real-Time and Probabilistic Systems, Joost-Pieter Katoen (Ed.)","author":"Andova Suzana","unstructured":"Suzana Andova . 1999. Process Algebra with Probabilistic Choice . In Formal Methods for Real-Time and Probabilistic Systems, Joost-Pieter Katoen (Ed.) . Springer Berlin Heidelberg , Berlin, Heidelberg . 111\u2013129. isbn:978-3-540-48778-4 Suzana Andova. 1999. Process Algebra with Probabilistic Choice. In Formal Methods for Real-Time and Probabilistic Systems, Joost-Pieter Katoen (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 111\u2013129. isbn:978-3-540-48778-4"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.2019.8785725"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110281"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0019-9958(84)80025-X"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.CONCUR.2019.33"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2951913.2951942"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(87)90054-X"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.5555\/1887654.1887670"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-41528-4_1"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF00206326"},{"key":"e_1_2_1_12_1","unstructured":"Clp team. 2022. COIN-OR Linear Programming Solver. Available on. https:\/\/projects.coin-or.org\/Clp \t\t\t\t  Clp team. 2022. COIN-OR Linear Programming Solver. Available on. https:\/\/projects.coin-or.org\/Clp"},{"key":"e_1_2_1_13_1","first-page":"2374","volume-title":"Resource-Aware Session Types for Digital Contracts. In 2021 IEEE 34th Computer Security Foundations Symposium (CSF). IEEE Computer Society, 111\u2013126","author":"Das A.","unstructured":"A. Das , S. Balzer , J. Hoffmann , F. Pfenning , and I. Santurkar . 2021 . Resource-Aware Session Types for Digital Contracts. In 2021 IEEE 34th Computer Security Foundations Symposium (CSF). IEEE Computer Society, 111\u2013126 . issn: 2374 - 8303 A. Das, S. Balzer, J. Hoffmann, F. Pfenning, and I. Santurkar. 2021. Resource-Aware Session Types for Digital Contracts. In 2021 IEEE 34th Computer Security Foundations Symposium (CSF). IEEE Computer Society, 111\u2013126. issn:2374-8303"},{"key":"e_1_2_1_14_1","volume-title":"Nested Session Types. In 30th European Symposium on Programming, N. Yoshida (Ed.). Springer LNCS","author":"Das Ankush","year":"2021","unstructured":"Ankush Das , Henry DeYoung , Andreia Mordido , and Frank Pfenning . 2021 . Nested Session Types. In 30th European Symposium on Programming, N. Yoshida (Ed.). Springer LNCS , Luxembourg, Luxembourg. 178\u2013206. http:\/\/www.cs.cmu.edu\/~fp\/papers\/esop21.pdf Extended version available as arXiv :2010.06482 Ankush Das, Henry DeYoung, Andreia Mordido, and Frank Pfenning. 2021. Nested Session Types. In 30th European Symposium on Programming, N. Yoshida (Ed.). Springer LNCS, Luxembourg, Luxembourg. 178\u2013206. http:\/\/www.cs.cmu.edu\/~fp\/papers\/esop21.pdf Extended version available as arXiv:2010.06482"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3209108.3209146"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.FSCD.2020.33"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.CONCUR.2020.13"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/3414080.3414087"},{"key":"e_1_2_1_19_1","unstructured":"Ankush Das Di Wang and Jan Hoffmann. 2021. Probabilistic Resource-Aware Session Types. arxiv:2011.09037 \t\t\t\t  Ankush Das Di Wang and Jan Hoffmann. 2021. Probabilistic Resource-Aware Session Types. arxiv:2011.09037"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.7147007"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-63390-9_31"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2677001"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-21455-4_3"},{"key":"e_1_2_1_24_1","volume-title":"European Symposium on Programming. 282\u2013309","author":"Foster Nate","year":"2016","unstructured":"Nate Foster , Dexter Kozen , Konstantinos Mamouras , Mark Reitblatt , and Alexandra Silva . 2016 . Probabilistic netkat . In European Symposium on Programming. 282\u2013309 . Nate Foster, Dexter Kozen, Konstantinos Mamouras, Mark Reitblatt, and Alexandra Silva. 2016. Probabilistic netkat. In European Symposium on Programming. 282\u2013309."},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00236-005-0177-z"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/3296979.3192400"},{"key":"e_1_2_1_27_1","unstructured":"J. Y. Girard and Y. Lafont. 1987. Linear logic and lazy computation. In TAPSOFT \u201987 Hartmut Ehrig Robert Kowalski Giorgio Levi and Ugo Montanari (Eds.). Springer Berlin Heidelberg Berlin Heidelberg. 52\u201366. isbn:978-3-540-47717-4 \t\t\t\t  J. Y. Girard and Y. Lafont. 1987. Linear logic and lazy computation. In TAPSOFT \u201987 Hartmut Ehrig Robert Kowalski Giorgio Levi and Ugo Montanari (Eds.). Springer Berlin Heidelberg Berlin Heidelberg. 52\u201366. isbn:978-3-540-47717-4"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01211866"},{"key":"e_1_2_1_29_1","volume-title":"Hansson and Lars-Ake Fredlund","author":"Hans","year":"1994","unstructured":"Hans A. Hansson and Lars-Ake Fredlund . 1994 . Time and Probability in Formal Design of Distributed Systems. Elsevier Science Inc ., USA. isbn:0444899405 Hans A. Hansson and Lars-Ake Fredlund. 1994. Time and Probability in Formal Design of Distributed Systems. Elsevier Science Inc., USA. isbn:0444899405"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/2166.357214"},{"key":"e_1_2_1_31_1","unstructured":"L. Helmink M. P. A. Sellink and F. W. Vaandrager. 1994. Proof-checking a data link protocol. In Types for Proofs and Programs Henk Barendregt and Tobias Nipkow (Eds.). Springer Berlin Heidelberg Berlin Heidelberg. 127\u2013165. isbn:978-3-540-48440-0 \t\t\t\t  L. Helmink M. P. A. Sellink and F. W. Vaandrager. 1994. Proof-checking a data link protocol. In Types for Proofs and Programs Henk Barendregt and Tobias Nipkow (Eds.). Springer Berlin Heidelberg Berlin Heidelberg. 127\u2013165. isbn:978-3-540-48440-0"},{"key":"e_1_2_1_32_1","volume-title":"Foundations of Software Science and Computation Structures","author":"Herescu Oltea Mihaela","unstructured":"Oltea Mihaela Herescu and Catuscia Palamidessi . 2000. Probabilistic Asynchronous \u03c0 -Calculus . In Foundations of Software Science and Computation Structures , Jerzy Tiuryn (Ed.). Springer Berlin Heidelberg , Berlin, Heidelberg . 146\u2013160. isbn:978-3-540-46432-7 Oltea Mihaela Herescu and Catuscia Palamidessi. 2000. Probabilistic Asynchronous \u03c0 -Calculus. In Foundations of Software Science and Computation Structures, Jerzy Tiuryn (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 146\u2013160. isbn:978-3-540-46432-7"},{"key":"e_1_2_1_33_1","volume-title":"A Compositional Approach to Performance Modelling","author":"Hillston Jane","year":"1898","unstructured":"Jane Hillston . 1996. A Compositional Approach to Performance Modelling . Cambridge University Press , USA. isbn:052157 1898 Jane Hillston. 1996. A Compositional Approach to Performance Modelling. Cambridge University Press, USA. isbn:0521571898"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009842"},{"key":"e_1_2_1_35_1","volume-title":"Static Prediction of Heap Space Usage for First-Order Functional Programs. In 30th Symposium on Principles of Programming Languages (POPL\u201903)","author":"Hofmann Martin","year":"2003","unstructured":"Martin Hofmann and Steffen Jost . 2003 . Static Prediction of Heap Space Usage for First-Order Functional Programs. In 30th Symposium on Principles of Programming Languages (POPL\u201903) . 185\u2013197. Martin Hofmann and Steffen Jost. 2003. Static Prediction of Heap Space Usage for First-Order Functional Programs. In 30th Symposium on Principles of Programming Languages (POPL\u201903). 185\u2013197."},{"key":"e_1_2_1_36_1","volume-title":"CONCUR\u201993","author":"Honda Kohei","unstructured":"Kohei Honda . 1993. Types for dyadic interaction . In CONCUR\u201993 , Eike Best (Ed.). Springer Berlin Heidelberg , Berlin, Heidelberg . 509\u2013523. isbn:978-3-540-47968-0 Kohei Honda. 1993. Types for dyadic interaction. In CONCUR\u201993, Eike Best (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 509\u2013523. isbn:978-3-540-47968-0"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328472"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.FSCD.2019.23"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.CONCUR.2020.14"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(90)90004-2"},{"key":"e_1_2_1_41_1","unstructured":"Claire Jones. 1989. Probabilistic Nondeterminism. Ph. D. Dissertation. University of Edinburgh. \t\t\t\t  Claire Jones. 1989. Probabilistic Nondeterminism. Ph. D. Dissertation. University of Edinburgh."},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-49498-1_15"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314602"},{"key":"e_1_2_1_44_1","volume-title":"Knuth and Andrew Chi-Chih Yao","author":"Donald","year":"1976","unstructured":"Donald E. Knuth and Andrew Chi-Chih Yao . 1976 . The complexity of nonuniform random number generation. Donald E. Knuth and Andrew Chi-Chih Yao. 1976. The complexity of nonuniform random number generation."},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(81)90036-2"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-17465-1_8"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-72522-0_6"},{"key":"e_1_2_1_48_1","volume-title":"Verification of Probabilistic Real-Time Systems","author":"Kwiatkowska Marta","unstructured":"Marta Kwiatkowska , Gethin Norman , and David Parker . 2011. PRISM 4.0 : Verification of Probabilistic Real-Time Systems . In Computer Aided Verification, Ganesh Gopalakrishnan and Shaz Qadeer (Eds.). Springer Berlin Heidelberg , Berlin, Heidelberg . 585\u2013591. isbn:978-3-642-22110-1 Marta Kwiatkowska, Gethin Norman, and David Parker. 2011. PRISM 4.0: Verification of Probabilistic Real-Time Systems. In Computer Aided Verification, Ganesh Gopalakrishnan and Shaz Qadeer (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 585\u2013591. isbn:978-3-642-22110-1"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.ic.2007.01.004"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-44618-4_26"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2004.04.019"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3192366.3192394"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-24611-4_11"},{"key":"e_1_2_1_54_1","volume-title":"Fourth International Conference on the Quantitative Evaluation of Systems (QEST","author":"Norman G.","year":"2007","unstructured":"G. Norman , C. Palamidessi , D. Parker , and P. Wu . 2007. Model checking the probabilistic pi-calculus . In Fourth International Conference on the Quantitative Evaluation of Systems (QEST 2007 ). 169\u2013178. G. Norman, C. Palamidessi, D. Parker, and P. Wu. 2007. Model checking the probabilistic pi-calculus. In Fourth International Conference on the Quantitative Evaluation of Systems (QEST 2007). 169\u2013178."},{"key":"e_1_2_1_55_1","unstructured":"Lawrence Page Sergey Brin Rajeev Motwani and Terry Winograd. 1999. The PageRank Citation Ranking: Bringing Order to the Web.. Stanford InfoLab. http:\/\/ilpubs.stanford.edu:8090\/422\/ Previous number = SIDL-WP-1999-0120 \t\t\t\t  Lawrence Page Sergey Brin Rajeev Motwani and Terry Winograd. 1999. The PageRank Citation Ranking: Bringing Order to the Web.. Stanford InfoLab. http:\/\/ilpubs.stanford.edu:8090\/422\/ Previous number = SIDL-WP-1999-0120"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/345099.345100"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314639"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01667080"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1137\/0606031"},{"key":"e_1_2_1_60_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-94821-8_33"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290377"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2009.01.002"},{"key":"e_1_2_1_63_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-37036-6_20"},{"key":"e_1_2_1_64_1","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.2002.1029838"},{"key":"e_1_2_1_65_1","volume-title":"Probability, Nondeterminism and Concurrency: Two Denotational Models for Probabilistic Computation. Ph. D. Dissertation","author":"Varacca Daniele","unstructured":"Daniele Varacca . 2003. Probability, Nondeterminism and Concurrency: Two Denotational Models for Probabilistic Computation. Ph. D. Dissertation . University of Aarhus. Daniele Varacca. 2003. Probability, Nondeterminism and Concurrency: Two Denotational Models for Probabilistic Computation. Ph. D. Dissertation. University of Aarhus."},{"key":"e_1_2_1_66_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129505005074"},{"key":"e_1_2_1_67_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2007.07.009"},{"key":"e_1_2_1_68_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2019.09.016"},{"key":"e_1_2_1_69_1","volume-title":"Raising Expectations: Automating Expected Cost Analysis with Types.","author":"Wang Di","year":"2020","unstructured":"Di Wang , David M. Kahn , and Jan Hoffmann . 2020 . Raising Expectations: Automating Expected Cost Analysis with Types. Di Wang, David M. Kahn, and Jan Hoffmann. 2020. Raising Expectations: Automating Expected Cost Analysis with Types."},{"key":"e_1_2_1_70_1","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314581"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3571259","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3571259","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T18:08:22Z","timestamp":1750183702000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3571259"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,1,9]]},"references-count":70,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2023,1,9]]}},"alternative-id":["10.1145\/3571259"],"URL":"https:\/\/doi.org\/10.1145\/3571259","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,1,9]]},"assertion":[{"value":"2023-01-11","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}