Lune

POPL2024Top-tier venue

Fusing Direct Manipulations into Functional Programs

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

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Fast Direct Manipulation Programming with Patch-Reconciliation Correspondence cites Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects
  • Fast Direct Manipulation Programming with Patch-Reconciliation Correspondence cites Towards Bidirectional Live Programming for Incomplete Programs
  • Direct Manipulation and Natural Language Programming, Together at Last? cites Fast Direct Manipulation Programming with Patch-Reconciliation Correspondence
  • Direct Manipulation and Natural Language Programming, Together at Last? cites Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects
  • Programming By Scaffolded Demonstration with Perpend cites Fast Direct Manipulation Programming with Patch-Reconciliation Correspondence
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Programming By Scaffolded Demonstration with PerpendAngela Bi, Eric Rawn, Justin Lubin, Sarah E. ChasinsCHI 2026 · 2 citations
  2. Fast Direct Manipulation Programming with Patch-Reconciliation CorrespondenceParker Ziegler, Justin Lubin, Sarah E. ChasinsPLDI 2025 · 1 citation
  3. Direct Manipulation and Natural Language Programming, Together at Last?Parker Ziegler, David Minh-Duy Cao, Justin Lubin, Sarah E. ChasinsOOPSLA 2026

Builds on2

  1. Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of ObjectsXing Zhang, Guanchen Guo, Xiao He, Zhenjiang HuOOPSLA 2023 · 9 citations
  2. Towards Bidirectional Live Programming for Incomplete ProgramsXing Zhang, Zhenjiang HuICSE 2022 · 8 citations

Related papers

  1. Filling typed holes with live GUIsCyrus Omar, David Moon, Andrew Blinn, Ian Voysey et al.PLDI 2021 · 35 citations
  2. Image Editing As Programs with Diffusion ModelsYujia Hu, Songhua Liu, Zhenxiong Tan, Xingyi Yang et al.NeurIPS 2025 · 10 citations
  3. DAG amendment for inverse control of parametric shapesÉlie Michel, Tamy BoubekeurSIGGRAPH 2021 · 29 citations
  4. Synbit: synthesizing bidirectional programs using unidirectional sketchesMasaomi Yamaguchi, Kazutaka Matsuda, Cristina David, Meng WangOOPSLA 2021 · 6 citations
  5. Drawing Transforms: A Unifying Interaction Primitive to Procedurally Manipulate Graphics across Style, Space, and TimeSonia Hashim, Tobias Höllerer, Jennifer JacobsCHI 2023 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines