Fusing Direct Manipulations into Functional Programs
Bidirectional live programming systems (BLP) enable developers to modify a program by directly manipulating the program output, so that the updated program can produce the manipulated output. One state-of-the-art approach to BLP systems is operation-based, which captures the developer's intenti...
Gespeichert in:
Veröffentlicht in: | Proceedings of ACM on programming languages 2024-01, Vol.8 (POPL), p.1211-1238, Article 41 |
---|---|
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 | 1238 |
---|---|
container_issue | POPL |
container_start_page | 1211 |
container_title | Proceedings of ACM on programming languages |
container_volume | 8 |
creator | Zhang, Xing Xie, Ruifeng Guo, Guanchen He, Xiao Zan, Tao Hu, Zhenjiang |
description | Bidirectional live programming systems (BLP) enable developers to modify a program by directly manipulating the program output, so that the updated program can produce the manipulated output. One state-of-the-art approach to BLP systems is operation-based, which captures the developer's intention of program modifications by taking how the developer manipulates the output into account. The program modifications are usually hard coded for each direct manipulation in these BLP systems, which are difficult to extend. Moreover, to reflect the manipulations to the source program, these BLP systems trace the modified output to appropriate code fragments and perform corresponding code transformations. Accordingly, they require direct manipulation users be aware of the source code and how it is changed, making "direct" manipulation (on output) be "indirect". In this paper, we resolve this problem by presenting a novel operation-based framework for bidirectional live programming, which can automatically fuse direct manipulations into the source code, thus supporting code-insensitive direct manipulations. Firstly, we design a simple but expressive delta language DM capable of expressing common direct manipulations for output values. Secondly, we present a fusion algorithm that propagates direct manipulations into the source functional programs and applies them to the constants whenever possible; otherwise, the algorithm embeds manipulations into the "proper positions" of programs. We prove the correctness of the fusion algorithm that the updated program executes to get the manipulated output. To demonstrate the expressiveness of DM and the effectiveness of our fusion algorithm, we have implemented FuseDM, a prototype SVG editor that supports GUI-based operations for direct manipulation, and successfully designed 14 benchmark examples starting from blank code using FuseDM. |
doi_str_mv | 10.1145/3632883 |
format | Article |
fullrecord | <record><control><sourceid>acm_cross</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3632883</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3632883</sourcerecordid><originalsourceid>FETCH-LOGICAL-a169t-cacea1f6fad6eeada47ca574f1cfc155482e1f100197e53f9dadd3fb506ef9cd3</originalsourceid><addsrcrecordid>eNpNjz1PwzAQhi0EElWp2Jm8MQV88UfiERVSkIpggDk6_FEZJU5lJwP_HqIWxHTv6X10uoeQS2A3AELecsXLuuYnZFGKShYgSjj9l8_JKudPxhhoLmquF0Q0Uw5xR-9DcmakzxjDfupwDEPMNMRxoM0UzbxiR1_TsEvY5wty5rHLbnWcS_LePLytH4vty-ZpfbctEJQeC4PGIXjl0Srn0KKoDMpKeDDegJSiLh14mL-pnOReW7SW-w_JlPPaWL4k14e7Jg05J-fbfQo9pq8WWDv7tkffH_LqQKLp_6Df8hsIDlCY</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Fusing Direct Manipulations into Functional Programs</title><source>ACM Digital Library Complete</source><source>EZB-FREE-00999 freely available EZB journals</source><creator>Zhang, Xing ; Xie, Ruifeng ; Guo, Guanchen ; He, Xiao ; Zan, Tao ; Hu, Zhenjiang</creator><creatorcontrib>Zhang, Xing ; Xie, Ruifeng ; Guo, Guanchen ; He, Xiao ; Zan, Tao ; Hu, Zhenjiang</creatorcontrib><description>Bidirectional live programming systems (BLP) enable developers to modify a program by directly manipulating the program output, so that the updated program can produce the manipulated output. One state-of-the-art approach to BLP systems is operation-based, which captures the developer's intention of program modifications by taking how the developer manipulates the output into account. The program modifications are usually hard coded for each direct manipulation in these BLP systems, which are difficult to extend. Moreover, to reflect the manipulations to the source program, these BLP systems trace the modified output to appropriate code fragments and perform corresponding code transformations. Accordingly, they require direct manipulation users be aware of the source code and how it is changed, making "direct" manipulation (on output) be "indirect". In this paper, we resolve this problem by presenting a novel operation-based framework for bidirectional live programming, which can automatically fuse direct manipulations into the source code, thus supporting code-insensitive direct manipulations. Firstly, we design a simple but expressive delta language DM capable of expressing common direct manipulations for output values. Secondly, we present a fusion algorithm that propagates direct manipulations into the source functional programs and applies them to the constants whenever possible; otherwise, the algorithm embeds manipulations into the "proper positions" of programs. We prove the correctness of the fusion algorithm that the updated program executes to get the manipulated output. To demonstrate the expressiveness of DM and the effectiveness of our fusion algorithm, we have implemented FuseDM, a prototype SVG editor that supports GUI-based operations for direct manipulation, and successfully designed 14 benchmark examples starting from blank code using FuseDM.</description><identifier>ISSN: 2475-1421</identifier><identifier>EISSN: 2475-1421</identifier><identifier>DOI: 10.1145/3632883</identifier><language>eng</language><publisher>New York, NY, USA: ACM</publisher><subject>Design languages ; Software and its engineering</subject><ispartof>Proceedings of ACM on programming languages, 2024-01, Vol.8 (POPL), p.1211-1238, Article 41</ispartof><rights>Owner/Author</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><cites>FETCH-LOGICAL-a169t-cacea1f6fad6eeada47ca574f1cfc155482e1f100197e53f9dadd3fb506ef9cd3</cites><orcidid>0000-0002-3000-0795 ; 0009-0008-2565-7769 ; 0000-0001-7201-1954 ; 0009-0006-3581-5324 ; 0009-0007-0690-2119 ; 0000-0002-9034-205X</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/3632883$$EPDF$$P50$$Gacm$$Hfree_for_read</linktopdf><link.rule.ids>314,776,780,2275,27903,27904,40175,75974</link.rule.ids></links><search><creatorcontrib>Zhang, Xing</creatorcontrib><creatorcontrib>Xie, Ruifeng</creatorcontrib><creatorcontrib>Guo, Guanchen</creatorcontrib><creatorcontrib>He, Xiao</creatorcontrib><creatorcontrib>Zan, Tao</creatorcontrib><creatorcontrib>Hu, Zhenjiang</creatorcontrib><title>Fusing Direct Manipulations into Functional Programs</title><title>Proceedings of ACM on programming languages</title><addtitle>ACM PACMPL</addtitle><description>Bidirectional live programming systems (BLP) enable developers to modify a program by directly manipulating the program output, so that the updated program can produce the manipulated output. One state-of-the-art approach to BLP systems is operation-based, which captures the developer's intention of program modifications by taking how the developer manipulates the output into account. The program modifications are usually hard coded for each direct manipulation in these BLP systems, which are difficult to extend. Moreover, to reflect the manipulations to the source program, these BLP systems trace the modified output to appropriate code fragments and perform corresponding code transformations. Accordingly, they require direct manipulation users be aware of the source code and how it is changed, making "direct" manipulation (on output) be "indirect". In this paper, we resolve this problem by presenting a novel operation-based framework for bidirectional live programming, which can automatically fuse direct manipulations into the source code, thus supporting code-insensitive direct manipulations. Firstly, we design a simple but expressive delta language DM capable of expressing common direct manipulations for output values. Secondly, we present a fusion algorithm that propagates direct manipulations into the source functional programs and applies them to the constants whenever possible; otherwise, the algorithm embeds manipulations into the "proper positions" of programs. We prove the correctness of the fusion algorithm that the updated program executes to get the manipulated output. To demonstrate the expressiveness of DM and the effectiveness of our fusion algorithm, we have implemented FuseDM, a prototype SVG editor that supports GUI-based operations for direct manipulation, and successfully designed 14 benchmark examples starting from blank code using FuseDM.</description><subject>Design languages</subject><subject>Software and its engineering</subject><issn>2475-1421</issn><issn>2475-1421</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><recordid>eNpNjz1PwzAQhi0EElWp2Jm8MQV88UfiERVSkIpggDk6_FEZJU5lJwP_HqIWxHTv6X10uoeQS2A3AELecsXLuuYnZFGKShYgSjj9l8_JKudPxhhoLmquF0Q0Uw5xR-9DcmakzxjDfupwDEPMNMRxoM0UzbxiR1_TsEvY5wty5rHLbnWcS_LePLytH4vty-ZpfbctEJQeC4PGIXjl0Srn0KKoDMpKeDDegJSiLh14mL-pnOReW7SW-w_JlPPaWL4k14e7Jg05J-fbfQo9pq8WWDv7tkffH_LqQKLp_6Df8hsIDlCY</recordid><startdate>20240105</startdate><enddate>20240105</enddate><creator>Zhang, Xing</creator><creator>Xie, Ruifeng</creator><creator>Guo, Guanchen</creator><creator>He, Xiao</creator><creator>Zan, Tao</creator><creator>Hu, Zhenjiang</creator><general>ACM</general><scope>AAYXX</scope><scope>CITATION</scope><orcidid>https://orcid.org/0000-0002-3000-0795</orcidid><orcidid>https://orcid.org/0009-0008-2565-7769</orcidid><orcidid>https://orcid.org/0000-0001-7201-1954</orcidid><orcidid>https://orcid.org/0009-0006-3581-5324</orcidid><orcidid>https://orcid.org/0009-0007-0690-2119</orcidid><orcidid>https://orcid.org/0000-0002-9034-205X</orcidid></search><sort><creationdate>20240105</creationdate><title>Fusing Direct Manipulations into Functional Programs</title><author>Zhang, Xing ; Xie, Ruifeng ; Guo, Guanchen ; He, Xiao ; Zan, Tao ; Hu, Zhenjiang</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a169t-cacea1f6fad6eeada47ca574f1cfc155482e1f100197e53f9dadd3fb506ef9cd3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Design languages</topic><topic>Software and its engineering</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Zhang, Xing</creatorcontrib><creatorcontrib>Xie, Ruifeng</creatorcontrib><creatorcontrib>Guo, Guanchen</creatorcontrib><creatorcontrib>He, Xiao</creatorcontrib><creatorcontrib>Zan, Tao</creatorcontrib><creatorcontrib>Hu, Zhenjiang</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>Zhang, Xing</au><au>Xie, Ruifeng</au><au>Guo, Guanchen</au><au>He, Xiao</au><au>Zan, Tao</au><au>Hu, Zhenjiang</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Fusing Direct Manipulations into Functional Programs</atitle><jtitle>Proceedings of ACM on programming languages</jtitle><stitle>ACM PACMPL</stitle><date>2024-01-05</date><risdate>2024</risdate><volume>8</volume><issue>POPL</issue><spage>1211</spage><epage>1238</epage><pages>1211-1238</pages><artnum>41</artnum><issn>2475-1421</issn><eissn>2475-1421</eissn><abstract>Bidirectional live programming systems (BLP) enable developers to modify a program by directly manipulating the program output, so that the updated program can produce the manipulated output. One state-of-the-art approach to BLP systems is operation-based, which captures the developer's intention of program modifications by taking how the developer manipulates the output into account. The program modifications are usually hard coded for each direct manipulation in these BLP systems, which are difficult to extend. Moreover, to reflect the manipulations to the source program, these BLP systems trace the modified output to appropriate code fragments and perform corresponding code transformations. Accordingly, they require direct manipulation users be aware of the source code and how it is changed, making "direct" manipulation (on output) be "indirect". In this paper, we resolve this problem by presenting a novel operation-based framework for bidirectional live programming, which can automatically fuse direct manipulations into the source code, thus supporting code-insensitive direct manipulations. Firstly, we design a simple but expressive delta language DM capable of expressing common direct manipulations for output values. Secondly, we present a fusion algorithm that propagates direct manipulations into the source functional programs and applies them to the constants whenever possible; otherwise, the algorithm embeds manipulations into the "proper positions" of programs. We prove the correctness of the fusion algorithm that the updated program executes to get the manipulated output. To demonstrate the expressiveness of DM and the effectiveness of our fusion algorithm, we have implemented FuseDM, a prototype SVG editor that supports GUI-based operations for direct manipulation, and successfully designed 14 benchmark examples starting from blank code using FuseDM.</abstract><cop>New York, NY, USA</cop><pub>ACM</pub><doi>10.1145/3632883</doi><tpages>28</tpages><orcidid>https://orcid.org/0000-0002-3000-0795</orcidid><orcidid>https://orcid.org/0009-0008-2565-7769</orcidid><orcidid>https://orcid.org/0000-0001-7201-1954</orcidid><orcidid>https://orcid.org/0009-0006-3581-5324</orcidid><orcidid>https://orcid.org/0009-0007-0690-2119</orcidid><orcidid>https://orcid.org/0000-0002-9034-205X</orcidid><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 2475-1421 |
ispartof | Proceedings of ACM on programming languages, 2024-01, Vol.8 (POPL), p.1211-1238, Article 41 |
issn | 2475-1421 2475-1421 |
language | eng |
recordid | cdi_crossref_primary_10_1145_3632883 |
source | ACM Digital Library Complete; EZB-FREE-00999 freely available EZB journals |
subjects | Design languages Software and its engineering |
title | Fusing Direct Manipulations into Functional Programs |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-26T15%3A03%3A11IST&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=Fusing%20Direct%20Manipulations%20into%20Functional%20Programs&rft.jtitle=Proceedings%20of%20ACM%20on%20programming%20languages&rft.au=Zhang,%20Xing&rft.date=2024-01-05&rft.volume=8&rft.issue=POPL&rft.spage=1211&rft.epage=1238&rft.pages=1211-1238&rft.artnum=41&rft.issn=2475-1421&rft.eissn=2475-1421&rft_id=info:doi/10.1145/3632883&rft_dat=%3Cacm_cross%3E3632883%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 |