{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,10]],"date-time":"2026-10-10T02:07:36Z","timestamp":1791598056476,"version":"4.3.4"},"reference-count":60,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2023,8,30]],"date-time":"2023-08-30T00:00:00Z","timestamp":1693353600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2023,8,30]]},"abstract":"<jats:p>All formalizations of session types rely on linear types for soundness as  \nsession-typed communication channels must change their type at every  \noperation. Embedded language implementations of session types follow  \nsuit. They either rely on clever typing constructions to guarantee  \nlinearity statically, or on run-time checks that approximate  \nlinearity.<\/jats:p>\n          <jats:p>We present a new language-embedded implementation of session types,  \nwhich is inspired by the inversion-of-control design principle. With  \nour approach, all application programs are intrinsically session-typed and  \nunable to break linearity by construction. Our design relies on a tiny  \nencapsulated library, for which linearity remains a proof  \nobligation that can be discharged once and for all when the library is built.<\/jats:p>\n          <jats:p>We demonstrate that our proposed design extends to a wide range of  \nfeatures of session type systems: branching, recursion, multichannel  \nand higher-order sessions, as well as context-free sessions. The  \nmultichannel extension provides an embedded implementation of  \nsession types which guarantees deadlock freedom by construction.<\/jats:p>\n          <jats:p>The development reported in this paper is fully backed by  \ntype-checked Agda code.<\/jats:p>","DOI":"10.1145\/3607854","type":"journal-article","created":{"date-parts":[[2023,8,31]],"date-time":"2023-08-31T17:40:31Z","timestamp":1693503631000},"page":"711-739","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":2,"title":["Intrinsically Typed Sessions with Callbacks (Functional Pearl)"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9000-1239","authenticated-orcid":false,"given":"Peter","family":"Thiemann","sequence":"first","affiliation":[{"name":"University of Freiburg, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2023,8,31]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.ic.2022.104948"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1561\/2500000031"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jlamp.2015.09.003"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-15375-4_16"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129514000218"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007205"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2022.22"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2022.27"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-023-09665-3"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-78142-2_5"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3503221.3508404"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034796"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","unstructured":"Juliana Franco and Vasco Thudichum Vasconcelos. 2013. A Concurrent Programming Language with Refined Session Types. In Software Engineering and Formal Methods - SEFM 2013 Collocated Workshops: BEAT2 WS-FMDS FM-RAIL-Bok MoKMaSD and OpenCert Revised Selected Papers Steve Counsell and Manuel N\u00fa\u00f1ez (Eds.) (Lecture Notes in Computer Science Vol. 8368). Springer Madrid Spain. 15\u201328. https:\/\/doi.org\/10.1007\/978-3-319-05032-4_2 10.1007\/978-3-319-05032-4_2","DOI":"10.1007\/978-3-319-05032-4_2"},{"key":"e_1_2_1_14_1","volume-title":"Behavioural Types: from Theory to Tools, Simon Gay and Ant\u00f3nio Ravara (Eds.)","unstructured":"2017. Behavioural Types: from Theory to Tools, Simon Gay and Ant\u00f3nio Ravara (Eds.). River Publishers, Gistrup, Denmark."},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-11(4:12)2015"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809990268"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-57208-2_35"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0053567"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/2827695"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-40787-1_8"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-49665-7_24"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-70592-5_22"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/2873052"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2018.08.005"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2808098.2808100"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/158511.158524"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/2804302.2804319"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.4204\/EPTCS.304.4"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2017.10.006"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-50029-0_8"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2022.4"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2976002.2976018"},{"key":"e_1_2_1_33_1","unstructured":"Sam Lindley and J. Garrett Morris. 2017. Lightweight Functional Session Types."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110279"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(92)90008-4"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","unstructured":"Anson Miu Francisco Ferreira Nobuko Yoshida and Fangyi Zhou. 2021. Communication-safe Web Programming in TypeScript With Routed Multiparty Session Types. In CC \u201921 Aaron Smith Delphine Demange and Rajiv Gupta (Eds.). ACM Virtual Event Republic of Korea. 94\u2013106. https:\/\/doi.org\/10.1145\/3446804.3446854 10.1145\/3446804.3446854","DOI":"10.1145\/3446804.3446854"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-24836-1_5"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837634"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796816000289"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3229062"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/1411286.1411290"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0002782"},{"key":"e_1_2_1_43_1","volume-title":"New Directions in Algorithmic Languages, Stephen A","author":"Reynolds John C.","year":"1994","unstructured":"John C. Reynolds. 1975. User-defined Types and Procedural Data Structures as Complementary Approaches to Data Abstraction. In New Directions in Algorithmic Languages, Stephen A. Schumann (Ed.). INRIA, Paris, France. 12 pages. https:\/\/kilthub.cmu.edu\/articles\/journal_contribution\/User-defined_Types_and_Procedural_Data_Structures_as_Complementary_Approaches_to_Data_Abstraction\/6611723 Reprinted in Reynolds1994"},{"key":"e_1_2_1_44_1","volume-title":"Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design, Carl A","author":"Reynolds John C.","year":"1975","unstructured":"John C. Reynolds. 1994. User-defined Types and Procedural Data Structures as Complementary Approaches to Data Abstraction. In Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design, Carl A. Gunter and John C. Mitchell (Eds.). MIT Press, Cambridge, MA, USA. 13\u201323. isbn:0-262-07155-X Originally published in Reynolds1975"},{"key":"e_1_2_1_45_1","volume-title":"Session Types in Haskell. Updating Message Passing for the 21st Century.  https:\/\/spiral.imperial.ac.uk:8443\/handle\/10044\/1\/5918","author":"Sackman Matthew","unstructured":"Matthew Sackman and Susan Eisenbach. 2008. Session Types in Haskell. Updating Message Passing for the 21st Century. https:\/\/spiral.imperial.ac.uk:8443\/handle\/10044\/1\/5918"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2016.21"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796808006758"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-58184-7_118"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1017\/s0956796899003469"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.8164971"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/2951913.2951926"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371135"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-37036-6_20"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-11957-6_29"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926436"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2006.06.028"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1017\/S095679681400001X"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.4204\/EPTCS.238.8"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371119"},{"key":"e_1_2_1_60_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428216"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3607854","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3607854","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T16:37:06Z","timestamp":1750178226000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3607854"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,8,30]]},"references-count":60,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2023,8,30]]}},"alternative-id":["10.1145\/3607854"],"URL":"https:\/\/doi.org\/10.1145\/3607854","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,8,30]]},"assertion":[{"value":"2023-08-31","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}