EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Pantograph: A Fluid and Typed Structure Editor

Jacob Prinz, Henry Blanchette, Leonidas Lampropoulos

Proceedings of the ACM on Programming Languages · 07.01.2025 · 9 (POPL) · 802-831

DOI: 10.1145/3704864 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Programming Languages, online erschienen am 09.01.2025. Verfasst von Jacob Prinz und 2 weiteren Autor:innen. Die Arbeit wurde bisher 2-mal zitiert (Crossref) und nennt 39 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: National Science Foundation.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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.

Förderung

  • National Science Foundation

Zitieren

APA

Prinz, J., Blanchette, H., & Lampropoulos, L. (2025). Pantograph: A Fluid and Typed Structure Editor. Proceedings of the ACM on Programming Languages, 9(POPL), 802-831. https://doi.org/10.1145/3704864

Vancouver

Prinz J, Blanchette H, Lampropoulos L. Pantograph: A Fluid and Typed Structure Editor. Proceedings of the ACM on Programming Languages. 2025;9(POPL):802-831. doi:10.1145/3704864

BibTeX
@article{Prinz2025,
  author = {Prinz, Jacob and Blanchette, Henry and Lampropoulos, Leonidas},
  title = {Pantograph: A Fluid and Typed Structure Editor},
  journal = {Proceedings of the ACM on Programming Languages},
  year = {2025},
  volume = {9},
  number = {POPL},
  pages = {802--831},
  doi = {10.1145/3704864}
}
Kostenlos starten →