arXiv:2608.26359cs.PLAug 2026

Manuscript Offprint

arXiv:2608.26359

Direct Manipulation and Natural Language Programming, Together at Last?

Parker Ziegler, David Minh-Duy Cao, Justin Lubin, Sarah E. Chasins

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

PARKER ZIEGLER ®^{\text{®}}, University of California, Berkeley, USA

DAVID MINH-DUY CAO, University of California, Berkeley, USA

JUSTIN LUBIN, University of California, Berkeley, USA

SARAH E. CHASINS, University of California, Berkeley, USA

Decades of programming languages research has contributed novel approaches to program editing that go beyond modifying text, including direct manipulation programming, structure editing, and automated refactoring tools. However, the rapid growth of natural language programming largely reinforces a view of programs as text and program editing as (unstructured) text transformation. How can we develop unified programming systems that bridge the gap between these approaches, supporting multiple editing paradigms in concert? And how would such systems change the way we program? We take a first step toward answering these questions by introducing a framework that enables program editing via both direct manipulation and natural language, and instantiate this framework in a variant of the cartokit direct manipulation programming system (cartokit DM+NL_{DM+NL}). Our key insight is to treat programs as sequences of structured edits and to use an edit language as a shared interface for both direct manipulation and natural language interactions, leveraging constrained decoding to support the latter. Using our instantiation, we conducted a within-subjects study (N=18) to understand how the combination of direct manipulation and natural language as editing modalities changes the programming process compared to each modality alone. Perhaps surprisingly, we found that study participants overwhelmingly chose to edit via direct manipulation when both modalities were available, performing just 6.14% of edits via natural language. Our thematic analysis of study sessions revealed that direct manipulation aided task decomposition, encouraged incremental editing, and helped mitigate known challenges in natural language programming related to understanding model capabilities and interpreting model-generated code. Conversely, natural language editing came into play largely to automate, parameterize, and replay known edits that would otherwise be repeated tediously by hand. Our edit-based framework and study findings lay out a possible pathway for future research on programming systems that blend natural language with alternative editing modalities, building on the foundation of edit languages.

CCS Concepts: • Human-centered computing → Empirical studies in HCI; User interface programming; Natural language interfaces; • Software and its engineering → Graphical user interface languages; Automatic programming.

Additional Key Words and Phrases: direct manipulation programming, natural language programming, edit languages, structured edit sequences, cartokit, geospatial data

ACM Reference Format:

Parker Ziegler, David Minh-Duy Cao, Justin Lubin, and Sarah E. Chasins. 2026. Direct Manipulation and Natural Language Programming, Together at Last?. Proc. ACM Program. Lang. 10, OOPSLA2, Article 355 (October 2026), 32 pages. https://doi.org/10.1145/3839487

Authors' Contact Information: Parker Ziegler, University of California, Berkeley, Electrical Engineering and Computer Sciences, Berkeley, USA, peziegler@cs.berkeley.edu; David Minh-Duy Cao, University of California, Berkeley, Electrical Engineering and Computer Sciences, Berkeley, USA, dmcao@berkeley.edu; Justin Lubin, University of California, Berkeley, Electrical Engineering and Computer Sciences, Berkeley, USA, justinlubin@berkeley.edu; Sarah E. Chasins, University of California, Berkeley, Electrical Engineering and Computer Sciences, Berkeley, USA, schasins@cs.berkeley.edu.

Figure

This work is licensed under a Creative Commons Attribution 4.0 International License.

© 2026 Copyright held by the owner/author(s).

ACM 2475-1421/2026/10-ART355

https://doi.org/10.1145/3839487

355:2

Parker Ziegler, David Minh-Duy Cao, Justin Lubin, and Sarah E. Chasins

1 Introduction

The programming languages community has devoted decades to developing new approaches to program editing beyond text-based manipulation, from direct manipulation programming [25, 42, 43, 117] to structure editing [1, 70, 78, 99] to automated code refactoring in IDEs [67, 79, 91, 100]. At the heart of these techniques is a perspective that “programs are not [just] text” [99]: they possess structure that programming systems can (and should!) exploit to assist in the editing process. Conversely, the recent arrival of code-generating large language models (LLMs) has largely reinforced a view of programs as text, and of program editing as a process of (unstructured) text transformation. LLMs generate code in a purely probabilistic fashion, sampling new tokens from a distribution conditioned on the previously generated token sequence. Recent work has attempted to reintroduce some degree of structure in this process by better contextualizing language model code completion with program information from language servers [11] and constraining language model code generation with semantic and type constraints [71, 73, 108]. Still, it remains unclear how we can integrate the potential of natural language programming and LLMs with the rich research in our community on programming paradigms that operate beyond text.

A promising approach, which we take in this paper, is to model programs not as arbitrary sequences of tokens or expressions, but as sequences of structured edits to a starting expression e0e_{0}:

e=(δn∘⋯∘δ1)e0e=\left(\delta_{n}\circ\cdots\circ\delta_{1}\right)e_{0}

