A systematic approach to deriving incremental type checkers
André Pacak, Sebastian Erdweg, Tamás Szabó
Abstract
Static typing can guide programmers if feedback is immediate. Therefore, all major IDEs incrementalize type checking in some way. However, prior approaches to incremental type checking are often specialized and hard to transfer to new type systems. In this paper, we propose a systematic approach for deriving incremental type checkers from textbook-style type system specifications. Our approach is based on compiling inference rules to Datalog, a carefully limited logic programming language for which incremental solvers exist. The key contribution of this paper is to discover an encoding of the infinite typing relation as a finite Datalog relation in a way that yields efficient incremental updates. We implemented the compiler as part of a type system DSL and show that it supports simple types, some local type inference, operator overloading, universal types, and iso-recursive types.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Bring Your Own Data Structures to Datalog cites Seminaïve evaluation for a higher-order functional language
- Bring Your Own Data Structures to Datalog cites Incremental whole-program analysis in Datalog with lattices
- Efficient algorithms for dynamic bidirected Dyck-reachability cites Incremental whole-program analysis in Datalog with lattices
- Efficient algorithms for dynamic bidirected Dyck-reachability cites On-the-Fly Static Analysis via Dynamic Bidirected Dyck Reachability
- On-the-Fly Static Analysis via Dynamic Bidirected Dyck Reachability cites Efficient algorithms for dynamic bidirected Dyck-reachability
Cited by top-tier papers9
- Incremental whole-program analysis in Datalog with latticesTamás Szabó, Sebastian Erdweg, Gábor BergmannPLDI 2021 · 39 citations
- Bring Your Own Data Structures to DatalogArash Sahebolamri, Langston Barrett, Scott Moore, Kristopher K. MicinskiOOPSLA 2023 · 11 citations
- Efficient algorithms for dynamic bidirected Dyck-reachabilityYuanbo Li, Kris Satya, Qirun ZhangPOPL 2022 · 8 citations
- On-the-Fly Static Analysis via Dynamic Bidirected Dyck ReachabilityShankaranarayanan Krishna, Aniket Lal, Andreas Pavlogiannis, Omkar TuppePOPL 2024 · 7 citations
- Concise, type-safe, and efficient structural diffingSebastian Erdweg, Tamás Szabó, André PacakPLDI 2021 · 6 citations
Builds on1
Related papers
- Incremental type-checking for free: using scope graphs to derive incremental type-checkersAron Zwaan, Hendrik van Antwerpen, Eelco VisserOOPSLA 2022 · 3 citations
- Type Inference LogicsDenis Carnier, François Pottier, Steven KeuchelOOPSLA 2024 · 3 citations
- Implementing Set-Theoretic TypesMickaël Laurent, Kim NguyễnOOPSLA 2026 · 1 citation
- Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 citations
- Pluggable Type Inference for FreeMartin Kellogg, Daniel Daskiewicz, Loi Ngo Duc Nguyen, Muyeed Ahmed et al.ASE 2023 · 4 citations
