Lune

OOPSLA2022顶会

Incremental type-checking for free: using scope graphs to derive incremental type-checkers

Aron Zwaan, Hendrik van Antwerpen, Eelco Visser

摘要

Fast analysis response times in IDEs are essential for a good editor experience. Incremental type-checking can provide that in a scalable fashion. However, existing techniques are not reusable between languages. Moreover, mutual and dynamic dependencies preclude traditional approaches to incrementality. This makes finding automatic approaches to incremental type-checking a challenging but important open question.

In this paper, we present a technique that automatically derives incremental type-checkers from type system specifications written in the Statix meta-DSL. We use name resolution queries in scope graphs (a generic model of name binding embedded in Statix) to derive dependencies between compilation units. A novel query confirmation algorithm finds queries for which the answer changed due to an edit in the program. Only units with such queries require reanalysis. The effectiveness of this algorithm is improved by (1) splitting the type-checking task into a context-free and a context-sensitive part, and (2) reusing a generic mechanism to resolve mutual dependencies. This automatically yields incremental type-checkers for any Statix specification.

Compared to non-incremental parallel execution, we achieve speedups up to 147x on synthetic benchmarks, and up to 21x on real-world projects, with initial overheads below 10%. This suggests that our framework can provide efficient incremental type-checking to the wide range of languages supported by Statix.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Incremental whole-program analysis in Datalog with lattices 引用了 A systematic approach to deriving incremental type checkers
  • Language-parametric static semantic code completion 引用了 Knowing when to ask: sound scheduling of name resolution in type checkers derived from declarative specifications
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper4

  1. Incremental whole-program analysis in Datalog with latticesTamás Szabó, Sebastian Erdweg, Gábor BergmannPLDI 2021 · 39 次引用
  2. A systematic approach to deriving incremental type checkersAndré Pacak, Sebastian Erdweg, Tamás SzabóOOPSLA 2020 · 16 次引用
  3. Language-parametric static semantic code completionDaniël A. A. Pelsmaeker, Hendrik van Antwerpen, Casper Bach Poulsen, Eelco VisserOOPSLA 2022 · 10 次引用
  4. Knowing when to ask: sound scheduling of name resolution in type checkers derived from declarative specificationsArjen Rouvoet, Hendrik van Antwerpen, Casper Bach Poulsen, Robbert Krebbers 等OOPSLA 2020 · 9 次引用

相关 Paper

  1. Language-Parametric Reference SynthesisDaniël A. A. Pelsmaeker, Aron Zwaan, Casper Bach Poulsen, Arjan J. MooijOOPSLA 2025 · 1 次引用
  2. Nested Inductive Types: Justified and Usable Nested Inductive Types in Lean and RocqThomas Lamiaux, Yannick Forster, Matthieu Sozeau, Nicolas TabareauPLDI 2026
  3. Differential Execution with Lexical TracingSebastian Erdweg, Runqing Xu, Mo BitarOOPSLA 2026
  4. Incremental Certified ProgrammingTomás Díaz, Kenji Maillard, Nicolas Tabareau, Éric TanterOOPSLA 2025
  5. Incremental Bidirectional Typing via Order MaintenanceThomas Porter, Marisa Kirisame, Ivan Wei, Pavel Panchekha 等OOPSLA 2025 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