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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c71f4930-92d4-4301-9efc-0559ce01cd66Cited 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
