{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,5]],"date-time":"2026-02-05T06:02:35Z","timestamp":1770271355041,"version":"3.49.0"},"reference-count":63,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2022,8,29]],"date-time":"2022-08-29T00:00:00Z","timestamp":1661731200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"EPSRC","award":["EP\/T008911\/1"],"award-info":[{"award-number":["EP\/T008911\/1"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2022,8,29]]},"abstract":"<jats:p>Probabilistic programming languages (PPLs) allow programmers to construct statistical models and then simulate data or perform inference over them. Many PPLs restrict models to a particular instance of simulation or inference, limiting their reusability. In other PPLs, models are not readily composable. Using Haskell as the host language, we present an embedded domain specific language based on algebraic effects, where probabilistic models are modular, first-class, and reusable for both simulation and inference. We also demonstrate how simulation and inference can be expressed naturally as composable program transformations using algebraic effect handlers.<\/jats:p>","DOI":"10.1145\/3547635","type":"journal-article","created":{"date-parts":[[2022,8,31]],"date-time":"2022-08-31T19:39:26Z","timestamp":1661974766000},"page":"381-410","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":5,"title":["Modular probabilistic models via algebraic effects"],"prefix":"10.1145","volume":"6","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-3845-9928","authenticated-orcid":false,"given":"Minh","family":"Nguyen","sequence":"first","affiliation":[{"name":"University of Bristol, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9249-9862","authenticated-orcid":false,"given":"Roly","family":"Perera","sequence":"additional","affiliation":[{"name":"Alan Turing Institute, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7780-630X","authenticated-orcid":false,"given":"Meng","family":"Wang","sequence":"additional","affiliation":[{"name":"University of Bristol, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4161-985X","authenticated-orcid":false,"given":"Nicolas","family":"Wu","sequence":"additional","affiliation":[{"name":"Imperial College London, UK"}]}],"member":"320","published-online":{"date-parts":[[2022,8,31]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.chaos.2020.109892"},{"key":"e_1_2_1_2_1","article-title":"Pyro: Deep Universal Probabilistic Programming","volume":"20","author":"Bingham Eli","year":"2019","unstructured":"Eli Bingham , Jonathan P. Chen , Martin Jankowiak , Fritz Obermeyer , Neeraj Pradhan , Theofanis Karaletsos , Rohit Singh , Paul A. Szerlip , Paul Horsfall , and Noah D. Goodman . 2019 . Pyro: Deep Universal Probabilistic Programming . J. Mach. Learn. Res. , 20 (2019), 28:1\u201328:6. https:\/\/doi.org\/10.48550\/arXiv.1810.09538 Eli Bingham, Jonathan P. Chen, Martin Jankowiak, Fritz Obermeyer, Neeraj Pradhan, Theofanis Karaletsos, Rohit Singh, Paul A. Szerlip, Paul Horsfall, and Noah D. Goodman. 2019. Pyro: Deep Universal Probabilistic Programming. J. Mach. Learn. Res., 20 (2019), 28:1\u201328:6. https:\/\/doi.org\/10.48550\/arXiv.1810.09538","journal-title":"J. Mach. Learn. Res."},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.18637\/jss.v076.i01"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/1953611.1953626"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1093\/biomet\/89.3.539"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314642"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.ymssp.2019.06.029"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4757-3437-9_1"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796802004574"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796805005721"},{"key":"e_1_2_1_11_1","unstructured":"Phil Freeman. 2017. PureScript by Example. https:\/\/book.purescript.org\/ \t\t\t\t  Phil Freeman. 2017. PureScript by Example. https:\/\/book.purescript.org\/"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jspi.2009.06.007"},{"key":"e_1_2_1_13_1","volume-title":"International Conference on Artificial Intelligence and Statistics, AISTATS 2018","author":"Ge Hong","year":"2018","unstructured":"Hong Ge , Kai Xu , and Zoubin Ghahramani . 2018 . Turing: a language for flexible probabilistic inference . In International Conference on Artificial Intelligence and Statistics, AISTATS 2018 , 9-11 April 2018, Playa Blanca, Lanzarote, Canary Islands, Spain. 1682\u20131690. http:\/\/proceedings.mlr.press\/v84\/ge18b.html Hong Ge, Kai Xu, and Zoubin Ghahramani. 2018. Turing: a language for flexible probabilistic inference. In International Conference on Artificial Intelligence and Statistics, AISTATS 2018, 9-11 April 2018, Playa Blanca, Lanzarote, Canary Islands, Spain. 1682\u20131690. http:\/\/proceedings.mlr.press\/v84\/ge18b.html"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9780511790942"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/2034574.2034777"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628138"},{"key":"e_1_2_1_17_1","unstructured":"Noah D Goodman and Andreas Stuhlm\u00fcller. 2014. The Design and Implementation of Probabilistic Programming Languages. http:\/\/dippl.org Accessed: 2021-5-24 \t\t\t\t  Noah D Goodman and Andreas Stuhlm\u00fcller. 2014. The Design and Implementation of Probabilistic Programming Languages. http:\/\/dippl.org Accessed: 2021-5-24"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.7488\/era\/2122"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-02768-1_22"},{"key":"e_1_2_1_20_1","first-page":"1593","article-title":"The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo","volume":"15","author":"Hoffman Matthew D","year":"2014","unstructured":"Matthew D Hoffman and Andrew Gelman . 2014 . The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo .. J. Mach. Learn. Res. , 15 , 1 (2014), 1593 \u2013 1623 . https:\/\/doi.org\/10.48550\/arXiv.1111.4246 Matthew D Hoffman and Andrew Gelman. 2014. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo.. J. Mach. Learn. Res., 15, 1 (2014), 1593\u20131623. https:\/\/doi.org\/10.48550\/arXiv.1111.4246","journal-title":"J. Mach. Learn. Res."},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2723372.2731084"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-32202-0_3"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-47958-3_19"},{"key":"e_1_2_1_24_1","volume-title":"Proceedings of Workshop on Probabilistic Programming Semantics.","author":"Kiselyov Oleg","year":"2016","unstructured":"Oleg Kiselyov . 2016 . Problems of the lightweight implementation of probabilistic programming . In Proceedings of Workshop on Probabilistic Programming Semantics. Oleg Kiselyov. 2016. Problems of the lightweight implementation of probabilistic programming. In Proceedings of Workshop on Probabilistic Programming Semantics."},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2804302.2804319"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/2503778.2503791"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-03034-5_17"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.3982\/QE399"},{"key":"e_1_2_1_29_1","unstructured":"Edward Kmett Barak Pearlmutter and Jeffrey Mark Siskind. 2010-2021. ad: Automatic Differentiation. Haskell package at. https:\/\/hackage.haskell.org\/package\/ad \t\t\t\t  Edward Kmett Barak Pearlmutter and Jeffrey Mark Siskind. 2010-2021. ad: Automatic Differentiation. Haskell package at. https:\/\/hackage.haskell.org\/package\/ad"},{"key":"e_1_2_1_30_1","volume-title":"Nimar S. Arora, Xiaoyan Wang, Yucen Lily Li, Nazanin Khosravani Tehrani, Michael Tingley, David Noursi, Narjes Torabi, Sepehr Akhavan-Masouleh, Eric Lippert, and Erik Meijer.","author":"Kulkarni Sourabh","year":"2020","unstructured":"Sourabh Kulkarni , Kinjal Divesh Shah , Nimar S. Arora, Xiaoyan Wang, Yucen Lily Li, Nazanin Khosravani Tehrani, Michael Tingley, David Noursi, Narjes Torabi, Sepehr Akhavan-Masouleh, Eric Lippert, and Erik Meijer. 2020 . PPL Bench: Evaluation Framework For Probabilistic Programming Languages. CoRR , abs\/2010.08886 (2020), https:\/\/doi.org\/10.48550\/arXiv.2010.08886 Sourabh Kulkarni, Kinjal Divesh Shah, Nimar S. Arora, Xiaoyan Wang, Yucen Lily Li, Nazanin Khosravani Tehrani, Michael Tingley, David Noursi, Narjes Torabi, Sepehr Akhavan-Masouleh, Eric Lippert, and Erik Meijer. 2020. PPL Bench: Evaluation Framework For Probabilistic Programming Languages. CoRR, abs\/2010.08886 (2020), https:\/\/doi.org\/10.48550\/arXiv.2010.08886"},{"key":"e_1_2_1_31_1","volume-title":"Proceedings of the 2005 Symposium on Trends in Functional Programming. 297\u2013312","author":"Leijen Daan","year":"2005","unstructured":"Daan Leijen . 2005 . Extensible records with scoped labels . In Proceedings of the 2005 Symposium on Trends in Functional Programming. 297\u2013312 . https:\/\/www.microsoft.com\/en-us\/research\/publication\/extensible-records-with-scoped-labels\/ Daan Leijen. 2005. Extensible records with scoped labels. In Proceedings of the 2005 Symposium on Trends in Functional Programming. 297\u2013312. https:\/\/www.microsoft.com\/en-us\/research\/publication\/extensible-records-with-scoped-labels\/"},{"key":"e_1_2_1_32_1","unstructured":"Xavier Leroy Damien Doligez Alain Frisch Jacques Garrigue Didier R\u00e9my and J\u00e9r\u00f4me Vouillon. 2020. The OCaml system release 4.11: Documentation and user\u2019s manual. https:\/\/v2.ocaml.org\/releases\/4.11\/htmlman\/index.html \t\t\t\t  Xavier Leroy Damien Doligez Alain Frisch Jacques Garrigue Didier R\u00e9my and J\u00e9r\u00f4me Vouillon. 2020. The OCaml system release 4.11: Documentation and user\u2019s manual. https:\/\/v2.ocaml.org\/releases\/4.11\/htmlman\/index.html"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/2939672.2939810"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371087"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3449258.3449261"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/199448.199528"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1008929526011"},{"key":"e_1_2_1_38_1","unstructured":"Sandy Maguire. 2019. Polysemy. https:\/\/github.com\/polysemy-research\/polysemy \t\t\t\t  Sandy Maguire. 2019. Polysemy. https:\/\/github.com\/polysemy-research\/polysemy"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1109\/79.543975"},{"key":"e_1_2_1_40_1","unstructured":"Dave Moore and Maria I Gorinova. 2018. Effect handling for composable program transformations in edward2. arXiv preprint arXiv:1811.06150 https:\/\/doi.org\/10.48550\/arXiv.1811.06150 \t\t\t\t  Dave Moore and Maria I Gorinova. 2018. Effect handling for composable program transformations in edward2. arXiv preprint arXiv:1811.06150 https:\/\/doi.org\/10.48550\/arXiv.1811.06150"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-29604-3_5"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.6651953"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1023064908962"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.2168\/lmcs-9(4:23)2013"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1080\/01621459.2013.829001"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1109\/MASSP.1986.1165342"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1008938201645"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.7717\/peerj-cs.55"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/3331545.3342595"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/2804302.2804317"},{"key":"e_1_2_1_51_1","volume-title":"Workshop on Higher-Order Programming with Effects (HOPE). https:\/\/www.cs.ubc.ca\/~ascibior\/assets\/pdf\/hope.pdf","author":"\u015acibior Adam","year":"2015","unstructured":"Adam \u015acibior and Ohad Kammar . 2015 . Effects in Bayesian inference . In Workshop on Higher-Order Programming with Effects (HOPE). https:\/\/www.cs.ubc.ca\/~ascibior\/assets\/pdf\/hope.pdf Adam \u015acibior and Ohad Kammar. 2015. Effects in Bayesian inference. In Workshop on Higher-Order Programming with Effects (HOPE). https:\/\/www.cs.ubc.ca\/~ascibior\/assets\/pdf\/hope.pdf"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236778"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.physa.2007.11.048"},{"key":"e_1_2_1_54_1","unstructured":"Jesse Sigal. 2021. Automatic differentiation via effects and handlers: An implementation in Frank. arXiv preprint arXiv:2101.08095 https:\/\/doi.org\/10.48550\/arXiv.2101.08095 \t\t\t\t  Jesse Sigal. 2021. Automatic differentiation via effects and handlers: An implementation in Frank. arXiv preprint arXiv:2101.08095 https:\/\/doi.org\/10.48550\/arXiv.2101.08095"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796808006758"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/3064899.3064910"},{"key":"e_1_2_1_57_1","volume-title":"Blei","author":"Tran Dustin","year":"2017","unstructured":"Dustin Tran , Matthew D. Hoffman , Rif A. Saurous , Eugene Brevdo , Kevin Murphy , and David M . Blei . 2017 . Deep Probabilistic Programming . https:\/\/doi.org\/10.48550\/arXiv.1701.03757 arxiv:1701.03757. Dustin Tran, Matthew D. Hoffman, Rif A. Saurous, Eugene Brevdo, Kevin Murphy, and David M. Blei. 2017. Deep Probabilistic Programming. https:\/\/doi.org\/10.48550\/arXiv.1701.03757 arxiv:1701.03757."},{"key":"e_1_2_1_58_1","unstructured":"Jan-Willem van de Meent Brooks Paige Hongseok Yang and Frank Wood. 2018. An introduction to probabilistic programming. arXiv preprint arXiv:1809.10756 https:\/\/doi.org\/10.48550\/arXiv.1809.10756 \t\t\t\t  Jan-Willem van de Meent Brooks Paige Hongseok Yang and Frank Wood. 2018. An introduction to probabilistic programming. arXiv preprint arXiv:1809.10756 https:\/\/doi.org\/10.48550\/arXiv.1809.10756"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-70594-9_20"},{"key":"e_1_2_1_60_1","volume-title":"Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Geoffrey Gordon, David Dunson, and Miroslav Dud\u00edk (Eds.) (Proceedings of Machine Learning Research","volume":"778","author":"Wingate David","year":"2011","unstructured":"David Wingate , Andreas Stuhlmueller , and Noah Goodman . 2011 . Lightweight Implementations of Probabilistic Programming Languages Via Transformational Compilation . In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Geoffrey Gordon, David Dunson, and Miroslav Dud\u00edk (Eds.) (Proceedings of Machine Learning Research , Vol. 15). PMLR, Fort Lauderdale, FL, USA. 770\u2013 778 . https:\/\/proceedings.mlr.press\/v15\/wingate11a.html David Wingate, Andreas Stuhlmueller, and Noah Goodman. 2011. Lightweight Implementations of Probabilistic Programming Languages Via Transformational Compilation. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Geoffrey Gordon, David Dunson, and Miroslav Dud\u00edk (Eds.) (Proceedings of Machine Learning Research, Vol. 15). PMLR, Fort Lauderdale, FL, USA. 770\u2013778. https:\/\/proceedings.mlr.press\/v15\/wingate11a.html"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-19797-5_15"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1145\/2633357.2633358"},{"key":"e_1_2_1_63_1","doi-asserted-by":"publisher","DOI":"10.1111\/j.1467-9868.2011.01016.x"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3547635","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3547635","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T18:43:29Z","timestamp":1750272209000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3547635"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,8,29]]},"references-count":63,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2022,8,29]]}},"alternative-id":["10.1145\/3547635"],"URL":"https:\/\/doi.org\/10.1145\/3547635","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,8,29]]},"assertion":[{"value":"2022-08-31","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}