Concise, type-safe, and efficient structural diffing
Sebastian Erdweg, Tamás Szabó, André Pacak
摘要
A structural diffing algorithm compares two pieces of treeshaped data and computes their difference. Existing structural diffing algorithms either produce concise patches or ensure type safety, but never both. We present a new structural diffing algorithm called truediff that achieves both properties by treating subtrees as mutable, yet linearly typed resources. Mutation is required to derive concise patches that only mention changed nodes, but, in contrast to prior work, truediff guarantees all intermediate trees are well-typed. We formalize type safety, prove truediff has linear run time, and evaluate its performance and the conciseness of the derived patches empirically for real-world Python documents. While truediff ensures type safety, the size of its patches is on par with Gumtree, a popular untyped diffing implementation. Regardless, truediff outperforms Gumtree and a typed diffing implementation by an order of magnitude.
• Software and its engineering → Software notations and tools.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper1
相关 Paper
- Fine-grained, accurate and scalable source differencingJean-Rémy Falleri, Matias MartinezICSE 2024 · 被引用 9 次
- DiffFix: Incrementally Fixing AST Diffs via Context and Type InformationGuofeng Zeng, Chang-Ai Sun, Kai Gao, Huai LiuASE 2025
- HyperDiff: Computing Source Code Diffs at ScaleQuentin Le Dilavrec, Djamel Eddine Khelladi, Arnaud Blouin, Jean-Marc JézéquelFSE 2023 · 被引用 5 次
- Grove: A Bidirectionally Typed Collaborative Structure Editor CalculusMichael D. Adams, Eric Griffis, Thomas Porter, Sundara Vishnu Satish 等POPL 2025 · 被引用 3 次
- Type-Based Gradual Typing Performance OptimizationJohn Peter Campora III, Mohammad Wahiduzzaman Khan, Sheng ChenPOPL 2024 · 被引用 3 次
