{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T20:17:28Z","timestamp":1784233048110,"version":"3.55.0"},"reference-count":39,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T00:00:00Z","timestamp":1503964800000},"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":[[2017,8,29]]},"abstract":"<jats:p>Contracts have proved to be an effective mechanism that helps developers in identifying those modules of a program that violate the contracts of the functions and objects they use. In recent years, sessions have established as a key mechanism for realizing inter-module communications in concurrent programs. Just like values flow into or out of a function or object, messages are sent on, and received from, a session endpoint. Unlike conventional functions and objects, however, the kind, direction, and properties of messages exchanged in a session may vary over time, as the session progresses. This feature of sessions calls for contracts that evolve along with the session they describe.<\/jats:p>\n          <jats:p>In this work, we extend to sessions the notion of chaperone contract (roughly, a contract that applies to a mutable object) and investigate the ramifications of contract monitoring in a higher-order language that features sessions. We give a characterization of correct module, one that honors the contracts of the sessions it uses, and prove a blame theorem. Guided by the calculus, we describe a lightweight implementation of monitored sessions as an OCaml module with which programmers can benefit from static session type checking and dynamic contract monitoring using an off-the-shelf version of OCaml.<\/jats:p>","DOI":"10.1145\/3110279","type":"journal-article","created":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T18:19:41Z","timestamp":1504030781000},"page":"1-29","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":8,"title":["Chaperone contracts for higher-order sessions"],"prefix":"10.1145","volume":"1","author":[{"given":"Hern\u00e1n","family":"Melgratti","sequence":"first","affiliation":[{"name":"University of Buenos Aires, Argentina"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Luca","family":"Padovani","sequence":"additional","affiliation":[{"name":"University of Turin, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,8,29]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-38592-6_21"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.7561\/SACS.2012.1.5"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806005971"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-38592-6_5"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-15375-4_12"},{"key":"e_1_2_2_6_1","volume-title":"Proceedings of TGC\u201911 (LNCS 7173)","author":"Chen Tzu-Chun","year":"2011","unstructured":"Tzu-Chun Chen , Laura Bocchi , Pierre-Malo Deni\u00e9lou , Kohei Honda , and Nobuko Yoshida . 2011 . Asynchronous Distributed Monitoring for Multiparty Session Enforcement . In Proceedings of TGC\u201911 (LNCS 7173) . Springer, 25\u201345. Tzu-Chun Chen, Laura Bocchi, Pierre-Malo Deni\u00e9lou, Kohei Honda, and Nobuko Yoshida. 2011. Asynchronous Distributed Monitoring for Multiparty Session Enforcement. In Proceedings of TGC\u201911 (LNCS 7173). Springer, 25\u201345."},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2039346.2039348"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926410"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-28869-2_11"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034800"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1007\/11737414_16"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/581478.581484"},{"key":"e_1_2_2_13_1","volume-title":"Proceedings of ACM SIGPLAN Workshop on ML.","author":"Garrigue Jacques","year":"2011","unstructured":"Jacques Garrigue and Jacques Le Normand . 2011 . Adding GADTs to OCaml: the direct approach . In Proceedings of ACM SIGPLAN Workshop on ML. Jacques Garrigue and Jacques Le Normand. 2011. Adding GADTs to OCaml: the direct approach. In Proceedings of ACM SIGPLAN Workshop on ML."},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00236-005-0177-z"},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809990268"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/1706299.1706335"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796812000135"},{"key":"e_1_2_2_18_1","volume-title":"Proceedings of TFP\u201907","volume":"8","author":"Gronski Jessica","year":"2007","unstructured":"Jessica Gronski and Cormac Flanagan . 2007 . Unifying Hybrid Types and Contracts . In Proceedings of TFP\u201907 , Vol. 8 . Intellect, 54\u201370. Jessica Gronski and Cormac Flanagan. 2007. Unifying Hybrid Types and Contracts. In Proceedings of TFP\u201907, Vol. 8. Intellect, 54\u201370."},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1007\/11737414_15"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-57208-2_35"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0053567"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837662"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/1667048.1667051"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/330249.330251"},{"key":"e_1_2_2_25_1","volume-title":"Chaperone Contracts for Higher-Order Sessions. (2017). Retrieved","author":"Melgratti Hern\u00e1n","year":"2017","unstructured":"Hern\u00e1n Melgratti and Luca Padovani . 2017. Chaperone Contracts for Higher-Order Sessions. (2017). Retrieved Jul 2, 2017 from http:\/\/hdl.handle.net\/2318\/164 Hern\u00e1n Melgratti and Luca Padovani. 2017. Chaperone Contracts for Higher-Order Sessions. (2017). Retrieved Jul 2, 2017 from http:\/\/hdl.handle.net\/2318\/164"},{"key":"e_1_2_2_26_1","volume-title":"Advances in Object-oriented Software Engineering","author":"Meyer Bertrand","unstructured":"Bertrand Meyer . 1992. Design by Contract . In Advances in Object-oriented Software Engineering . Prentice-Hall , 1\u201350. Bertrand Meyer. 1992. Design by Contract. In Advances in Object-oriented Software Engineering. Prentice-Hall, 1\u201350."},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628156"},{"key":"e_1_2_2_28_1","volume-title":"A Simple Library Implementation of Binary Sessions. Journal of Functional Programming 27","author":"Padovani Luca","year":"2017","unstructured":"Luca Padovani . 2017. A Simple Library Implementation of Binary Sessions. Journal of Functional Programming 27 ( 2017 ). Luca Padovani. 2017. A Simple Library Implementation of Binary Sessions. Journal of Functional Programming 27 (2017)."},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-44618-4_34"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2013.09.005"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/2384616.2384685"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2784731.2784742"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-45917-1_10"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/2003476.2003499"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-30936-1_23"},{"key":"e_1_2_2_36_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-11957-6_29"},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926436"},{"key":"e_1_2_2_38_1","volume-title":"Proceedings of SNAPL\u201915 (LIPIcs 32)","author":"Wadler Philip","year":"2015","unstructured":"Philip Wadler . 2015 . A Complement to Blame . In Proceedings of SNAPL\u201915 (LIPIcs 32) . Schloss Dagstuhl, 309\u2013320. Philip Wadler. 2015. A Complement to Blame. In Proceedings of SNAPL\u201915 (LIPIcs 32). Schloss Dagstuhl, 309\u2013320."},{"key":"e_1_2_2_39_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_1"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110279","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3110279","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T04:38:44Z","timestamp":1750221524000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110279"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,8,29]]},"references-count":39,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2017,8,29]]}},"alternative-id":["10.1145\/3110279"],"URL":"https:\/\/doi.org\/10.1145\/3110279","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,8,29]]},"assertion":[{"value":"2017-08-29","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}