Incremental Bidirectional Typing via Order Maintenance
Thomas Porter, Marisa Kirisame, Ivan Wei, Pavel Panchekha, Cyrus Omar
摘要
Live programming environments provide various semantic services, including type checking and evaluation, continuously as the user is editing the program. The live paradigm promises to improve the developer experience, but liveness is an implementation challenge, particularly when working with large programs. This paper specifies and efficiently implements a system that is able to incrementally update type information for a live program in response to fine-grained program edits. This information includes type error marks and information about the expected and actual type of every expression. The system is specified type-theoretically as a small-step dynamics that propagates updates through the marked and annotated program. Most updates flow according to a base bidirectional type system. Additional pointers are maintained to connect bound variables to their binding locations, with type updates traversing these pointers directly. Order maintenance data structures are employed to efficiently maintain these pointers and to prioritize the order of update propagation. We prove this system is equivalent to naive reanalysis in the Agda theorem prover, along with other important metatheoretic properties. We then provide an efficient OCaml implementation, detailing a number of impactful optimizations. We evaluate this implementation’s performance with a large stress-test and find that it is able to achieve multiple orders of magnitude speed-up compared to from-scratch reanalysis.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper1
问问它们各自怎么用它它引用的顶会 Paper4
- A systematic approach to deriving incremental type checkersAndré Pacak, Sebastian Erdweg, Tamás SzabóOOPSLA 2020 · 被引用 16 次
- Total Type Error Localization and Recovery with HolesEric Zhao, Raef Maroof, Anand Dukkipati, Andrew Blinn 等POPL 2024 · 被引用 15 次
- Pantograph: A Fluid and Typed Structure EditorJacob Prinz, Henry Blanchette, Leonidas LampropoulosPOPL 2025 · 被引用 1 次
- Spineless Traversal for Layout InvalidationMarisa Kirisame, Tiezhi Wang, Pavel PanchekhaPLDI 2025
相关 Paper
- Live Pattern Matching with Typed HolesYongwei Yuan, Scott Guest, Eric Griffis, Hannah Potter 等OOPSLA 2023 · 被引用 9 次
- Type error feedback via analytic program repairGeorgios Sakkas, Madeline Endres, Benjamin Cosman, Westley Weimer 等PLDI 2020 · 被引用 24 次
- Answer Refinement Modification: Refinement Type System for Algebraic Effects and HandlersFuga Kawamata, Hiroshi Unno, Taro Sekiyama, Tachio TerauchiPOPL 2024 · 被引用 8 次
- Type Inference LogicsDenis Carnier, François Pottier, Steven KeuchelOOPSLA 2024 · 被引用 3 次
- Filling typed holes with live GUIsCyrus Omar, David Moon, Andrew Blinn, Ian Voysey 等PLDI 2021 · 被引用 35 次
