Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus
Michael D. Adams, Eric Griffis, Thomas Porter, Sundara Vishnu Satish, Eric Zhao, Cyrus Omar
摘要
Version control systems typically rely on a patch language, heuristic patch synthesis algorithms like diff, and three-way merge algorithms. Standard patch languages and merge algorithms often fail to identify conflicts correctly when there are multiple edits to one line of code or code is relocated. This paper introduces Grove, a collaborative structure editor calculus that eliminates patch synthesis and three-way merge algorithms entirely. Instead, patches are derived directly from the log of the developer's edit actions and all edits commute, i.e. the repository state forms a commutative replicated data type (CmRDT). To handle conflicts that can arise due to code relocation, the core datatype in Grove is a labeled directed multi-graph with uniquely identified vertices and edges. All edits amount to edge insertion and deletion, with deletion being permanent. To support tree-based editing, we define a decomposition from graphs into groves, which are a set of syntax trees with conflicts-including local, relocation, and unicyclic relocation conflicts-represented explicitly using holes and references between trees. Finally, we define a type error localization system for groves that enjoys a totality property, i.e. all editor states in Grove are statically meaningful, so developers can use standard editor services while working to resolve these explicitly represented conflicts. The static semantics is defined as a bidirectional marking system in line with recent work, with gradual typing employed to handle situations where errors and conflicts prevent type determination. We then layer on a unification-based type inference system to opportunistically fill type holes and fail gracefully when no solution exists. We mechanize the metatheory of Grove using the Agda theorem prover. We implement these ideas as the Grove Workbench, which generates the necessary data structures and algorithms in OCaml given a syntax tree specification.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Direct Manipulation and Natural Language Programming, Together at Last? 引用了 Denicek: Computational Substrate for Document-Oriented End-User Programming
- Interactive Data Analysis with Lively Typed Tables 引用了 Total Type Error Localization and Recovery with Holes
- Denicek: Computational Substrate for Document-Oriented End-User Programming 引用了 Peritext: A CRDT for Collaborative Rich Text Editing
引用它的顶会 Paper3
- Denicek: Computational Substrate for Document-Oriented End-User ProgrammingTomas Petricek, Jonathan EdwardsUIST 2025 · 2 次引用
- Direct Manipulation and Natural Language Programming, Together at Last?Parker Ziegler, David Minh-Duy Cao, Justin Lubin, Sarah E. ChasinsOOPSLA 2026
- Interactive Data Analysis with Lively Typed TablesAlexander Bandukwala, Cyrus OmarOOPSLA 2026
它引用的 Paper2
相关 Paper
- Type-Checking CRDT ConvergenceGeorge Zakhour, Pascal Weisenburger, Guido SalvaneschiPLDI 2023 · 16 次引用
- Composing CRDTs Convergent by ConstructionAlexander Städing Dominguez, George Zakhour, Pascal Weisenburger, Guido SalvaneschiOOPSLA 2026
- On the Correctness of Software MergeAkira Mori, Masatomo HashimotoASE 2025
- Proof Repair across Quotient Type EquivalencesCosmo Viola, Max Fan, Talia RingerOOPSLA 2025 · 1 次引用
- Keep CALM and CRDT OnShadaj Laddad, Conor Power, Mae Milano, Alvin Cheung 等VLDB 2023 · 13 次引用
