Circular Image

H. van Antwerpen

info

Please Note

3 records found

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

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. ...
Type systems and their accompanying checkers provide support for the programmer to write better and safer code, faster, with less effort and with less errors. There are however properties that can not be checked at compile time yet. Refinement types are potentially the solution. They can prove properties of the behaviour of code without actually running and therefore avoid costly bugs in software. This is done by decorating types with predicates that tell something about the value of that type. This paper discusses an implementation of a refinement type system for a functional language. ...
Master thesis (2018) - Martijn Dwars, Eelco Visser, Hendrik van Antwerpen
Testing is the most commonly used technique for raising confidence in the correctness of a piece of software, but constructing an effective test suite is expensive and prone to error. Property-based testing partly automates this process by testing whether a property holds for all randomly generated inputs, but its effectiveness depends upon the ability to automatically generate random test inputs. When using property-based testing to test a compiler backend, the problem becomes that of generating random programs that pass the parsing and analysis phase. We present SPG (SPoofax Generator), a language-parametric generator of random well-formed terms. We describe three experiments in which we evaluate the effectiveness of SPG at discovering different kinds of compiler bugs. Furthermore, we analyze why the generator fails to detect certain compiler bugs and provide several ideas for future work. The results show that random testing can be a cost-effective technique to find bugs in small programming languages (such as DSLs), but its application to practical programming languages requires further research. ...