A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go
Featherweight Generic Go (FGG) is a minimal core calculus modeling the essential features of the programming language Go. It includes support for overloaded methods, interface types, structural subtyping, and generics. The most straightforward semantic description of the dynamic behavior of FGG prog...
Gespeichert in:
Veröffentlicht in: | Journal of functional programming 2023-10, Vol.33, Article e8 |
---|---|
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 | |
---|---|
container_issue | |
container_start_page | |
container_title | Journal of functional programming |
container_volume | 33 |
creator | SULZMANN, MARTIN WEHR, STEFAN |
description | Featherweight Generic Go (FGG) is a minimal core calculus modeling the essential features of the programming language Go. It includes support for overloaded methods, interface types, structural subtyping, and generics. The most straightforward semantic description of the dynamic behavior of FGG programs is to resolve method calls based on runtime type information of the receiver. This article shows a different approach by defining a type-directed translation from
${\textrm{FGG}^{-}}$
to an untyped lambda-calculus.
${\textrm{FGG}^{-}}$
includes all features of FGG but type assertions. The translation of an
${\textrm{FGG}^{-}}$
program provides evidence for the availability of methods as additional dictionary parameters, similar to the dictionary-passing approach known from Haskell type classes. Then, method calls can be resolved by a simple lookup of the method definition in the dictionary. Every program in the image of the translation has the same dynamic semantics as its source
${\textrm{FGG}^{-}}$
program. The proof of this result is based on a syntactic, step-indexed logical relation. The step index ensures a well-founded definition of the relation in the presence of recursive interface types and recursive methods. Although being non-deterministic, the translation is coherent. |
doi_str_mv | 10.1017/S0956796823000047 |
format | Article |
fullrecord | <record><control><sourceid>proquest_cross</sourceid><recordid>TN_cdi_proquest_journals_2874075137</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><cupid>10_1017_S0956796823000047</cupid><sourcerecordid>2874075137</sourcerecordid><originalsourceid>FETCH-LOGICAL-c312t-9cc632c3c2b20b301aa3b2652e5448457c3ec15e7b6b17c70c0962846e4f54963</originalsourceid><addsrcrecordid>eNp1kE9Lw0AQxRdRsFY_gLcFr0b3_ybHUmwVBA_qOWw2k3ZLmq27G6V-ehNa8CDOZWDe772Bh9A1JXeUUH3_SgqpdKFyxskwQp-gCRWqyLSS_BRNRjkb9XN0EeNmQHIm8wn6nuG030FWuwA2QX2La2eT850J-2xnYnTdCqdgutia8Yx9g7eQ1r7G_hNC6009EqarcUyht6kPpsWxr4bUUXAdXoBJawhf4FbrhJfQQXAWL_0lOmtMG-HquKfoffHwNn_Mnl-WT_PZc2Y5ZSkrrFWcWW5ZxUjFCTWGV0xJBlKIXEhtOVgqQVeqotpqYkmhWC4UiEaKQvEpujnk7oL_6CGmcuP70A0vS5ZrQbSkXA8UPVA2-BgDNOUuuO3QQklJOVZc_ql48PCjx2yr4OoV_Eb_7_oBHtt_Ew</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2874075137</pqid></control><display><type>article</type><title>A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go</title><source>Cambridge Journals Open Access</source><source>Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals</source><creator>SULZMANN, MARTIN ; WEHR, STEFAN</creator><creatorcontrib>SULZMANN, MARTIN ; WEHR, STEFAN</creatorcontrib><description>Featherweight Generic Go (FGG) is a minimal core calculus modeling the essential features of the programming language Go. It includes support for overloaded methods, interface types, structural subtyping, and generics. The most straightforward semantic description of the dynamic behavior of FGG programs is to resolve method calls based on runtime type information of the receiver. This article shows a different approach by defining a type-directed translation from
${\textrm{FGG}^{-}}$
to an untyped lambda-calculus.
${\textrm{FGG}^{-}}$
includes all features of FGG but type assertions. The translation of an
${\textrm{FGG}^{-}}$
program provides evidence for the availability of methods as additional dictionary parameters, similar to the dictionary-passing approach known from Haskell type classes. Then, method calls can be resolved by a simple lookup of the method definition in the dictionary. Every program in the image of the translation has the same dynamic semantics as its source
${\textrm{FGG}^{-}}$
program. The proof of this result is based on a syntactic, step-indexed logical relation. The step index ensures a well-founded definition of the relation in the presence of recursive interface types and recursive methods. Although being non-deterministic, the translation is coherent.</description><identifier>ISSN: 0956-7968</identifier><identifier>EISSN: 1469-7653</identifier><identifier>DOI: 10.1017/S0956796823000047</identifier><language>eng</language><publisher>Cambridge, UK: Cambridge University Press</publisher><subject>Calculus ; Dictionaries ; Generic drugs ; Interfaces ; Language ; Methods ; Names ; Overloading ; Programming languages ; Recursive methods ; Semantics</subject><ispartof>Journal of functional programming, 2023-10, Vol.33, Article e8</ispartof><rights>The Author(s), 2023. Published by Cambridge University Press</rights><rights>The Author(s), 2023. Published by Cambridge University Press. This work is licensed under the Creative Commons Attribution License This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited. (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><cites>FETCH-LOGICAL-c312t-9cc632c3c2b20b301aa3b2652e5448457c3ec15e7b6b17c70c0962846e4f54963</cites><orcidid>0000-0001-5242-767X</orcidid></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktohtml>$$Uhttps://www.cambridge.org/core/product/identifier/S0956796823000047/type/journal_article$$EHTML$$P50$$Gcambridge$$Hfree_for_read</linktohtml><link.rule.ids>314,776,780,23297,27901,27902,55779</link.rule.ids></links><search><creatorcontrib>SULZMANN, MARTIN</creatorcontrib><creatorcontrib>WEHR, STEFAN</creatorcontrib><title>A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go</title><title>Journal of functional programming</title><addtitle>J. Funct. Prog</addtitle><description>Featherweight Generic Go (FGG) is a minimal core calculus modeling the essential features of the programming language Go. It includes support for overloaded methods, interface types, structural subtyping, and generics. The most straightforward semantic description of the dynamic behavior of FGG programs is to resolve method calls based on runtime type information of the receiver. This article shows a different approach by defining a type-directed translation from
${\textrm{FGG}^{-}}$
to an untyped lambda-calculus.
${\textrm{FGG}^{-}}$
includes all features of FGG but type assertions. The translation of an
${\textrm{FGG}^{-}}$
program provides evidence for the availability of methods as additional dictionary parameters, similar to the dictionary-passing approach known from Haskell type classes. Then, method calls can be resolved by a simple lookup of the method definition in the dictionary. Every program in the image of the translation has the same dynamic semantics as its source
${\textrm{FGG}^{-}}$
program. The proof of this result is based on a syntactic, step-indexed logical relation. The step index ensures a well-founded definition of the relation in the presence of recursive interface types and recursive methods. Although being non-deterministic, the translation is coherent.</description><subject>Calculus</subject><subject>Dictionaries</subject><subject>Generic drugs</subject><subject>Interfaces</subject><subject>Language</subject><subject>Methods</subject><subject>Names</subject><subject>Overloading</subject><subject>Programming languages</subject><subject>Recursive methods</subject><subject>Semantics</subject><issn>0956-7968</issn><issn>1469-7653</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2023</creationdate><recordtype>article</recordtype><sourceid>IKXGN</sourceid><sourceid>BENPR</sourceid><recordid>eNp1kE9Lw0AQxRdRsFY_gLcFr0b3_ybHUmwVBA_qOWw2k3ZLmq27G6V-ehNa8CDOZWDe772Bh9A1JXeUUH3_SgqpdKFyxskwQp-gCRWqyLSS_BRNRjkb9XN0EeNmQHIm8wn6nuG030FWuwA2QX2La2eT850J-2xnYnTdCqdgutia8Yx9g7eQ1r7G_hNC6009EqarcUyht6kPpsWxr4bUUXAdXoBJawhf4FbrhJfQQXAWL_0lOmtMG-HquKfoffHwNn_Mnl-WT_PZc2Y5ZSkrrFWcWW5ZxUjFCTWGV0xJBlKIXEhtOVgqQVeqotpqYkmhWC4UiEaKQvEpujnk7oL_6CGmcuP70A0vS5ZrQbSkXA8UPVA2-BgDNOUuuO3QQklJOVZc_ql48PCjx2yr4OoV_Eb_7_oBHtt_Ew</recordid><startdate>20231009</startdate><enddate>20231009</enddate><creator>SULZMANN, MARTIN</creator><creator>WEHR, STEFAN</creator><general>Cambridge University Press</general><scope>IKXGN</scope><scope>AAYXX</scope><scope>CITATION</scope><scope>3V.</scope><scope>7SC</scope><scope>7XB</scope><scope>8AL</scope><scope>8FD</scope><scope>8FE</scope><scope>8FG</scope><scope>8FK</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>ARAPS</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>GNUQQ</scope><scope>HCIFZ</scope><scope>JQ2</scope><scope>K7-</scope><scope>L7M</scope><scope>L~C</scope><scope>L~D</scope><scope>M0N</scope><scope>P5Z</scope><scope>P62</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>Q9U</scope><orcidid>https://orcid.org/0000-0001-5242-767X</orcidid></search><sort><creationdate>20231009</creationdate><title>A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go</title><author>SULZMANN, MARTIN ; WEHR, STEFAN</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c312t-9cc632c3c2b20b301aa3b2652e5448457c3ec15e7b6b17c70c0962846e4f54963</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2023</creationdate><topic>Calculus</topic><topic>Dictionaries</topic><topic>Generic drugs</topic><topic>Interfaces</topic><topic>Language</topic><topic>Methods</topic><topic>Names</topic><topic>Overloading</topic><topic>Programming languages</topic><topic>Recursive methods</topic><topic>Semantics</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>SULZMANN, MARTIN</creatorcontrib><creatorcontrib>WEHR, STEFAN</creatorcontrib><collection>Cambridge Journals Open Access</collection><collection>CrossRef</collection><collection>ProQuest Central (Corporate)</collection><collection>Computer and Information Systems Abstracts</collection><collection>ProQuest Central (purchase pre-March 2016)</collection><collection>Computing Database (Alumni Edition)</collection><collection>Technology Research Database</collection><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>ProQuest Central (Alumni) (purchase pre-March 2016)</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>Advanced Technologies & Aerospace Collection</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>ProQuest Central Student</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Computer Science Collection</collection><collection>Computer Science Database</collection><collection>Advanced Technologies Database with Aerospace</collection><collection>Computer and Information Systems Abstracts Academic</collection><collection>Computer and Information Systems Abstracts Professional</collection><collection>Computing Database</collection><collection>Advanced Technologies & Aerospace Database</collection><collection>ProQuest Advanced Technologies & Aerospace Collection</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central Basic</collection><jtitle>Journal of functional programming</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>SULZMANN, MARTIN</au><au>WEHR, STEFAN</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go</atitle><jtitle>Journal of functional programming</jtitle><addtitle>J. Funct. Prog</addtitle><date>2023-10-09</date><risdate>2023</risdate><volume>33</volume><artnum>e8</artnum><issn>0956-7968</issn><eissn>1469-7653</eissn><abstract>Featherweight Generic Go (FGG) is a minimal core calculus modeling the essential features of the programming language Go. It includes support for overloaded methods, interface types, structural subtyping, and generics. The most straightforward semantic description of the dynamic behavior of FGG programs is to resolve method calls based on runtime type information of the receiver. This article shows a different approach by defining a type-directed translation from
${\textrm{FGG}^{-}}$
to an untyped lambda-calculus.
${\textrm{FGG}^{-}}$
includes all features of FGG but type assertions. The translation of an
${\textrm{FGG}^{-}}$
program provides evidence for the availability of methods as additional dictionary parameters, similar to the dictionary-passing approach known from Haskell type classes. Then, method calls can be resolved by a simple lookup of the method definition in the dictionary. Every program in the image of the translation has the same dynamic semantics as its source
${\textrm{FGG}^{-}}$
program. The proof of this result is based on a syntactic, step-indexed logical relation. The step index ensures a well-founded definition of the relation in the presence of recursive interface types and recursive methods. Although being non-deterministic, the translation is coherent.</abstract><cop>Cambridge, UK</cop><pub>Cambridge University Press</pub><doi>10.1017/S0956796823000047</doi><tpages>63</tpages><orcidid>https://orcid.org/0000-0001-5242-767X</orcidid><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 0956-7968 |
ispartof | Journal of functional programming, 2023-10, Vol.33, Article e8 |
issn | 0956-7968 1469-7653 |
language | eng |
recordid | cdi_proquest_journals_2874075137 |
source | Cambridge Journals Open Access; Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals |
subjects | Calculus Dictionaries Generic drugs Interfaces Language Methods Names Overloading Programming languages Recursive methods Semantics |
title | A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-11T14%3A43%3A30IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=A%20type-directed,%20dictionary-passing%20translation%20of%20method%20overloading%20and%20structural%20subtyping%20in%20Featherweight%20Generic%20Go&rft.jtitle=Journal%20of%20functional%20programming&rft.au=SULZMANN,%20MARTIN&rft.date=2023-10-09&rft.volume=33&rft.artnum=e8&rft.issn=0956-7968&rft.eissn=1469-7653&rft_id=info:doi/10.1017/S0956796823000047&rft_dat=%3Cproquest_cross%3E2874075137%3C/proquest_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2874075137&rft_id=info:pmid/&rft_cupid=10_1017_S0956796823000047&rfr_iscdi=true |