EUVIMEDEUVIMED entdecken
Open Access · CC BY-NC-SA 4.0

Fusing Direct Manipulations into Functional Programs

Xing Zhang, Ruifeng Xie, Guanchen Guo, Xiao He, Tao Zan, Zhenjiang Hu

Proceedings of the ACM on Programming Languages · 02.01.2024 · 8 (POPL) · 1211-1238

DOI: 10.1145/3632883 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Programming Languages, online erschienen am 05.01.2024. Verfasst von Xing Zhang und 5 weiteren Autor:innen. Die Arbeit wurde bisher 6-mal zitiert (Crossref) und nennt 23 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY-NC-SA 4.0). Gefördert von: the National Key Research and Development Program of China, the Natural Science Foundation of Fujian Province for Youths.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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.

Förderung

  • the National Key Research and Development Program of China
  • the Natural Science Foundation of Fujian Province for Youths

Zitieren

APA

Zhang, X., Xie, R., Guo, G., He, X., Zan, T., & Hu, Z. (2024). Fusing Direct Manipulations into Functional Programs. Proceedings of the ACM on Programming Languages, 8(POPL), 1211-1238. https://doi.org/10.1145/3632883

Vancouver

Zhang X, Xie R, Guo G, He X, Zan T, Hu Z. Fusing Direct Manipulations into Functional Programs. Proceedings of the ACM on Programming Languages. 2024;8(POPL):1211-1238. doi:10.1145/3632883

BibTeX
@article{Zhang2024,
  author = {Zhang, Xing and Xie, Ruifeng and Guo, Guanchen and He, Xiao and Zan, Tao and Hu, Zhenjiang},
  title = {Fusing Direct Manipulations into Functional Programs},
  journal = {Proceedings of the ACM on Programming Languages},
  year = {2024},
  volume = {8},
  number = {POPL},
  pages = {1211--1238},
  doi = {10.1145/3632883}
}
Kostenlos starten →