Incrementalizing Statix: A Modular and Incremental Approach for Type Checking and Name Binding using Scope Graphs
Master Project
of Taico Aerts
Abstract
Statix is a language which generates a type checker from a declarative specification. However, Statix is not fast enough for quick feedback in IDEs because it always has to reanalyze all files. In this thesis, we improve the analysis time of Statix by applying the ideas of separate compilation to create a model for incremental analysis. Statix uses a scope graph for representing the scoping and declarations of a project. We split the scope graph over multiple smaller modules which can be analyzed in isolation. Our model automatically detects dependencies between modules and supports creating scope graph diffs to determine modules affected by changes with high precision. The modules from our model can be solved in parallel, already yielding performance improvements of up to 40% compared to the original implementation. Finally, we implement an optimistic strategy with our model and show that it is effective whenever changes are small, reducing analysis time by up to 5 times for large projects.
Thesis
- Aerts, Taico. Incrementalizing Statix. TU Delft Repository, 2019.
Student: Taico Aerts
Supervisor(s): Hendrik van Antwerpen, Eelco Visser
Defended: September 26, 2019