This idea is already manifest in edit languages—such as Omar et al. [78]'s "actions" in Hazel, Meng et al. [67]'s "edit operations" in SYDIT, Ziegler et al. [123]'s "diffs" in cartokit, or Petricek and Edwards [84]'s "document edit types" in Denicek—that give precise syntax and semantics to edits, defining how programs (and their outputs) evolve at a fine level of granularity.

Given a structured language of edits, the next question is how to generate them. Prior work points to many different possibilities across diverse program editing contexts. In a structure editor like Hazel [77, 78], programmer interactions at the cursor dispatch edit actions that modify the “edit state” (i.e., the AST) directly according to Hazelnut’s action semantics. In direct manipulation programming systems like Sketch-n-Sketch [25, 42], FuseDM [117], and cartokit [123], GUI interactions (e.g., button presses, slider drags) generate edits, which are subsequently consumed by program modification techniques (e.g., fusion [117], patch-recon [123]) that translate these edits into transformations on the program and its output. In this paper, we explore how we can extend the notion of edit sequence generation to natural language programming, using an LLM to produce structured program edits (e.g., “actions,” “edit operations,” “diffs”)—as opposed to unstructured program text—from programmers’ prompts.

Bringing Together Direct Manipulation and Natural Language Programming. Unifying multiple edit modalities around an edit language as a shared interface opens up new directions for programming systems that support interchangeable editing across paradigms. Such programming systems, in turn, let us explore open-ended research questions about how the programming process changes when distinct paradigms are brought together.

In this paper, we take a first step toward this vision by specifically considering two programming paradigms, direct manipulation programming and natural language programming, asking: How does the programming process change when both direct manipulation and natural language are available as editing modalities in a single programming system? To explore this question, we first extend the cartokit direct manipulation programming system for geospatial visualization [123] with support for natural language editing in a variant we call cartokit DM+NL_{DM+NL}, using cartokit's existing structured diffs as a shared edit language. In our variant, programmers' natural language prompts are translated by an LLM to diff sequences, which can be directly interpreted by cartokit's existing diff semantics for GUI interactions. For example, a prompt like “Visualize the Democratic

355:3

vote share by precinct for the ‘Election 2024’ layer, using a political color scheme” might produce the following diff sequence, which will modify the marks for a particular map layer and select a data column to control the color of layer features:

setChannel('election__2024', 'fill-color-scheme', (d) → 'schemeRdBu') o setChannel('election__2024', 'fill-classification-method', (d) → 'Equal Interval') o setChannel('election__2024', 'fill-attribute', (d) → d['pct_dem_lead']) o setChannel('election__2024', 'layer-type', (d) → 'Choropleth')

We use constrained decoding [33, 45, 82] to enforce that LLM-generated diff sequences are both syntactically valid and satisfy additional semantic constraints (e.g., that numeric data associated with diffs fall within a certain interval, or that diffs only reference existing map layers and column names). LLM-generated diffs integrate directly with cartokit's patch-recon architecture; from the system's perspective, they appear as if they had been generated by GUI interactions. We then conducted a within-subjects user study (N=18) in which participants used (i) our new unified direct manipulation and natural language (DM+NL) programming system, (ii) a natural language (NL) programming system (GitHub Copilot [35] with GPT-5 [81]), and (iii) a direct manipulation (DM) programming system (cartokit [123]) to author JavaScript programs for interactive maps.

Key Findings. Our study revealed new insights on how programmers move and choose between direct manipulation and natural language editing when both are available. Surprisingly, participants overwhelmingly favored direct manipulation, performing just 6.14% of all edits through natural language prompting. We observed that direct manipulation functionality scaffolded the programming process, guiding participants from higher-level edits to lower-level refinements and shifting the main editing challenge from recall (How do I describe my intended edit?) to recognition (What part of the GUI can help me make my edit?). We also found that direct manipulation encouraged incremental editing that helped participants assess correctness and develop mappings between portions of the program output and the source code. When participants did use natural language, it was primarily to scale up repetitive edits or to obtain guidance when they did not know how to achieve the edit via direct manipulation. Interestingly, direct manipulation helped mitigate key challenges in natural language programming by shaping how participants phrased prompts and providing alternative views to inspect model-generated edits. Cumulatively, our findings lay the foundation for understanding programming systems that blend these two editing paradigms, building on the foundation of edit languages.

Contributions. In summary, we make the following contributions:

• Quantitative results and a thematic analysis from a within-subjects user study exploring unified direct manipulation and natural language (DM+NL) programming, with comparisons to direct manipulation (DM) programming and natural language (NL) programming. To our knowledge, this is the first user study of DM+NL programming as well as the first user study of DM programming.

  • To enable the above, a framework for blending direct manipulation and natural language programming, building on the idea of structured edit languages (e.g., diffs).

• An instantiation of this framework in cartokit DM+NL_{DM+NL}, a programming system that supports authoring JavaScript programs for geospatial visualization through both direct manipulation and natural language. This system is, to our knowledge, the first programming system to support both editing modalities.

355:4

Parker Ziegler, David Minh-Duy Cao, Justin Lubin, and Sarah E. Chasins

References (55)