Incrementalizing Statix

A Modular and Incremental Approach for Type Checking and Name Binding using Scope Graphs

Master Thesis (2019)
Author(s)

T.V. Aerts (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Contributor(s)

Hendrik Van Antwerpen – Mentor (TU Delft - Programming Languages)

Eelco Visser – Mentor (TU Delft - Programming Languages)

N. Yorke-Smith – Graduation committee member (TU Delft - Algorithmics)

R.J. Krebbers – Graduation committee member (TU Delft - Programming Languages)

Faculty
Electrical Engineering, Mathematics and Computer Science
Copyright
© 2019 Taico Aerts
More Info
expand_more
Publication Year
2019
Language
English
Copyright
© 2019 Taico Aerts
Graduation Date
26-09-2019
Awarding Institution
Delft University of Technology
Programme
Computer Science
Faculty
Electrical Engineering, Mathematics and Computer Science
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

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.

Files

License info not available