Pantograph: A Fluid and Typed Structure Editor
Structure editors operate directly on a program's syntactic tree structure. At first glance, this allows for the exciting possibility that such an editor could enforce correctness properties: programs could be well-formed and sometimes even well-typed by construction. Unfortunately, traditional...
Gespeichert in:
Veröffentlicht in: | arXiv.org 2024-11 |
---|---|
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 | arXiv.org |
container_volume | |
creator | Prinz, Jacob Blanchette, Henry Lampropoulos, Leonidas |
description | Structure editors operate directly on a program's syntactic tree structure. At first glance, this allows for the exciting possibility that such an editor could enforce correctness properties: programs could be well-formed and sometimes even well-typed by construction. Unfortunately, traditional approaches to structure editing that attempt to rigidly enforce these properties face a seemingly fundamental problem, known in the literature as viscosity. Making changes to existing programs often requires temporarily breaking program structure -- but disallowing such changes makes it difficult to edit programs! In this paper, we present a scheme for structure editing which always maintains a valid program structure without sacrificing the fluidity necessary to freely edit programs. Two key pieces help solve this puzzle: first, we develop a novel generalization of selection for tree-based structures that properly generalizes text-based selection and editing, allowing users to freely rearrange pieces of code by cutting and pasting one-hole contexts; second, we type these one-hole contexts with a category of type diffs and explore the metatheory of the system that arises for maintaining well-typedness systematically. We implement our approach as an editor called Pantograph, and we conduct a study in which we successfully taught students to program with Pantograph and compare their performance against a traditional text editor. |
doi_str_mv | 10.48550/arxiv.2411.16571 |
format | Article |
fullrecord | <record><control><sourceid>proquest_arxiv</sourceid><recordid>TN_cdi_arxiv_primary_2411_16571</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3133541583</sourcerecordid><originalsourceid>FETCH-LOGICAL-a523-113263adf59252011215fa2dea4e8209df93f8b66b5862f023200dfc577dc3653</originalsourceid><addsrcrecordid>eNotj8FKw0AURQdBsNR-gCsHXCfOey9vMnFXSqtCQcHswzQzoym1iZNE7N9bW1d3c7icI8QNqDQzzOrexp_mO8UMIAXNOVyICRJBYjLEKzHr-61SCnWOzDQR6avdD-17tN3Hg5zL1W5snLR7J8tD5518G-JYD2P0cumaoY3X4jLYXe9n_zsV5WpZLp6S9cvj82K-TiwjJQCEmqwLXCCjAkDgYNF5m3mDqnChoGA2Wm_YaAwKCZVyoeY8dzVppqm4Pd-eYqouNp82Hqq_qOoUdSTuzkQX26_R90O1bce4PzpVBEScARuiXx3uTG0</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>3133541583</pqid></control><display><type>article</type><title>Pantograph: A Fluid and Typed Structure Editor</title><source>arXiv.org</source><source>Free E- Journals</source><creator>Prinz, Jacob ; Blanchette, Henry ; Lampropoulos, Leonidas</creator><creatorcontrib>Prinz, Jacob ; Blanchette, Henry ; Lampropoulos, Leonidas</creatorcontrib><description>Structure editors operate directly on a program's syntactic tree structure. At first glance, this allows for the exciting possibility that such an editor could enforce correctness properties: programs could be well-formed and sometimes even well-typed by construction. Unfortunately, traditional approaches to structure editing that attempt to rigidly enforce these properties face a seemingly fundamental problem, known in the literature as viscosity. Making changes to existing programs often requires temporarily breaking program structure -- but disallowing such changes makes it difficult to edit programs! In this paper, we present a scheme for structure editing which always maintains a valid program structure without sacrificing the fluidity necessary to freely edit programs. Two key pieces help solve this puzzle: first, we develop a novel generalization of selection for tree-based structures that properly generalizes text-based selection and editing, allowing users to freely rearrange pieces of code by cutting and pasting one-hole contexts; second, we type these one-hole contexts with a category of type diffs and explore the metatheory of the system that arises for maintaining well-typedness systematically. We implement our approach as an editor called Pantograph, and we conduct a study in which we successfully taught students to program with Pantograph and compare their performance against a traditional text editor.</description><identifier>EISSN: 2331-8422</identifier><identifier>DOI: 10.48550/arxiv.2411.16571</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Computer Science - Programming Languages ; Editing ; Editors ; Pantographs ; Viscosity</subject><ispartof>arXiv.org, 2024-11</ispartof><rights>2024. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,780,784,885,27925</link.rule.ids><backlink>$$Uhttps://doi.org/10.1145/3704864$$DView published paper (Access to full text may be restricted)$$Hfree_for_read</backlink><backlink>$$Uhttps://doi.org/10.48550/arXiv.2411.16571$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Prinz, Jacob</creatorcontrib><creatorcontrib>Blanchette, Henry</creatorcontrib><creatorcontrib>Lampropoulos, Leonidas</creatorcontrib><title>Pantograph: A Fluid and Typed Structure Editor</title><title>arXiv.org</title><description>Structure editors operate directly on a program's syntactic tree structure. At first glance, this allows for the exciting possibility that such an editor could enforce correctness properties: programs could be well-formed and sometimes even well-typed by construction. Unfortunately, traditional approaches to structure editing that attempt to rigidly enforce these properties face a seemingly fundamental problem, known in the literature as viscosity. Making changes to existing programs often requires temporarily breaking program structure -- but disallowing such changes makes it difficult to edit programs! In this paper, we present a scheme for structure editing which always maintains a valid program structure without sacrificing the fluidity necessary to freely edit programs. Two key pieces help solve this puzzle: first, we develop a novel generalization of selection for tree-based structures that properly generalizes text-based selection and editing, allowing users to freely rearrange pieces of code by cutting and pasting one-hole contexts; second, we type these one-hole contexts with a category of type diffs and explore the metatheory of the system that arises for maintaining well-typedness systematically. We implement our approach as an editor called Pantograph, and we conduct a study in which we successfully taught students to program with Pantograph and compare their performance against a traditional text editor.</description><subject>Computer Science - Programming Languages</subject><subject>Editing</subject><subject>Editors</subject><subject>Pantographs</subject><subject>Viscosity</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>ABUWG</sourceid><sourceid>AFKRA</sourceid><sourceid>AZQEC</sourceid><sourceid>BENPR</sourceid><sourceid>CCPQU</sourceid><sourceid>DWQXO</sourceid><sourceid>GOX</sourceid><recordid>eNotj8FKw0AURQdBsNR-gCsHXCfOey9vMnFXSqtCQcHswzQzoym1iZNE7N9bW1d3c7icI8QNqDQzzOrexp_mO8UMIAXNOVyICRJBYjLEKzHr-61SCnWOzDQR6avdD-17tN3Hg5zL1W5snLR7J8tD5518G-JYD2P0cumaoY3X4jLYXe9n_zsV5WpZLp6S9cvj82K-TiwjJQCEmqwLXCCjAkDgYNF5m3mDqnChoGA2Wm_YaAwKCZVyoeY8dzVppqm4Pd-eYqouNp82Hqq_qOoUdSTuzkQX26_R90O1bce4PzpVBEScARuiXx3uTG0</recordid><startdate>20241126</startdate><enddate>20241126</enddate><creator>Prinz, Jacob</creator><creator>Blanchette, Henry</creator><creator>Lampropoulos, Leonidas</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20241126</creationdate><title>Pantograph: A Fluid and Typed Structure Editor</title><author>Prinz, Jacob ; Blanchette, Henry ; Lampropoulos, Leonidas</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a523-113263adf59252011215fa2dea4e8209df93f8b66b5862f023200dfc577dc3653</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computer Science - Programming Languages</topic><topic>Editing</topic><topic>Editors</topic><topic>Pantographs</topic><topic>Viscosity</topic><toplevel>online_resources</toplevel><creatorcontrib>Prinz, Jacob</creatorcontrib><creatorcontrib>Blanchette, Henry</creatorcontrib><creatorcontrib>Lampropoulos, Leonidas</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science & Engineering Collection</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</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>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>Publicly Available Content Database</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>Engineering Collection</collection><collection>arXiv Computer Science</collection><collection>arXiv.org</collection><jtitle>arXiv.org</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Prinz, Jacob</au><au>Blanchette, Henry</au><au>Lampropoulos, Leonidas</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Pantograph: A Fluid and Typed Structure Editor</atitle><jtitle>arXiv.org</jtitle><date>2024-11-26</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>Structure editors operate directly on a program's syntactic tree structure. At first glance, this allows for the exciting possibility that such an editor could enforce correctness properties: programs could be well-formed and sometimes even well-typed by construction. Unfortunately, traditional approaches to structure editing that attempt to rigidly enforce these properties face a seemingly fundamental problem, known in the literature as viscosity. Making changes to existing programs often requires temporarily breaking program structure -- but disallowing such changes makes it difficult to edit programs! In this paper, we present a scheme for structure editing which always maintains a valid program structure without sacrificing the fluidity necessary to freely edit programs. Two key pieces help solve this puzzle: first, we develop a novel generalization of selection for tree-based structures that properly generalizes text-based selection and editing, allowing users to freely rearrange pieces of code by cutting and pasting one-hole contexts; second, we type these one-hole contexts with a category of type diffs and explore the metatheory of the system that arises for maintaining well-typedness systematically. We implement our approach as an editor called Pantograph, and we conduct a study in which we successfully taught students to program with Pantograph and compare their performance against a traditional text editor.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><doi>10.48550/arxiv.2411.16571</doi><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | EISSN: 2331-8422 |
ispartof | arXiv.org, 2024-11 |
issn | 2331-8422 |
language | eng |
recordid | cdi_arxiv_primary_2411_16571 |
source | arXiv.org; Free E- Journals |
subjects | Computer Science - Programming Languages Editing Editors Pantographs Viscosity |
title | Pantograph: A Fluid and Typed Structure Editor |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-06T17%3A25%3A07IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_arxiv&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Pantograph:%20A%20Fluid%20and%20Typed%20Structure%20Editor&rft.jtitle=arXiv.org&rft.au=Prinz,%20Jacob&rft.date=2024-11-26&rft.eissn=2331-8422&rft_id=info:doi/10.48550/arxiv.2411.16571&rft_dat=%3Cproquest_arxiv%3E3133541583%3C/proquest_arxiv%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=3133541583&rft_id=info:pmid/&rfr_iscdi=true |