Back to Direct Style: Typed and Tight
Translating programs into continuation-passing style is a well-studied tool to explicitly deal with the control structure of programs. This is useful, for example, for compilation. In a typed setting, there also is a logical interpretation of such a translation as an embedding of classical logic int...
Gespeichert in:
Veröffentlicht in: | Proceedings of ACM on programming languages 2023-04, Vol.7 (OOPSLA1), p.848-875, Article 104 |
---|---|
Hauptverfasser: | , , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
container_end_page | 875 |
---|---|
container_issue | OOPSLA1 |
container_start_page | 848 |
container_title | Proceedings of ACM on programming languages |
container_volume | 7 |
creator | Müller, Marius Schuster, Philipp Brachthäuser, Jonathan Immanuel Ostermann, Klaus |
description | Translating programs into continuation-passing style is a well-studied tool to explicitly deal with the control structure of programs. This is useful, for example, for compilation. In a typed setting, there also is a logical interpretation of such a translation as an embedding of classical logic into intuitionistic logic. A naturally arising question is whether there is an inverse translation back to direct style. The answer to this question depends on how the continuation-passing translation is defined and on the domain of the inverse translation. In general, translating programs from continuation-passing style back to direct style requires the use of control operators to account for the use of continuations in non-trivial ways. We present two languages, one in direct style and one in continuation-passing style. Both languages are typed and equipped with an abstract machine semantics. Moreover, both languages allow for non-trivial control flow. We further present a translation to continuation-passing style and a translation back to direct style. We show that both translations are type-preserving and also preserve semantics in a very precise way giving an operational correspondence between the two languages. Moreover, we show that the compositions of the translations are well-behaved. In particular, they are syntactic one-sided inverses on the full language and full syntactic inverses when restricted to trivial control flow. |
doi_str_mv | 10.1145/3586056 |
format | Article |
fullrecord | <record><control><sourceid>acm_cross</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3586056</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3586056</sourcerecordid><originalsourceid>FETCH-LOGICAL-a239t-f56787f609d5929348a1fb21bf938d433bfbc747926ba8242f748a08646b7cc83</originalsourceid><addsrcrecordid>eNpNj01PAjEYhBsjiQQJd0-9GE6rfftdb4qfCYkHlvOm7ba6CkLaXvbfCwGMp5lknsxkEJoAuQHg4pYJLYmQZ2hIuRIVcArn__wFGuf8RQgBw7hmZoiuH6z_xmWDH7sUfMGL0q_CHa77bWix_Wlx3X18lks0iHaVw_ioI7R8fqpnr9X8_eVtdj-vLGWmVFFIpVWUxLTC0P2EhegouGiYbjljLjqvuDJUOqspp1HtEKIll055r9kITQ-9Pm1yTiE229StbeobIM3-YHM8uCOvDqT16z_oFP4CdkxHJA</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Back to Direct Style: Typed and Tight</title><source>ACM Digital Library Complete</source><source>EZB-FREE-00999 freely available EZB journals</source><creator>Müller, Marius ; Schuster, Philipp ; Brachthäuser, Jonathan Immanuel ; Ostermann, Klaus</creator><creatorcontrib>Müller, Marius ; Schuster, Philipp ; Brachthäuser, Jonathan Immanuel ; Ostermann, Klaus</creatorcontrib><description>Translating programs into continuation-passing style is a well-studied tool to explicitly deal with the control structure of programs. This is useful, for example, for compilation. In a typed setting, there also is a logical interpretation of such a translation as an embedding of classical logic into intuitionistic logic. A naturally arising question is whether there is an inverse translation back to direct style. The answer to this question depends on how the continuation-passing translation is defined and on the domain of the inverse translation. In general, translating programs from continuation-passing style back to direct style requires the use of control operators to account for the use of continuations in non-trivial ways. We present two languages, one in direct style and one in continuation-passing style. Both languages are typed and equipped with an abstract machine semantics. Moreover, both languages allow for non-trivial control flow. We further present a translation to continuation-passing style and a translation back to direct style. We show that both translations are type-preserving and also preserve semantics in a very precise way giving an operational correspondence between the two languages. Moreover, we show that the compositions of the translations are well-behaved. In particular, they are syntactic one-sided inverses on the full language and full syntactic inverses when restricted to trivial control flow.</description><identifier>ISSN: 2475-1421</identifier><identifier>EISSN: 2475-1421</identifier><identifier>DOI: 10.1145/3586056</identifier><language>eng</language><publisher>New York, NY, USA: ACM</publisher><subject>Compilers ; Control primitives ; Control structures ; Software and its engineering ; Theory of computation ; Type theory</subject><ispartof>Proceedings of ACM on programming languages, 2023-04, Vol.7 (OOPSLA1), p.848-875, Article 104</ispartof><rights>Owner/Author</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><cites>FETCH-LOGICAL-a239t-f56787f609d5929348a1fb21bf938d433bfbc747926ba8242f748a08646b7cc83</cites><orcidid>0000-0002-0260-6298 ; 0000-0001-5294-5506 ; 0000-0001-8011-0506 ; 0000-0001-9128-0391</orcidid></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktopdf>$$Uhttps://dl.acm.org/doi/pdf/10.1145/3586056$$EPDF$$P50$$Gacm$$Hfree_for_read</linktopdf><link.rule.ids>314,776,780,2276,27901,27902,40172,75970</link.rule.ids></links><search><creatorcontrib>Müller, Marius</creatorcontrib><creatorcontrib>Schuster, Philipp</creatorcontrib><creatorcontrib>Brachthäuser, Jonathan Immanuel</creatorcontrib><creatorcontrib>Ostermann, Klaus</creatorcontrib><title>Back to Direct Style: Typed and Tight</title><title>Proceedings of ACM on programming languages</title><addtitle>ACM PACMPL</addtitle><description>Translating programs into continuation-passing style is a well-studied tool to explicitly deal with the control structure of programs. This is useful, for example, for compilation. In a typed setting, there also is a logical interpretation of such a translation as an embedding of classical logic into intuitionistic logic. A naturally arising question is whether there is an inverse translation back to direct style. The answer to this question depends on how the continuation-passing translation is defined and on the domain of the inverse translation. In general, translating programs from continuation-passing style back to direct style requires the use of control operators to account for the use of continuations in non-trivial ways. We present two languages, one in direct style and one in continuation-passing style. Both languages are typed and equipped with an abstract machine semantics. Moreover, both languages allow for non-trivial control flow. We further present a translation to continuation-passing style and a translation back to direct style. We show that both translations are type-preserving and also preserve semantics in a very precise way giving an operational correspondence between the two languages. Moreover, we show that the compositions of the translations are well-behaved. In particular, they are syntactic one-sided inverses on the full language and full syntactic inverses when restricted to trivial control flow.</description><subject>Compilers</subject><subject>Control primitives</subject><subject>Control structures</subject><subject>Software and its engineering</subject><subject>Theory of computation</subject><subject>Type theory</subject><issn>2475-1421</issn><issn>2475-1421</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2023</creationdate><recordtype>article</recordtype><recordid>eNpNj01PAjEYhBsjiQQJd0-9GE6rfftdb4qfCYkHlvOm7ba6CkLaXvbfCwGMp5lknsxkEJoAuQHg4pYJLYmQZ2hIuRIVcArn__wFGuf8RQgBw7hmZoiuH6z_xmWDH7sUfMGL0q_CHa77bWix_Wlx3X18lks0iHaVw_ioI7R8fqpnr9X8_eVtdj-vLGWmVFFIpVWUxLTC0P2EhegouGiYbjljLjqvuDJUOqspp1HtEKIll055r9kITQ-9Pm1yTiE229StbeobIM3-YHM8uCOvDqT16z_oFP4CdkxHJA</recordid><startdate>20230406</startdate><enddate>20230406</enddate><creator>Müller, Marius</creator><creator>Schuster, Philipp</creator><creator>Brachthäuser, Jonathan Immanuel</creator><creator>Ostermann, Klaus</creator><general>ACM</general><scope>AAYXX</scope><scope>CITATION</scope><orcidid>https://orcid.org/0000-0002-0260-6298</orcidid><orcidid>https://orcid.org/0000-0001-5294-5506</orcidid><orcidid>https://orcid.org/0000-0001-8011-0506</orcidid><orcidid>https://orcid.org/0000-0001-9128-0391</orcidid></search><sort><creationdate>20230406</creationdate><title>Back to Direct Style: Typed and Tight</title><author>Müller, Marius ; Schuster, Philipp ; Brachthäuser, Jonathan Immanuel ; Ostermann, Klaus</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a239t-f56787f609d5929348a1fb21bf938d433bfbc747926ba8242f748a08646b7cc83</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2023</creationdate><topic>Compilers</topic><topic>Control primitives</topic><topic>Control structures</topic><topic>Software and its engineering</topic><topic>Theory of computation</topic><topic>Type theory</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Müller, Marius</creatorcontrib><creatorcontrib>Schuster, Philipp</creatorcontrib><creatorcontrib>Brachthäuser, Jonathan Immanuel</creatorcontrib><creatorcontrib>Ostermann, Klaus</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>Müller, Marius</au><au>Schuster, Philipp</au><au>Brachthäuser, Jonathan Immanuel</au><au>Ostermann, Klaus</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Back to Direct Style: Typed and Tight</atitle><jtitle>Proceedings of ACM on programming languages</jtitle><stitle>ACM PACMPL</stitle><date>2023-04-06</date><risdate>2023</risdate><volume>7</volume><issue>OOPSLA1</issue><spage>848</spage><epage>875</epage><pages>848-875</pages><artnum>104</artnum><issn>2475-1421</issn><eissn>2475-1421</eissn><abstract>Translating programs into continuation-passing style is a well-studied tool to explicitly deal with the control structure of programs. This is useful, for example, for compilation. In a typed setting, there also is a logical interpretation of such a translation as an embedding of classical logic into intuitionistic logic. A naturally arising question is whether there is an inverse translation back to direct style. The answer to this question depends on how the continuation-passing translation is defined and on the domain of the inverse translation. In general, translating programs from continuation-passing style back to direct style requires the use of control operators to account for the use of continuations in non-trivial ways. We present two languages, one in direct style and one in continuation-passing style. Both languages are typed and equipped with an abstract machine semantics. Moreover, both languages allow for non-trivial control flow. We further present a translation to continuation-passing style and a translation back to direct style. We show that both translations are type-preserving and also preserve semantics in a very precise way giving an operational correspondence between the two languages. Moreover, we show that the compositions of the translations are well-behaved. In particular, they are syntactic one-sided inverses on the full language and full syntactic inverses when restricted to trivial control flow.</abstract><cop>New York, NY, USA</cop><pub>ACM</pub><doi>10.1145/3586056</doi><tpages>28</tpages><orcidid>https://orcid.org/0000-0002-0260-6298</orcidid><orcidid>https://orcid.org/0000-0001-5294-5506</orcidid><orcidid>https://orcid.org/0000-0001-8011-0506</orcidid><orcidid>https://orcid.org/0000-0001-9128-0391</orcidid><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 2475-1421 |
ispartof | Proceedings of ACM on programming languages, 2023-04, Vol.7 (OOPSLA1), p.848-875, Article 104 |
issn | 2475-1421 2475-1421 |
language | eng |
recordid | cdi_crossref_primary_10_1145_3586056 |
source | ACM Digital Library Complete; EZB-FREE-00999 freely available EZB journals |
subjects | Compilers Control primitives Control structures Software and its engineering Theory of computation Type theory |
title | Back to Direct Style: Typed and Tight |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-12T11%3A39%3A57IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-acm_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Back%20to%20Direct%20Style:%20Typed%20and%20Tight&rft.jtitle=Proceedings%20of%20ACM%20on%20programming%20languages&rft.au=M%C3%BCller,%20Marius&rft.date=2023-04-06&rft.volume=7&rft.issue=OOPSLA1&rft.spage=848&rft.epage=875&rft.pages=848-875&rft.artnum=104&rft.issn=2475-1421&rft.eissn=2475-1421&rft_id=info:doi/10.1145/3586056&rft_dat=%3Cacm_cross%3E3586056%3C/acm_cross%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 |