A unified treatment of syntax with binders
Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes one name to be used where another was intended. We propose an abstract interface to...
Gespeichert in:
Veröffentlicht in: | Journal of functional programming 2012-09, Vol.22 (4-5), p.614-704 |
---|---|
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 | 704 |
---|---|
container_issue | 4-5 |
container_start_page | 614 |
container_title | Journal of functional programming |
container_volume | 22 |
creator | POUILLARD, NICOLAS POTTIER, FRANÇOIS |
description | Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes one name to be used where another was intended. We propose an abstract interface to names and binders that rules out many of these errors. This interface is implemented as a library in Agda. It allows defining and manipulating term representations in nominal style and in de Bruijn style. The programmer is not forced to choose between these styles: on the contrary, the library allows using both styles in the same program, if desired. Whereas indexing the types of names and terms with a natural number is a well-known technique to better control the use of de Bruijn indices, we index types with worlds. Worlds are at the same time more precise and more abstract than natural numbers. Via logical relations and parametricity, we are able to demonstrate in what sense our library is safe, and to obtain theorems for free about world-polymorphic functions. For instance, we prove that a world-polymorphic term transformation function must commute with any renaming of the free variables. The proof is entirely carried out in Agda. |
doi_str_mv | 10.1017/S0956796812000251 |
format | Article |
fullrecord | <record><control><sourceid>proquest_hal_p</sourceid><recordid>TN_cdi_hal_primary_oai_HAL_hal_00772721v1</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><cupid>10_1017_S0956796812000251</cupid><sourcerecordid>1082215590</sourcerecordid><originalsourceid>FETCH-LOGICAL-c427t-3a76645eac5da8bc65cf61069687c57646bd1e0f4c1d0a3fafb323d12bea0ec93</originalsourceid><addsrcrecordid>eNp1kEtLxDAUhYMoOI7-AHcFNypUc5MmaZfDoI4w4EJdhzRNnAx9jEmrzr83ZUREcXXhnu-c-0DoFPAVYBDXj7hgXBQ8B4IxJgz20AQyXqSCM7qPJqOcjvohOgphHZmcsHyCLmfJ0DrrTJX03qi-MW2fdDYJ27ZXH8m761dJ6drK-HCMDqyqgzn5qlP0fHvzNF-ky4e7-_lsmeqMiD6lSnCeMaM0q1Reas605YB5nC00EzzjZQUG20xDhRW1ypaU0ApIaRQ2uqBTdLHLXalabrxrlN_KTjm5mC3l2MNYCCIIvEFkz3fsxnevgwm9bFzQpq5Va7ohSIhnEmCswBE9-4Wuu8G38ZJIUcowZEAjBTtK-y4Eb-z3BoDl-Gn559PRQ788qim9q17Mz-j_XJ-3v30L</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>1033501413</pqid></control><display><type>article</type><title>A unified treatment of syntax with binders</title><source>EZB-FREE-00999 freely available EZB journals</source><creator>POUILLARD, NICOLAS ; POTTIER, FRANÇOIS</creator><creatorcontrib>POUILLARD, NICOLAS ; POTTIER, FRANÇOIS</creatorcontrib><description>Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes one name to be used where another was intended. We propose an abstract interface to names and binders that rules out many of these errors. This interface is implemented as a library in Agda. It allows defining and manipulating term representations in nominal style and in de Bruijn style. The programmer is not forced to choose between these styles: on the contrary, the library allows using both styles in the same program, if desired. Whereas indexing the types of names and terms with a natural number is a well-known technique to better control the use of de Bruijn indices, we index types with worlds. Worlds are at the same time more precise and more abstract than natural numbers. Via logical relations and parametricity, we are able to demonstrate in what sense our library is safe, and to obtain theorems for free about world-polymorphic functions. For instance, we prove that a world-polymorphic term transformation function must commute with any renaming of the free variables. The proof is entirely carried out in Agda.</description><identifier>ISSN: 0956-7968</identifier><identifier>EISSN: 1469-7653</identifier><identifier>DOI: 10.1017/S0956796812000251</identifier><language>eng</language><publisher>Cambridge, UK: Cambridge University Press</publisher><subject>Binders ; Computer Science ; Indexing ; Libraries ; Names ; Permissible error ; Programming ; Programming Languages ; Representations ; Transformations</subject><ispartof>Journal of functional programming, 2012-09, Vol.22 (4-5), p.614-704</ispartof><rights>Copyright © Cambridge University Press 2012</rights><rights>Distributed under a Creative Commons Attribution 4.0 International License</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-c427t-3a76645eac5da8bc65cf61069687c57646bd1e0f4c1d0a3fafb323d12bea0ec93</citedby><cites>FETCH-LOGICAL-c427t-3a76645eac5da8bc65cf61069687c57646bd1e0f4c1d0a3fafb323d12bea0ec93</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>230,314,776,780,881,27901,27902</link.rule.ids><backlink>$$Uhttps://inria.hal.science/hal-00772721$$DView record in HAL$$Hfree_for_read</backlink></links><search><creatorcontrib>POUILLARD, NICOLAS</creatorcontrib><creatorcontrib>POTTIER, FRANÇOIS</creatorcontrib><title>A unified treatment of syntax with binders</title><title>Journal of functional programming</title><addtitle>J. Funct. Prog</addtitle><description>Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes one name to be used where another was intended. We propose an abstract interface to names and binders that rules out many of these errors. This interface is implemented as a library in Agda. It allows defining and manipulating term representations in nominal style and in de Bruijn style. The programmer is not forced to choose between these styles: on the contrary, the library allows using both styles in the same program, if desired. Whereas indexing the types of names and terms with a natural number is a well-known technique to better control the use of de Bruijn indices, we index types with worlds. Worlds are at the same time more precise and more abstract than natural numbers. Via logical relations and parametricity, we are able to demonstrate in what sense our library is safe, and to obtain theorems for free about world-polymorphic functions. For instance, we prove that a world-polymorphic term transformation function must commute with any renaming of the free variables. The proof is entirely carried out in Agda.</description><subject>Binders</subject><subject>Computer Science</subject><subject>Indexing</subject><subject>Libraries</subject><subject>Names</subject><subject>Permissible error</subject><subject>Programming</subject><subject>Programming Languages</subject><subject>Representations</subject><subject>Transformations</subject><issn>0956-7968</issn><issn>1469-7653</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2012</creationdate><recordtype>article</recordtype><sourceid>BENPR</sourceid><recordid>eNp1kEtLxDAUhYMoOI7-AHcFNypUc5MmaZfDoI4w4EJdhzRNnAx9jEmrzr83ZUREcXXhnu-c-0DoFPAVYBDXj7hgXBQ8B4IxJgz20AQyXqSCM7qPJqOcjvohOgphHZmcsHyCLmfJ0DrrTJX03qi-MW2fdDYJ27ZXH8m761dJ6drK-HCMDqyqgzn5qlP0fHvzNF-ky4e7-_lsmeqMiD6lSnCeMaM0q1Reas605YB5nC00EzzjZQUG20xDhRW1ypaU0ApIaRQ2uqBTdLHLXalabrxrlN_KTjm5mC3l2MNYCCIIvEFkz3fsxnevgwm9bFzQpq5Va7ohSIhnEmCswBE9-4Wuu8G38ZJIUcowZEAjBTtK-y4Eb-z3BoDl-Gn559PRQ788qim9q17Mz-j_XJ-3v30L</recordid><startdate>20120901</startdate><enddate>20120901</enddate><creator>POUILLARD, NICOLAS</creator><creator>POTTIER, FRANÇOIS</creator><general>Cambridge University Press</general><general>Cambridge University Press (CUP)</general><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>PRINS</scope><scope>Q9U</scope><scope>1XC</scope><scope>VOOES</scope></search><sort><creationdate>20120901</creationdate><title>A unified treatment of syntax with binders</title><author>POUILLARD, NICOLAS ; POTTIER, FRANÇOIS</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c427t-3a76645eac5da8bc65cf61069687c57646bd1e0f4c1d0a3fafb323d12bea0ec93</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2012</creationdate><topic>Binders</topic><topic>Computer Science</topic><topic>Indexing</topic><topic>Libraries</topic><topic>Names</topic><topic>Permissible error</topic><topic>Programming</topic><topic>Programming Languages</topic><topic>Representations</topic><topic>Transformations</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>POUILLARD, NICOLAS</creatorcontrib><creatorcontrib>POTTIER, FRANÇOIS</creatorcontrib><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 (ProQuest)</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 China</collection><collection>ProQuest Central Basic</collection><collection>Hyper Article en Ligne (HAL)</collection><collection>Hyper Article en Ligne (HAL) (Open Access)</collection><jtitle>Journal of functional programming</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>POUILLARD, NICOLAS</au><au>POTTIER, FRANÇOIS</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>A unified treatment of syntax with binders</atitle><jtitle>Journal of functional programming</jtitle><addtitle>J. Funct. Prog</addtitle><date>2012-09-01</date><risdate>2012</risdate><volume>22</volume><issue>4-5</issue><spage>614</spage><epage>704</epage><pages>614-704</pages><issn>0956-7968</issn><eissn>1469-7653</eissn><abstract>Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes one name to be used where another was intended. We propose an abstract interface to names and binders that rules out many of these errors. This interface is implemented as a library in Agda. It allows defining and manipulating term representations in nominal style and in de Bruijn style. The programmer is not forced to choose between these styles: on the contrary, the library allows using both styles in the same program, if desired. Whereas indexing the types of names and terms with a natural number is a well-known technique to better control the use of de Bruijn indices, we index types with worlds. Worlds are at the same time more precise and more abstract than natural numbers. Via logical relations and parametricity, we are able to demonstrate in what sense our library is safe, and to obtain theorems for free about world-polymorphic functions. For instance, we prove that a world-polymorphic term transformation function must commute with any renaming of the free variables. The proof is entirely carried out in Agda.</abstract><cop>Cambridge, UK</cop><pub>Cambridge University Press</pub><doi>10.1017/S0956796812000251</doi><tpages>91</tpages><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 0956-7968 |
ispartof | Journal of functional programming, 2012-09, Vol.22 (4-5), p.614-704 |
issn | 0956-7968 1469-7653 |
language | eng |
recordid | cdi_hal_primary_oai_HAL_hal_00772721v1 |
source | EZB-FREE-00999 freely available EZB journals |
subjects | Binders Computer Science Indexing Libraries Names Permissible error Programming Programming Languages Representations Transformations |
title | A unified treatment of syntax with binders |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-07T04%3A51%3A26IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_hal_p&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=A%20unified%20treatment%20of%20syntax%20with%20binders&rft.jtitle=Journal%20of%20functional%20programming&rft.au=POUILLARD,%20NICOLAS&rft.date=2012-09-01&rft.volume=22&rft.issue=4-5&rft.spage=614&rft.epage=704&rft.pages=614-704&rft.issn=0956-7968&rft.eissn=1469-7653&rft_id=info:doi/10.1017/S0956796812000251&rft_dat=%3Cproquest_hal_p%3E1082215590%3C/proquest_hal_p%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=1033501413&rft_id=info:pmid/&rft_cupid=10_1017_S0956796812000251&rfr_iscdi=true |