Chaperone contracts for higher-order sessions
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 p...
Gespeichert in:
Veröffentlicht in: | Proceedings of ACM on programming languages 2017-09, Vol.1 (ICFP), p.1-29 |
---|---|
Hauptverfasser: | , |
Format: | Artikel |
Sprache: | eng |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
container_end_page | 29 |
---|---|
container_issue | ICFP |
container_start_page | 1 |
container_title | Proceedings of ACM on programming languages |
container_volume | 1 |
creator | Melgratti, Hernán Padovani, Luca |
description | 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.
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. |
doi_str_mv | 10.1145/3110279 |
format | Article |
fullrecord | <record><control><sourceid>crossref</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3110279</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>10_1145_3110279</sourcerecordid><originalsourceid>FETCH-LOGICAL-c258t-b5a8cbbec1a090f6cede8116f726189a551e63b972acfb90568a90c17c5316ed3</originalsourceid><addsrcrecordid>eNpNj01LxDAUAIMouKyLf6E3T9G8pEmToxQ_Fha86Lkkry-2os2S14v_XsQ9eJo5DYwQ16BuAVp7ZwCU7sKZ2Oi2sxJaDef__FLsmD-UUhBM603YCNlP8Ui1LNRgWdYaceUml9pM8_tEVZY6Um2YmOey8JW4yPGTaXfiVrw9Prz2z_Lw8rTv7w8StfWrTDZ6TIkQogoqO6SRPIDLnXbgQ7QWyJkUOh0xp6Cs8zEohA6tAUej2Yqbvy7WwlwpD8c6f8X6PYAafkeH06j5AbItRDI</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Chaperone contracts for higher-order sessions</title><source>Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals</source><source>ACM Digital Library Complete</source><creator>Melgratti, Hernán ; Padovani, Luca</creator><creatorcontrib>Melgratti, Hernán ; Padovani, Luca</creatorcontrib><description>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.
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.</description><identifier>ISSN: 2475-1421</identifier><identifier>EISSN: 2475-1421</identifier><identifier>DOI: 10.1145/3110279</identifier><language>eng</language><ispartof>Proceedings of ACM on programming languages, 2017-09, Vol.1 (ICFP), p.1-29</ispartof><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-c258t-b5a8cbbec1a090f6cede8116f726189a551e63b972acfb90568a90c17c5316ed3</citedby><cites>FETCH-LOGICAL-c258t-b5a8cbbec1a090f6cede8116f726189a551e63b972acfb90568a90c17c5316ed3</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>315,781,785,27926,27927</link.rule.ids></links><search><creatorcontrib>Melgratti, Hernán</creatorcontrib><creatorcontrib>Padovani, Luca</creatorcontrib><title>Chaperone contracts for higher-order sessions</title><title>Proceedings of ACM on programming languages</title><description>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.
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.</description><issn>2475-1421</issn><issn>2475-1421</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2017</creationdate><recordtype>article</recordtype><recordid>eNpNj01LxDAUAIMouKyLf6E3T9G8pEmToxQ_Fha86Lkkry-2os2S14v_XsQ9eJo5DYwQ16BuAVp7ZwCU7sKZ2Oi2sxJaDef__FLsmD-UUhBM603YCNlP8Ui1LNRgWdYaceUml9pM8_tEVZY6Um2YmOey8JW4yPGTaXfiVrw9Prz2z_Lw8rTv7w8StfWrTDZ6TIkQogoqO6SRPIDLnXbgQ7QWyJkUOh0xp6Cs8zEohA6tAUej2Yqbvy7WwlwpD8c6f8X6PYAafkeH06j5AbItRDI</recordid><startdate>20170901</startdate><enddate>20170901</enddate><creator>Melgratti, Hernán</creator><creator>Padovani, Luca</creator><scope>AAYXX</scope><scope>CITATION</scope></search><sort><creationdate>20170901</creationdate><title>Chaperone contracts for higher-order sessions</title><author>Melgratti, Hernán ; Padovani, Luca</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c258t-b5a8cbbec1a090f6cede8116f726189a551e63b972acfb90568a90c17c5316ed3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2017</creationdate><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Melgratti, Hernán</creatorcontrib><creatorcontrib>Padovani, Luca</creatorcontrib><collection>CrossRef</collection><jtitle>Proceedings of ACM on programming languages</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Melgratti, Hernán</au><au>Padovani, Luca</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Chaperone contracts for higher-order sessions</atitle><jtitle>Proceedings of ACM on programming languages</jtitle><date>2017-09-01</date><risdate>2017</risdate><volume>1</volume><issue>ICFP</issue><spage>1</spage><epage>29</epage><pages>1-29</pages><issn>2475-1421</issn><eissn>2475-1421</eissn><abstract>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.
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.</abstract><doi>10.1145/3110279</doi><tpages>29</tpages><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 2475-1421 |
ispartof | Proceedings of ACM on programming languages, 2017-09, Vol.1 (ICFP), p.1-29 |
issn | 2475-1421 2475-1421 |
language | eng |
recordid | cdi_crossref_primary_10_1145_3110279 |
source | Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals; ACM Digital Library Complete |
title | Chaperone contracts for higher-order sessions |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2024-12-18T08%3A04%3A18IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-crossref&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Chaperone%20contracts%20for%20higher-order%20sessions&rft.jtitle=Proceedings%20of%20ACM%20on%20programming%20languages&rft.au=Melgratti,%20Hern%C3%A1n&rft.date=2017-09-01&rft.volume=1&rft.issue=ICFP&rft.spage=1&rft.epage=29&rft.pages=1-29&rft.issn=2475-1421&rft.eissn=2475-1421&rft_id=info:doi/10.1145/3110279&rft_dat=%3Ccrossref%3E10_1145_3110279%3C/crossref%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true |